aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Steingold2017-09-18 16:33:37 -0400
committerSam Steingold2017-09-18 16:33:37 -0400
commit0bddbbc5aae621d5875880ac3e63f68d481df7c3 (patch)
treeb77b67c7a493bec8e6caaa8d28c5f55d77e72a0e
parent9dbdc0f00567d0cf2d165ef9704983bfb588146f (diff)
downloademacs-0bddbbc5aae621d5875880ac3e63f68d481df7c3.tar.gz
emacs-0bddbbc5aae621d5875880ac3e63f68d481df7c3.zip
Fix bug#28435: "all" score file is ignored
(gnus-score-find-bnews): Fix removing the empty suffix.
-rw-r--r--lisp/gnus/gnus-score.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el
index 11a45dda9ad..976ac9f7f35 100644
--- a/lisp/gnus/gnus-score.el
+++ b/lisp/gnus/gnus-score.el
@@ -2731,8 +2731,10 @@ GROUP using BNews sys file syntax."
2731 (insert (car sfiles)) 2731 (insert (car sfiles))
2732 (goto-char (point-min)) 2732 (goto-char (point-min))
2733 ;; First remove the suffix itself. 2733 ;; First remove the suffix itself.
2734 (when (re-search-forward (concat "." score-regexp) nil t) 2734 (when (re-search-forward score-regexp nil t)
2735 (replace-match "" t t) 2735 (unless (= (match-end 0) (match-beginning 0)) ; non-empty suffix
2736 (replace-match "" t t)
2737 (delete-char -1)) ; remove the "." before the suffix
2736 (goto-char (point-min)) 2738 (goto-char (point-min))
2737 (if (looking-at (regexp-quote kill-dir)) 2739 (if (looking-at (regexp-quote kill-dir))
2738 ;; If the file name was just "SCORE", `klen' is one character 2740 ;; If the file name was just "SCORE", `klen' is one character