[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 1532e66 33/40: Fix saving of new snippets
From: |
Noam Postavsky |
Subject: |
[elpa] master 1532e66 33/40: Fix saving of new snippets |
Date: |
Wed, 26 Oct 2016 23:06:34 +0000 (UTC) |
branch: master
commit 1532e66d760e4f7dbbfd529fdeb3f44369378fee
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
Fix saving of new snippets
`buffer-file-name' is a permanent buffer-local variable, so if we reuse
the "*new snippet*" buffer, we could end up visiting the last new
snippet's file.
* yasnippet.el (yas-load-snippet-buffer-and-close): Rename the "*new
snippet*" buffer when making it visit a file.
---
yasnippet.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/yasnippet.el b/yasnippet.el
index 250f957..3f9660e 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -2600,7 +2600,8 @@ and `kill-buffer' instead."
(unless (or buffer-file-name (not default-file-name))
(setq buffer-file-name
(read-file-name "File to save snippet in: "
- nil nil nil default-file-name )))
+ nil nil nil default-file-name))
+ (rename-buffer (file-name-nondirectory buffer-file-name) t))
(save-buffer)))
(quit-window kill)))
- [elpa] master ea9581f 22/40: Fix some quoting problems in doc strings, (continued)
- [elpa] master ea9581f 22/40: Fix some quoting problems in doc strings, Noam Postavsky, 2016/10/26
- [elpa] master ee6e7a9 09/40: Fix some compilation warnings, Noam Postavsky, 2016/10/26
- [elpa] master 7661dc1 19/40: yasnippet.el (yas-escape-text): No error on nil text, Noam Postavsky, 2016/10/26
- [elpa] master 351c1e3 10/40: Don't indent first line of mirrors, Noam Postavsky, 2016/10/26
- [elpa] master 655bda8 07/40: Merge: restore backquote evaluation behaviour, Noam Postavsky, 2016/10/26
- [elpa] master 8907fd1 14/40: Escape yas-selected-text for new snippet., Noam Postavsky, 2016/10/26
- [elpa] master a4fafc3 16/40: Add test for loading snippet with same uuid, Noam Postavsky, 2016/10/26
- [elpa] master 8ca8c7d 13/40: Merge: a different fix for #712., Noam Postavsky, 2016/10/26
- [elpa] master 85a43ad 35/40: Explain about backquote expressions in doc, Noam Postavsky, 2016/10/26
- [elpa] master 3129040 24/40: Load snippet after saving, Noam Postavsky, 2016/10/26
- [elpa] master 1532e66 33/40: Fix saving of new snippets,
Noam Postavsky <=
- [elpa] master 0ee86a2 23/40: Simplify `yas-new-snippet' load&save logic, Noam Postavsky, 2016/10/26
- [elpa] master 00be21c 36/40: Change cl dep to cl-lib for tests too, Noam Postavsky, 2016/10/26
- [elpa] master 9c9952c 12/40: Add test for indentation of single line mirrors, Noam Postavsky, 2016/10/26
- [elpa] master 4296a86 15/40: yasnippet.el (yas--quote-string): Remove., Noam Postavsky, 2016/10/26
- [elpa] master d4da806 17/40: Fix removal of snippets by uuid, Noam Postavsky, 2016/10/26
- [elpa] master 42b0c26 18/40: Don't warn about modifications to other buffers, Noam Postavsky, 2016/10/26
- [elpa] master eaaec30 38/40: Replace all occurances of `capitaomorte', Noam Postavsky, 2016/10/26
- [elpa] master ff6f31e 37/40: Replace yas--with-temp-redefs with cl-letf, Noam Postavsky, 2016/10/26
- [elpa] master 244cdfa 26/40: Merge: Simplify `yas-new-snippet' load&save logic, Noam Postavsky, 2016/10/26
- [elpa] master 9500b00 21/40: Fix field navigation in the backwards direction, Noam Postavsky, 2016/10/26