Commit 7152b011 authored by Lars Magne Ingebrigtsen's avatar Lars Magne Ingebrigtsen
Browse files

Give better error messages when trying to load non-existent symlinks

* files.el (after-find-file): Give a better error message when
trying to find a symlink that points to a file that doesn't exist
(bug#4398).
parent 536f3d36
2011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
* files.el (after-find-file): Give a better error message when
trying to find a symlink that points to a file that doesn't exist
(bug#4398).
* progmodes/cc-vars.el: Remove (probably) misleading comment
(bug#4396).
......
......@@ -2060,7 +2060,11 @@ unless NOMODES is non-nil."
((not warn) nil)
((and error (file-attributes buffer-file-name))
(setq buffer-read-only t)
"File exists, but cannot be read")
(if (and (file-symlink-p buffer-file-name)
(not (file-exists-p
(file-chase-links buffer-file-name))))
"Symbolic link that points to nonexistent file"
"File exists, but cannot be read"))
((not buffer-read-only)
(if (and warn
;; No need to warn if buffer is auto-saved
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment