mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-14 05:23:04 +00:00
inhibit change hooks during (insert content)
`yas-expand-snippet' narrows to a 0 size region before doing (insert content), this confuses cc-mode's before-change-functions that invalidate some cached information. Binding `inhibit-modification-hooks' to `t' prevents calling these functions. Fixes #404.
This commit is contained in:
parent
d963c41a14
commit
90d4cae1b1
@ -3523,9 +3523,11 @@ considered when expanding the snippet."
|
|||||||
(setq snippet
|
(setq snippet
|
||||||
(if expand-env
|
(if expand-env
|
||||||
(eval `(let* ,expand-env
|
(eval `(let* ,expand-env
|
||||||
(insert content)
|
(let ((inhibit-modification-hooks t))
|
||||||
|
(insert content))
|
||||||
(yas--snippet-create (point-min))))
|
(yas--snippet-create (point-min))))
|
||||||
(insert content)
|
(let ((inhibit-modification-hooks t))
|
||||||
|
(insert content))
|
||||||
(yas--snippet-create (point-min)))))))
|
(yas--snippet-create (point-min)))))))
|
||||||
|
|
||||||
;; stacked-expansion: This checks for stacked expansion, save the
|
;; stacked-expansion: This checks for stacked expansion, save the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user