mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 21:13:04 +00:00
Avoid bug in insert-file-contents with REPLACE=t
* yasnippet.el (yas--load-directory-2): Call `erase-buffer' before `insert-file-contents' instead of passing non-nil REPLACE, avoids Emacs bug #23659. Fixes #707.
This commit is contained in:
parent
47dbe93d86
commit
e23a053b00
@ -1805,7 +1805,10 @@ With prefix argument USE-JIT do jit-loading of snippets."
|
|||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(dolist (file (yas--subdirs directory 'no-subdirs-just-files))
|
(dolist (file (yas--subdirs directory 'no-subdirs-just-files))
|
||||||
(when (file-readable-p file)
|
(when (file-readable-p file)
|
||||||
(insert-file-contents file nil nil nil t)
|
;; Erase the buffer instead of passing non-nil REPLACE to
|
||||||
|
;; `insert-file-contents' (avoids Emacs bug #23659).
|
||||||
|
(erase-buffer)
|
||||||
|
(insert-file-contents file)
|
||||||
(push (yas--parse-template file)
|
(push (yas--parse-template file)
|
||||||
snippet-defs))))
|
snippet-defs))))
|
||||||
(when snippet-defs
|
(when snippet-defs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user