aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-06-05 12:05:05 +0000
committerRichard M. Stallman1994-06-05 12:05:05 +0000
commit4e722714a8add38dddbb4bc86903c8542d0ac28f (patch)
tree4484a8e73ea20fe84d3def9cfb1fdba879e59e53
parente5fd28221b7f9c7404374b09751148255a581241 (diff)
downloademacs-4e722714a8add38dddbb4bc86903c8542d0ac28f.tar.gz
emacs-4e722714a8add38dddbb4bc86903c8542d0ac28f.zip
(gnus-newsrc-to-gnus-format): In main loop,
don't try to match the ranges with the regexp. Match just the group name and the subscribed-flag.
-rw-r--r--lisp/gnus.el15
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/gnus.el b/lisp/gnus.el
index e32eb67a36c..b498747bc86 100644
--- a/lisp/gnus.el
+++ b/lisp/gnus.el
@@ -6586,18 +6586,17 @@ If optional argument RAWFILE is non-nil, the raw startup file is read."
6586 ;; Before supporting continuation lines, " newsgroup ! 1-5" was 6586 ;; Before supporting continuation lines, " newsgroup ! 1-5" was
6587 ;; okay, but now it is invalid. It should be "newsgroup! 1-5". 6587 ;; okay, but now it is invalid. It should be "newsgroup! 1-5".
6588 (goto-char (point-min)) 6588 (goto-char (point-min))
6589 ;; Due to overflows in regex.c, change the following regexp: 6589 ;; We used this regexp, but it caused overflows.
6590 ;; "^\\([^:! \t\n]+\\)\\([:!]\\)[ \t]*\\(.*\\)$" 6590 ;; "^\\([^:! \t\n]+\\)\\([:!]\\)[ \t]*\\(.*\\)$"
6591 ;; Suggested by composer@bucsf.bu.edu (Jeff Kellem) 6591 ;; Suggested by composer@bucsf.bu.edu (Jeff Kellem)
6592 ;; but no longer viable because of extensive backtracking in Emacs 19: 6592 ;; but no longer viable because of extensive backtracking in Emacs 19:
6593 ;; "^\\([^:! \t\n]+\\)\\([:!]\\)[ \t]*\\(\\(...\\)*.*\\)$" 6593 ;; "^\\([^:! \t\n]+\\)\\([:!]\\)[ \t]*\\(\\(...\\)*.*\\)$"
6594 ;; but, the following causes trouble on some case: 6594 ;; but, the following causes trouble on some case:
6595 ;; "^\\([^:! \t\n]+\\)\\([:!]\\)[ \t]*\\(\\|[^ \t\n].*\\)$" 6595 ;; "^\\([^:! \t\n]+\\)\\([:!]\\)[ \t]*\\(\\|[^ \t\n].*\\)$"
6596 (while (re-search-forward 6596 ;; So now we don't try to match the tail of the line at all.
6597 (if (= gnus-emacs-version 18) 6597 ;; It's just as easy to extract it later.
6598 "^\\([^:! \t\n]+\\)\\([:!]\\)[ \t]*\\(\\(...\\)*.*\\)$" 6598 (while (re-search-forward "^\\([^:! \t\n]+\\)\\([:!]\\)"
6599 "^\\([^:! \t\n]+\\)\\([:!]\\)[ \t]*\\(.*\\)$") 6599 nil t)
6600 nil t)
6601 (setq newsgroup (buffer-substring (match-beginning 1) (match-end 1))) 6600 (setq newsgroup (buffer-substring (match-beginning 1) (match-end 1)))
6602 ;; Check duplications of newsgroups. 6601 ;; Check duplications of newsgroups.
6603 ;; Note: Checking the duplications takes very long time. 6602 ;; Note: Checking the duplications takes very long time.
@@ -6606,7 +6605,9 @@ If optional argument RAWFILE is non-nil, the raw startup file is read."
6606 (setq subscribe 6605 (setq subscribe
6607 (string-equal 6606 (string-equal
6608 ":" (buffer-substring (match-beginning 2) (match-end 2)))) 6607 ":" (buffer-substring (match-beginning 2) (match-end 2))))
6609 (setq ranges (buffer-substring (match-beginning 3) (match-end 3))) 6608 (skip-chars-forward " \t")
6609 (setq ranges (buffer-substring (point) (save-excursion
6610 (end-of-line) (point))))
6610 (setq read-list nil) 6611 (setq read-list nil)
6611 (while (string-match "^[, \t]*\\([0-9-]+\\)" ranges) 6612 (while (string-match "^[, \t]*\\([0-9-]+\\)" ranges)
6612 (setq subrange (substring ranges (match-beginning 1) (match-end 1))) 6613 (setq subrange (substring ranges (match-beginning 1) (match-end 1)))