]> git.cworth.org Git - notmuch/commitdiff
Replace `without-restriction` with `save-restriction`
authorMichael J Gruber <git@grubix.eu>
Mon, 17 Jun 2024 19:28:24 +0000 (21:28 +0200)
committerDavid Bremner <david@tethera.net>
Wed, 19 Jun 2024 10:38:23 +0000 (07:38 -0300)
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.

emacs/notmuch-maildir-fcc.el

index cf50e8553c9ffc3b7e12ce144f0a1300cd242e62..c7b403cfe68f805baf186f64be64bd75f9cf3101 100644 (file)
@@ -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))