]> git.eshelyaron.com Git - emacs.git/commitdiff
Ensure re-encoding after change in gnus-inews-do-gcc
authorJames Thomas <jimjoe@gmx.net>
Sun, 3 Apr 2022 12:14:24 +0000 (14:14 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 3 Apr 2022 12:14:24 +0000 (14:14 +0200)
* 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

index f38f6f4ee2b904f9eb1519fa295b1986fd17cc75..f6ae028a104550c312d80ba0342b7b602f6a87be 100644 (file)
@@ -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))