emacs-diffs
[Top][All Lists]
Advanced

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

master a412141: * lisp/files.el (cd): Improve error message.


From: Stefan Kangas
Subject: master a412141: * lisp/files.el (cd): Improve error message.
Date: Wed, 10 Mar 2021 09:10:47 -0500 (EST)

branch: master
commit a412141c9d67bb4a66c9b2050be1275436da89fd
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    * lisp/files.el (cd): Improve error message.
---
 lisp/files.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/files.el b/lisp/files.el
index e5fa1d8..2868be7 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -823,7 +823,9 @@ The path separator is colon in GNU and GNU-like systems."
          (expand-file-name dir))
     (locate-file dir cd-path nil
                  (lambda (f) (and (file-directory-p f) 'dir-ok)))
-    (error "No such directory found via CDPATH environment variable"))))
+    (if (getenv "CDPATH")
+        (error "No such directory found via CDPATH environment variable: %s" 
dir)
+      (error "No such directory: %s" dir)))))
 
 (defun directory-files-recursively (dir regexp
                                         &optional include-directories predicate



reply via email to

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