[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master bd67ffa179 2/2: Have submit-emacs-patch prompt for patch file bef
From: |
Philip Kaludercic |
Subject: |
master bd67ffa179 2/2: Have submit-emacs-patch prompt for patch file before subject |
Date: |
Thu, 14 Apr 2022 12:39:52 -0400 (EDT) |
branch: master
commit bd67ffa1790b620b2beebdc32080d70b76e71029
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Have submit-emacs-patch prompt for patch file before subject
* emacsbug.el (submit-emacs-patch): Prompt for patch file and use that
to guess the subject.
---
lisp/mail/emacsbug.el | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index 1bda609d10..8cb4a00009 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -488,7 +488,14 @@ and send the mail again%s."
Interactively, you will be prompted for SUBJECT and a patch FILE
name (which will be attached to the mail). You will end up in a
Message buffer where you can explain more about the patch."
- (interactive "sThis patch is about: \nfPatch file name: ")
+ (interactive
+ (let* ((file (read-file-name "Patch file name: "))
+ (guess (with-temp-buffer
+ (insert-file-contents file)
+ (mail-fetch-field "Subject"))))
+ (list (read-string (format-prompt "This patch is about" guess)
+ nil nil guess)
+ file)))
(switch-to-buffer "*Patch Help*")
(let ((inhibit-read-only t))
(erase-buffer)