emacs-diffs
[Top][All Lists]
Advanced

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

master 3599a9a1cf1 3/4: * lisp/mail/rmail.el (rmail-resend): Use `with-s


From: Stefan Monnier
Subject: master 3599a9a1cf1 3/4: * lisp/mail/rmail.el (rmail-resend): Use `with-syntax-table`
Date: Fri, 23 Feb 2024 11:39:38 -0500 (EST)

branch: master
commit 3599a9a1cf1f8bed7c7f00fd8f00b2bfc0c4271f
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * lisp/mail/rmail.el (rmail-resend): Use `with-syntax-table`
---
 lisp/mail/rmail.el | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 7006d59be66..d422383acdf 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -4095,20 +4095,18 @@ typically for purposes of moderating a list."
            (save-excursion
              (if (featurep 'mailabbrev)
                  (let ((end (point-marker))
-                       (local-abbrev-table mail-abbrevs)
-                       (old-syntax-table (syntax-table)))
+                       (local-abbrev-table mail-abbrevs))
                    (if (and (not (obarrayp mail-abbrevs))
                             (file-exists-p mail-personal-alias-file))
                        (build-mail-abbrevs))
                    (unless mail-abbrev-syntax-table
                      (mail-abbrev-make-syntax-table))
-                   (set-syntax-table mail-abbrev-syntax-table)
-                   (goto-char before)
-                   (while (and (< (point) end)
-                               (progn (forward-word-strictly 1)
-                                      (<= (point) end)))
-                     (expand-abbrev))
-                   (set-syntax-table old-syntax-table))
+                   (with-syntax-table mail-abbrev-syntax-table
+                     (goto-char before)
+                     (while (and (< (point) end)
+                                 (progn (forward-word-strictly 1)
+                                        (<= (point) end)))
+                       (expand-abbrev))))
                (expand-mail-aliases before (point)))))
          ;;>> Set up comment, if any.
          (if (and (sequencep comment) (not (zerop (length comment))))



reply via email to

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