From cfef87adf1b4f4300b9f8f1548a6f2505921fd81 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 29 Dec 2007 12:59:09 +0000 Subject: [PATCH] (cd-absolute): Fix omission bug: Make `list-buffers-directory' buffer-local. --- lisp/ChangeLog | 5 +++++ lisp/files.el | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a879da74a68..dec21f2d630 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-12-29 Thien-Thi Nguyen + + * files.el (cd-absolute): Fix omission bug: + Make `list-buffers-directory' buffer-local. + 2007-12-29 Dan Nicolaescu * vc-hg.el (vc-hg-dir-state): Deal with the up-to-date state. diff --git a/lisp/files.el b/lisp/files.el index dec47ce362e..75dfb089c51 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -635,10 +635,10 @@ Directories are separated by occurrences of `path-separator' (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. -- 2.39.2