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