auctex-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/auctex 56b081e241 02/23: * tex.el (TeX-insert-macro): U


From: Tassilo Horn
Subject: [elpa] externals/auctex 56b081e241 02/23: * tex.el (TeX-insert-macro): Use 'atomic-change-group'
Date: Thu, 20 Oct 2022 14:53:16 -0400 (EDT)

branch: externals/auctex
commit 56b081e241971ab497a669524b04f89dd9e6d8c7
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Tassilo Horn <tsdh@gnu.org>

    * tex.el (TeX-insert-macro): Use 'atomic-change-group'
    
    If the user aborts the command, we avoid keeping behind a partial
    state by reverting all changes that might have made.
---
 tex.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tex.el b/tex.el
index 1497f2281c..350d9e9003 100644
--- a/tex.el
+++ b/tex.el
@@ -3338,8 +3338,9 @@ is called with \\[universal-argument]."
                                    'TeX-macro-history TeX-default-macro))))
   (when (called-interactively-p 'any)
     (setq TeX-default-macro symbol))
-  (TeX-parse-macro symbol (cdr-safe (assoc symbol (TeX-symbol-list))))
-  (run-hooks 'TeX-after-insert-macro-hook))
+  (atomic-change-group
+    (TeX-parse-macro symbol (cdr-safe (assoc symbol (TeX-symbol-list))))
+    (run-hooks 'TeX-after-insert-macro-hook)))
 
 (defvar TeX-electric-macro-map
   (let ((map (make-sparse-keymap)))




reply via email to

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