]> git.eshelyaron.com Git - emacs.git/commitdiff
(gnus-score-find-bnews): Simplify and don't assume point-min == 1.
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 22 Mar 2004 15:10:39 +0000 (15:10 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 22 Mar 2004 15:10:39 +0000 (15:10 +0000)
lisp/gnus/gnus-score.el

index 0623d1bd8f18d03a47268840217a8f5f30d8a594..91035d89f2ed66240ce4c2331d4c62aca5c1ab58 100644 (file)
@@ -2586,13 +2586,11 @@ GROUP using BNews sys file syntax."
            (replace-match ".*" t t))
          (goto-char (point-min))
          ;; Deal with "not."s.
-         (if (looking-at "not.")
-             (progn
-               (setq not-match t)
-               (setq regexp
-                     (concat "^" (buffer-substring 5 (point-max)) "$")))
-           (setq regexp (concat "^" (buffer-substring 1 (point-max)) "$"))
-           (setq not-match nil))
+         (setq not-match (looking-at "not."))
+         (setq regexp
+               (concat "^" (buffer-substring (+ (point-min) (if not-match 4 0))
+                                             (point-max))
+                       "$"))
          ;; Finally - if this resulting regexp matches the group name,
          ;; we add this score file to the list of score files
          ;; applicable to this group.