From: Stefan Monnier Date: Mon, 22 Mar 2004 15:10:39 +0000 (+0000) Subject: (gnus-score-find-bnews): Simplify and don't assume point-min == 1. X-Git-Tag: ttn-vms-21-2-B4~7160 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=87e8daba667979a8eacead21f9a2a1bb943ef806;p=emacs.git (gnus-score-find-bnews): Simplify and don't assume point-min == 1. --- diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index 0623d1bd8f1..91035d89f2e 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -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.