emacs-diffs
[Top][All Lists]
Advanced

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

master 9f521db6fe: Ensure re-encoding after change in gnus-inews-do-gcc


From: Lars Ingebrigtsen
Subject: master 9f521db6fe: Ensure re-encoding after change in gnus-inews-do-gcc
Date: Sun, 3 Apr 2022 08:15:26 -0400 (EDT)

branch: master
commit 9f521db6fec6c6dbdfeb1145f4dbb603c0240299
Author: James Thomas <jimjoe@gmx.net>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Ensure re-encoding after change in gnus-inews-do-gcc
    
    * lisp/gnus/gnus-msg.el (gnus-inews-do-gcc): Re-encode the message
    body if it has been modified by gnus-gcc-pre-body-encode-hook
    (bug#54687).
---
 lisp/gnus/gnus-msg.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index f38f6f4ee2..f6ae028a10 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -1593,9 +1593,10 @@ this is a reply."
              (nnheader-set-temp-buffer " *acc*")
              (setq message-options (with-current-buffer cur message-options))
              (insert-buffer-substring cur)
+              (restore-buffer-modified-p nil)
              (run-hooks 'gnus-gcc-pre-body-encode-hook)
              ;; Avoid re-doing things like GPG-encoding secret parts.
-             (if (not encoded-cache)
+             (if (or (buffer-modified-p) (not encoded-cache))
                  (message-encode-message-body)
                (erase-buffer)
                (insert encoded-cache))



reply via email to

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