mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 21:13:04 +00:00
Don't warn about modifications to other buffers
* yasnippet.el (yas--save-backquotes): Detect changes only in buffer where snippet is being expanded.
This commit is contained in:
parent
d4da806e5c
commit
42b0c269ca
@ -4008,8 +4008,11 @@ With optional string TEXT do it in string instead of the buffer."
|
|||||||
(defun yas--save-backquotes ()
|
(defun yas--save-backquotes ()
|
||||||
"Save all the \"`(lisp-expression)`\"-style expressions
|
"Save all the \"`(lisp-expression)`\"-style expressions
|
||||||
with their evaluated value into `yas--backquote-markers-and-strings'."
|
with their evaluated value into `yas--backquote-markers-and-strings'."
|
||||||
(let* ((yas--change-detected nil)
|
(let* ((yas--snippet-buffer (current-buffer))
|
||||||
(detect-change (lambda (_beg _end) (setq yas--change-detected t))))
|
(yas--change-detected nil)
|
||||||
|
(detect-change (lambda (_beg _end)
|
||||||
|
(when (eq (current-buffer) yas--snippet-buffer)
|
||||||
|
(setq yas--change-detected t)))))
|
||||||
(while (re-search-forward yas--backquote-lisp-expression-regexp nil t)
|
(while (re-search-forward yas--backquote-lisp-expression-regexp nil t)
|
||||||
(let ((current-string (match-string-no-properties 1)) transformed)
|
(let ((current-string (match-string-no-properties 1)) transformed)
|
||||||
(save-restriction (widen)
|
(save-restriction (widen)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user