Mercurial > hg > xemacs-beta
changeset 4655:13273cffca2a
Avoid errors in Dired when opening directories.
lisp/ChangeLog addition:
2009-07-18 Aidan Kehoe <kehoea@parhasard.net>
* files.el (find-file-create-switch-thunk):
Check that #'buffer-file-name gives non-nil before trying to
determine whether that file exists; avoids problems in
dired. Thank you Mats Lidell!
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 18 Jul 2009 23:51:21 +0100 |
parents | cdc51540fed7 |
children | 79d1a0524b5f |
files | lisp/ChangeLog lisp/files.el |
diffstat | 2 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Wed Jul 15 00:21:01 2009 +0100 +++ b/lisp/ChangeLog Sat Jul 18 23:51:21 2009 +0100 @@ -1,3 +1,10 @@ +2009-07-18 Aidan Kehoe <kehoea@parhasard.net> + + * files.el (find-file-create-switch-thunk): + Check that #'buffer-file-name gives non-nil before trying to + determine whether that file exists; avoids problems in + dired. Thank you Mats Lidell! + 2009-07-13 Aidan Kehoe <kehoea@parhasard.net> * code-files.el (insert-file-contents):
--- a/lisp/files.el Wed Jul 15 00:21:01 2009 +0100 +++ b/lisp/files.el Sat Jul 18 23:51:21 2009 +0100 @@ -897,7 +897,8 @@ as `find-file' itself." `(function (lambda (buffer) - (unless (file-exists-p (buffer-file-name buffer)) + (unless (and (buffer-file-name buffer) + (file-exists-p (buffer-file-name buffer))) ;; XEmacs: nonexistent file--qualifies as a modification to the ;; buffer. (set-buffer-modified-p t buffer))