summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2009-09-25 04:35:14 +0000
committerJuanma Barranquero <lekktu@gmail.com>2009-09-25 04:35:14 +0000
commit11ee8d90b26358e6a0850e712705c5b4e8db1b8f (patch)
tree1f9bc5c77ae10e3fa481d0bdda56d8a0c63eca4a /lisp
parent21289c5dad0989097dde494c84d7a6177393344b (diff)
downloademacs-11ee8d90b26358e6a0850e712705c5b4e8db1b8f.tar.gz
* menu-bar.el (list-buffers-directory): Add docstring.
Make automatically buffer-local. * dired.el (dired-mode): * files.el (cd-absolute): * pcvs.el (cvs-temp-buffer): * pcvs-util.el (cvs-get-buffer-create): * shell.el (shell-mode): * vc-dir.el (vc-dir-mode): Don't make `list-buffers-directory' buffer local.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog13
-rw-r--r--lisp/dired.el8
-rw-r--r--lisp/files.el2
-rw-r--r--lisp/menu-bar.el5
-rw-r--r--lisp/pcvs-util.el2
-rw-r--r--lisp/pcvs.el6
-rw-r--r--lisp/shell.el3
-rw-r--r--lisp/vc-dir.el3
8 files changed, 28 insertions, 14 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index bbfdf59a5bf..b0a45070495 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,16 @@
+2009-09-25 Juanma Barranquero <lekktu@gmail.com>
+
+ * menu-bar.el (list-buffers-directory): Add docstring.
+ Make automatically buffer-local.
+
+ * dired.el (dired-mode):
+ * files.el (cd-absolute):
+ * pcvs.el (cvs-temp-buffer):
+ * pcvs-util.el (cvs-get-buffer-create):
+ * shell.el (shell-mode):
+ * vc-dir.el (vc-dir-mode):
+ Don't make `list-buffers-directory' buffer local.
+
2009-09-25 Devon Sean McCullough <emacs-hacker@Jovi.Net>
* comint.el (comint-exec, comint-run, make-comint): Doc
diff --git a/lisp/dired.el b/lisp/dired.el
index 0de8022dcc4..1785c787e7b 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1750,10 +1750,10 @@ Keybindings:
(set (make-local-variable 'dired-directory)
(or dirname default-directory))
;; list-buffers uses this to display the dir being edited in this buffer.
- (set (make-local-variable 'list-buffers-directory)
- (expand-file-name (if (listp dired-directory)
- (car dired-directory)
- dired-directory)))
+ (setq list-buffers-directory
+ (expand-file-name (if (listp dired-directory)
+ (car dired-directory)
+ dired-directory)))
(set (make-local-variable 'dired-actual-switches)
(or switches dired-listing-switches))
(set (make-local-variable 'font-lock-defaults)
diff --git a/lisp/files.el b/lisp/files.el
index 9d6218cc4eb..6e3fe605025 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -656,7 +656,7 @@ Directories are separated by occurrences of `path-separator'
(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)))
+ (setq list-buffers-directory dir)))
(defun cd (dir)
"Make DIR become the current buffer's default directory.
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index bbaa3d1a88c..768a633b8ba 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -1687,7 +1687,10 @@ Buffers menu is regenerated."
:type 'boolean
:group 'menu)
-(defvar list-buffers-directory nil)
+(defvar list-buffers-directory nil
+ "String to display in buffer listings for buffers not visiting a file.
+Dired, shell and other modes use this variable.")
+(make-variable-buffer-local 'list-buffers-directory)
(defun menu-bar-select-buffer ()
(interactive)
diff --git a/lisp/pcvs-util.el b/lisp/pcvs-util.el
index 5d786a6538a..e40caae6b14 100644
--- a/lisp/pcvs-util.el
+++ b/lisp/pcvs-util.el
@@ -135,7 +135,7 @@ If NOREUSE is non-nil, always return a new buffer."
(when (equal name list-buffers-directory)
(return buf)))))
(with-current-buffer (create-file-buffer name)
- (set (make-local-variable 'list-buffers-directory) name)
+ (setq list-buffers-directory name)
(current-buffer))))
;;;;
diff --git a/lisp/pcvs.el b/lisp/pcvs.el
index c184e22019c..448360665b5 100644
--- a/lisp/pcvs.el
+++ b/lisp/pcvs.el
@@ -399,7 +399,7 @@ from the current buffer."
;;(cvs-minor-mode 1)
(let ((lbd list-buffers-directory))
(if (fboundp mode) (funcall mode) (fundamental-mode))
- (when lbd (set (make-local-variable 'list-buffers-directory) lbd)))
+ (when lbd (setq list-buffers-directory lbd)))
(cvs-minor-mode 1)
;;(set (make-local-variable 'cvs-buffer) cvs-buf)
(if normal
@@ -1456,7 +1456,7 @@ The POSTPROC specified there (typically `log-edit') is then called,
(let ((buf (cvs-temp-buffer "message" 'normal 'nosetup))
(setupfun (or (nth 2 (cdr (assoc "message" cvs-buffer-name-alist)))
'log-edit)))
- (funcall setupfun 'cvs-do-commit setup
+ (funcall setupfun 'cvs-do-commit setup
'((log-edit-listfun . cvs-commit-filelist)
(log-edit-diff-function . cvs-mode-diff)) buf)
(set (make-local-variable 'cvs-minor-wrap-function) 'cvs-commit-minor-wrap)
@@ -1521,7 +1521,7 @@ This is best called from a `log-view-mode' buffer."
;; Set the filename before, so log-edit can correctly setup its
;; log-edit-initial-files variable.
(set (make-local-variable 'cvs-edit-log-files) (list file)))
- (funcall setupfun 'cvs-do-edit-log nil
+ (funcall setupfun 'cvs-do-edit-log nil
'((log-edit-listfun . cvs-edit-log-filelist)
(log-edit-diff-function . cvs-mode-diff))
buf)
diff --git a/lisp/shell.el b/lisp/shell.el
index 48488cec682..dde06ef075f 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -440,10 +440,9 @@ buffer."
(make-local-variable 'shell-last-dir)
(setq shell-last-dir nil)
(setq comint-input-autoexpand shell-input-autoexpand)
+ (shell-dirtrack-mode 1)
;; This is not really correct, since the shell buffer does not really
;; edit this directory. But it is useful in the buffer list and menus.
- (make-local-variable 'list-buffers-directory)
- (shell-dirtrack-mode 1)
(setq list-buffers-directory (expand-file-name default-directory))
;; shell-dependent assignments.
(when (ring-empty-p comint-input-ring)
diff --git a/lisp/vc-dir.el b/lisp/vc-dir.el
index c87366b8294..b20e67b9488 100644
--- a/lisp/vc-dir.el
+++ b/lisp/vc-dir.el
@@ -928,8 +928,7 @@ the *vc-dir* buffer.
(set (make-local-variable 'vc-ewoc) (ewoc-create #'vc-dir-printer))
(set (make-local-variable 'revert-buffer-function)
'vc-dir-revert-buffer-function)
- (set (make-local-variable 'list-buffers-directory)
- (expand-file-name default-directory))
+ (setq list-buffers-directory (expand-file-name default-directory))
(add-hook 'after-save-hook 'vc-dir-resynch-file)
;; Make sure that if the directory buffer is killed, the update
;; process running in the background is also killed.