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

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

[elpa] externals/debbugs e234767 259/311: Don't insert two Summary lines


From: Stefan Monnier
Subject: [elpa] externals/debbugs e234767 259/311: Don't insert two Summary lines in the commit message
Date: Sun, 29 Nov 2020 18:42:24 -0500 (EST)

branch: externals/debbugs
commit e2347674bf40cff0fb9e073673dea465e6e34f3f
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Don't insert two Summary lines in the commit message
---
 debbugs-gnu.el | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 7913e96..5dea0d3 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -2340,8 +2340,7 @@ If SELECTIVELY, query the user before applying the patch."
     (let ((add-log-full-name (car from))
          (add-log-mailing-address (cadr from)))
       (add-change-log-entry-other-window)
-      (when patch-subject
-       (setq-local debbugs-gnu-patch-subject patch-subject))
+      (setq-local debbugs-gnu-patch-subject patch-subject)
       (when changelog
        (delete-region (line-beginning-position) (point-max))
        (save-restriction
@@ -2433,9 +2432,14 @@ If SELECTIVELY, query the user before applying the 
patch."
     (switch-to-buffer "*vc-diff*")
     (other-window 1)
     (when patch-subject
-      (insert "Summary: "
-             (replace-regexp-in-string "^ *\\[PATCH\\] *" "" patch-subject)
-             "\n"))))
+      (goto-char (point-min))
+      (unless (re-search-forward "^Summary: ")
+       (insert "Summary: \n")
+       (forward-line -1)
+       (end-of-line))
+      (insert (replace-regexp-in-string "^ *\\[PATCH\\] *" "" patch-subject))
+      (beginning-of-line)
+      (search-forward ": " nil t))))
 
 (defun debbugs-gnu-save-cache ()
   "Save the bugs cache to a file."



reply via email to

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