changeset 87475:d5c5e7e3d557

(cd-absolute): Fix omission bug: Make `list-buffers-directory' buffer-local.
author Thien-Thi Nguyen <ttn@gnuvola.org>
date Sat, 29 Dec 2007 12:58:06 +0000
parents dc4354c7a6c7
children 6455e422c87c
files lisp/files.el
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Sat Dec 29 05:54:23 2007 +0000
+++ b/lisp/files.el	Sat Dec 29 12:58:06 2007 +0000
@@ -635,10 +635,10 @@
       (if (file-exists-p dir)
 	  (error "%s is not a directory" dir)
 	(error "%s: no such directory" dir))
-    (if (file-executable-p dir)
-	(setq default-directory dir
-	      list-buffers-directory dir)
-      (error "Cannot cd to %s:  Permission denied" dir))))
+    (unless (file-executable-p dir)
+      (error "Cannot cd to %s:  Permission denied" dir))
+    (setq default-directory dir)
+    (set (make-local-variable 'list-buffers-directory) dir)))
 
 (defun cd (dir)
   "Make DIR become the current buffer's default directory.