comparison lisp/gnus/gnus-start.el @ 18:d95e72db5c07 r19-15b92

Import from CVS: tag r19-15b92
author cvs
date Mon, 13 Aug 2007 08:49:43 +0200
parents 0293115a14e9
children 4103f0995bd7
comparison
equal deleted inserted replaced
17:4579af9d8826 18:d95e72db5c07
1664 (goto-char (point-min)) 1664 (goto-char (point-min))
1665 (let (group max min) 1665 (let (group max min)
1666 (while (not (eobp)) 1666 (while (not (eobp))
1667 (condition-case () 1667 (condition-case ()
1668 (progn 1668 (progn
1669 (narrow-to-region (point) (point-at-eol)) 1669 (narrow-to-region (point) (gnus-point-at-eol))
1670 ;; group gets set to a symbol interned in the hash table 1670 ;; group gets set to a symbol interned in the hash table
1671 ;; (what a hack!!) - jwz 1671 ;; (what a hack!!) - jwz
1672 (setq group (let ((obarray hashtb)) (read cur))) 1672 (setq group (let ((obarray hashtb)) (read cur)))
1673 (if (and (numberp (setq max (read cur))) 1673 (if (and (numberp (setq max (read cur)))
1674 (numberp (setq min (read cur))) 1674 (numberp (setq min (read cur)))
1692 (symbolp group) 1692 (symbolp group)
1693 (set group nil)) 1693 (set group nil))
1694 (unless ignore-errors 1694 (unless ignore-errors
1695 (gnus-message 3 "Warning - illegal active: %s" 1695 (gnus-message 3 "Warning - illegal active: %s"
1696 (buffer-substring 1696 (buffer-substring
1697 (point-at-bol) (point-at-eol)))))) 1697 (gnus-point-at-bol) (gnus-point-at-eol))))))
1698 (widen) 1698 (widen)
1699 (forward-line 1))))) 1699 (forward-line 1)))))
1700 1700
1701 (defun gnus-groups-to-gnus-format (method &optional hashtb) 1701 (defun gnus-groups-to-gnus-format (method &optional hashtb)
1702 ;; Parse a "groups" active file. 1702 ;; Parse a "groups" active file.
1932 ;; thorough studies show that approx 99.37% of all 1932 ;; thorough studies show that approx 99.37% of all
1933 ;; .newsrc files only contain a single options line, we 1933 ;; .newsrc files only contain a single options line, we
1934 ;; don't give a damn, frankly, my dear. 1934 ;; don't give a damn, frankly, my dear.
1935 (concat gnus-newsrc-options 1935 (concat gnus-newsrc-options
1936 (buffer-substring 1936 (buffer-substring
1937 (point-at-bol) 1937 (gnus-point-at-bol)
1938 ;; Options may continue on the next line. 1938 ;; Options may continue on the next line.
1939 (or (and (re-search-forward "^[^ \t]" nil 'move) 1939 (or (and (re-search-forward "^[^ \t]" nil 'move)
1940 (progn (beginning-of-line) (point))) 1940 (progn (beginning-of-line) (point)))
1941 (point))))) 1941 (point)))))
1942 (forward-line -1)) 1942 (forward-line -1))
2003 (unless (eobp) 2003 (unless (eobp)
2004 ;; If it was eob instead of ?\n, we allow it. 2004 ;; If it was eob instead of ?\n, we allow it.
2005 ;; The line was buggy. 2005 ;; The line was buggy.
2006 (setq group nil) 2006 (setq group nil)
2007 (gnus-error 3.1 "Mangled line: %s" 2007 (gnus-error 3.1 "Mangled line: %s"
2008 (buffer-substring (point-at-bol) 2008 (buffer-substring (gnus-point-at-bol)
2009 (point-at-eol)))) 2009 (gnus-point-at-eol))))
2010 nil)) 2010 nil))
2011 ;; Skip past ", ". Spaces are illegal in these ranges, but 2011 ;; Skip past ", ". Spaces are illegal in these ranges, but
2012 ;; we allow them, because it's a common mistake to put a 2012 ;; we allow them, because it's a common mistake to put a
2013 ;; space after the comma. 2013 ;; space after the comma.
2014 (skip-chars-forward ", ")) 2014 (skip-chars-forward ", "))
2113 ;; We are only interested in "options -n" lines - we 2113 ;; We are only interested in "options -n" lines - we
2114 ;; ignore the other option lines. 2114 ;; ignore the other option lines.
2115 (while (re-search-forward "[ \t]-n" nil t) 2115 (while (re-search-forward "[ \t]-n" nil t)
2116 (setq eol 2116 (setq eol
2117 (or (save-excursion 2117 (or (save-excursion
2118 (and (re-search-forward "[ \t]-n" (point-at-eol) t) 2118 (and (re-search-forward "[ \t]-n" (gnus-point-at-eol) t)
2119 (- (point) 2))) 2119 (- (point) 2)))
2120 (point-at-eol))) 2120 (gnus-point-at-eol)))
2121 ;; Search for all "words"... 2121 ;; Search for all "words"...
2122 (while (re-search-forward "[^ \t,\n]+" eol t) 2122 (while (re-search-forward "[^ \t,\n]+" eol t)
2123 (if (= (char-after (match-beginning 0)) ?!) 2123 (if (= (char-after (match-beginning 0)) ?!)
2124 ;; If the word begins with a bang (!), this is a "not" 2124 ;; If the word begins with a bang (!), this is a "not"
2125 ;; spec. We put this spec (minus the bang) and the 2125 ;; spec. We put this spec (minus the bang) and the