Commit 11ee8d90 authored by Juanma Barranquero's avatar Juanma Barranquero
Browse files

* 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.
parent 21289c5d
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
......
......@@ -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)
......
......@@ -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.
......
......@@ -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)
......
......@@ -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))))
;;;;
......
......@@ -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)
......
......@@ -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)
......
......@@ -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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment