emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/debbugs 2efa3a7 284/311: Improve bug id guessing for mu


From: Stefan Monnier
Subject: [elpa] externals/debbugs 2efa3a7 284/311: Improve bug id guessing for multi-bug mailboxes
Date: Sun, 29 Nov 2020 18:42:30 -0500 (EST)

branch: externals/debbugs
commit 2efa3a7b7b83dfd25a79032bf20f2fcbda42f4d3
Author: Robert Pluim <rpluim@gmail.com>
Commit: Robert Pluim <rpluim@gmail.com>

    Improve bug id guessing for multi-bug mailboxes
    
    * debbugs-gnu.el (debbugs-gnu-guess-current-id): Search backwards
    rather than from point-min for bug id.
---
 debbugs-gnu.el | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 3dbd2f2..5789d80 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -1576,14 +1576,13 @@ MERGED is the list of bugs merged with this one."
               (setq subject ,debbugs-gnu-subject))))))))
 
 (defun debbugs-gnu-guess-current-id ()
-  "Guess the ID based on \"#23\"."
+  "Guess the ID based on \"#23\".
+Looks at current line and then backwards from point."
   (save-excursion
     (beginning-of-line)
     (and
      (or (re-search-forward "#\\([0-9]+\\)" (line-end-position) t)
-        (progn
-          (goto-char (point-min))
-          (re-search-forward "#\\([0-9]+\\)" nil t)))
+        (re-search-backward "#\\([0-9]+\\)" nil t))
      (string-to-number (match-string 1)))))
 
 (defun debbugs-gnu-proper-bug-number (id)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]