From 87e8daba667979a8eacead21f9a2a1bb943ef806 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 22 Mar 2004 15:10:39 +0000 Subject: [PATCH] (gnus-score-find-bnews): Simplify and don't assume point-min == 1. --- lisp/gnus/gnus-score.el | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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. -- 2.39.2