1
Fork 0
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:
Lute Kamstra 2003-06-03 11:24:42 +00:00
parent be781fa751
commit fd1c38f415
2 changed files with 6 additions and 1 deletions

View file

@ -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))