emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r105148: Give better error messages w


From: Lars Magne Ingebrigtsen
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105148: Give better error messages when trying to load non-existent symlinks
Date: Wed, 13 Jul 2011 01:25:50 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105148
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Wed 2011-07-13 01:25:50 +0200
message:
  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).
modified:
  lisp/ChangeLog
  lisp/files.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-07-12 23:19:33 +0000
+++ b/lisp/ChangeLog    2011-07-12 23:25:50 +0000
@@ -1,5 +1,9 @@
 2011-07-12  Lars Magne Ingebrigtsen  <address@hidden>
 
+       * 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).
 

=== modified file 'lisp/files.el'
--- a/lisp/files.el     2011-07-11 13:56:49 +0000
+++ b/lisp/files.el     2011-07-12 23:25:50 +0000
@@ -2060,7 +2060,11 @@
             ((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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]