mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(custom-get-fresh-buffer): Test for nonexistence buffer.
This commit is contained in:
parent
be781fa751
commit
fd1c38f415
2 changed files with 6 additions and 1 deletions
|
|
@ -1214,7 +1214,7 @@ not for everybody."
|
|||
;; To be more complete, we should also kill all permanent-local variables,
|
||||
;; but it's not needed for custom.
|
||||
(let ((buf (get-buffer name)))
|
||||
(when (buffer-local-value 'buffer-file-name buf)
|
||||
(when (and buf (buffer-local-value 'buffer-file-name buf))
|
||||
;; This will check if the file is not saved.
|
||||
(kill-buffer buf)
|
||||
(setq buf nil))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue