mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 05:03:04 +00:00
Push modifications to buffer-undo-list, even if unwinding
This commit is contained in:
parent
eb5ba2664c
commit
ce54f1958f
@ -4128,6 +4128,7 @@ Returns the newly created snippet."
|
||||
(yas--letenv expand-env
|
||||
;; Put a single undo action for the expanded snippet's
|
||||
;; content.
|
||||
(unwind-protect
|
||||
(let ((buffer-undo-list t))
|
||||
(goto-char begin)
|
||||
(if (> emacs-major-version 29)
|
||||
@ -4160,7 +4161,7 @@ Returns the newly created snippet."
|
||||
(- end begin))))
|
||||
(when (listp buffer-undo-list)
|
||||
(push (cons (point-min) (point-max))
|
||||
buffer-undo-list))
|
||||
buffer-undo-list)))
|
||||
|
||||
;; Indent, collecting undo information normally.
|
||||
(yas--indent snippet)
|
||||
|
Loading…
x
Reference in New Issue
Block a user