emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master e23a053 34/36: Avoid bug in insert-file-contents with REPL


From: Noam Postavsky
Subject: [elpa] master e23a053 34/36: Avoid bug in insert-file-contents with REPLACE=t
Date: Sat, 11 Jun 2016 19:21:12 +0000 (UTC)

branch: master
commit e23a053b0041e4f615649b7acf8c1b2ce35fd3fb
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

    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.
---
 yasnippet.el |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/yasnippet.el b/yasnippet.el
index f670a29..7b87cd3 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -1805,7 +1805,10 @@ With prefix argument USE-JIT do jit-loading of snippets."
     (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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]