From: James Thomas Date: Sun, 3 Apr 2022 12:14:24 +0000 (+0200) Subject: Ensure re-encoding after change in gnus-inews-do-gcc X-Git-Tag: emacs-29.0.90~1931^2~798 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9f521db6fec6c6dbdfeb1145f4dbb603c0240299;p=emacs.git 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). --- diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index f38f6f4ee2b..f6ae028a104 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))