mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 13:13:03 +00:00
* yasnippet.el (yas--snippet-create): Remove CC-mode workaround for #953
This commit is contained in:
parent
362e9b551d
commit
bd2fdc8f7d
11
yasnippet.el
11
yasnippet.el
@ -4075,6 +4075,15 @@ Returns the newly created snippet."
|
||||
;; content.
|
||||
(let ((buffer-undo-list t))
|
||||
(goto-char begin)
|
||||
(if (> emacs-major-version 29)
|
||||
;; Don't use the workaround for CC-mode's cache,
|
||||
;; since it was presumably a bug in CC-mode, so either
|
||||
;; it's fixed already, or it should get fixed.
|
||||
(progn
|
||||
(insert content)
|
||||
(narrow-to-region begin (point))
|
||||
(goto-char (point-min))
|
||||
(yas--snippet-parse-create snippet))
|
||||
;; Call before and after change functions manually,
|
||||
;; otherwise cc-mode's cache can get messed up. Don't use
|
||||
;; `inhibit-modification-hooks' for that, that blocks
|
||||
@ -4093,7 +4102,7 @@ Returns the newly created snippet."
|
||||
(yas--snippet-parse-create snippet))
|
||||
(run-hook-with-args 'after-change-functions
|
||||
(point-min) (point-max)
|
||||
(- end begin)))
|
||||
(- end begin))))
|
||||
(when (listp buffer-undo-list)
|
||||
(push (cons (point-min) (point-max))
|
||||
buffer-undo-list))
|
||||
|
Loading…
x
Reference in New Issue
Block a user