mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 21:13:04 +00:00
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.
This commit is contained in:
parent
9cf92085e5
commit
1532e66d76
@ -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)))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user