* 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.
(with-temp-buffer
(dolist (file (yas--subdirs directory 'no-subdirs-just-files))
(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)
snippet-defs))))
(when snippet-defs