aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael J Gruber <git@grubix.eu>2024-06-17 21:28:24 +0200
committerDavid Bremner <david@tethera.net>2024-06-19 07:38:23 -0300
commitb526c5ef0e1ae78380e68e5a24170542b884cbe3 (patch)
treef1d981814d55626de7d1087dfc52973f58e18757
parent37c022aea000ab586ba2a7ea7bbac4292dda0dd3 (diff)
Replace `without-restriction` with `save-restriction`
37c022ae ("Use `without-restriction` in `with-temporary-notmuch-message-buffer`", 2024-03-14) introduced a fix for draft saving in a way which is supported on Emacs 29 and above only. Replace this with a construct which we have used before, so that we keep the same compatibility level.
-rw-r--r--emacs/notmuch-maildir-fcc.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el
index cf50e855..c7b403cf 100644
--- a/emacs/notmuch-maildir-fcc.el
+++ b/emacs/notmuch-maildir-fcc.el
@@ -145,7 +145,8 @@ Otherwise set it according to `notmuch-fcc-dirs'."
(defmacro with-temporary-notmuch-message-buffer (&rest body)
"Set-up a temporary copy of the current message-mode buffer."
- `(without-restriction
+ `(save-restriction
+ (widen)
(let ((case-fold-search t)
(buf (current-buffer))
(mml-externalize-attachments message-fcc-externalize-attachments))