diff options
| author | Juanma Barranquero | 2009-09-25 04:35:14 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2009-09-25 04:35:14 +0000 |
| commit | 11ee8d90b26358e6a0850e712705c5b4e8db1b8f (patch) | |
| tree | 1f9bc5c77ae10e3fa481d0bdda56d8a0c63eca4a | |
| parent | 21289c5dad0989097dde494c84d7a6177393344b (diff) | |
| download | emacs-11ee8d90b26358e6a0850e712705c5b4e8db1b8f.tar.gz emacs-11ee8d90b26358e6a0850e712705c5b4e8db1b8f.zip | |
* 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.
| -rw-r--r-- | lisp/ChangeLog | 13 | ||||
| -rw-r--r-- | lisp/dired.el | 8 | ||||
| -rw-r--r-- | lisp/files.el | 2 | ||||
| -rw-r--r-- | lisp/menu-bar.el | 5 | ||||
| -rw-r--r-- | lisp/pcvs-util.el | 2 | ||||
| -rw-r--r-- | lisp/pcvs.el | 6 | ||||
| -rw-r--r-- | lisp/shell.el | 3 | ||||
| -rw-r--r-- | lisp/vc-dir.el | 3 |
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 @@ | |||
| 1 | 2009-09-25 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * menu-bar.el (list-buffers-directory): Add docstring. | ||
| 4 | Make automatically buffer-local. | ||
| 5 | |||
| 6 | * dired.el (dired-mode): | ||
| 7 | * files.el (cd-absolute): | ||
| 8 | * pcvs.el (cvs-temp-buffer): | ||
| 9 | * pcvs-util.el (cvs-get-buffer-create): | ||
| 10 | * shell.el (shell-mode): | ||
| 11 | * vc-dir.el (vc-dir-mode): | ||
| 12 | Don't make `list-buffers-directory' buffer local. | ||
| 13 | |||
| 1 | 2009-09-25 Devon Sean McCullough <emacs-hacker@Jovi.Net> | 14 | 2009-09-25 Devon Sean McCullough <emacs-hacker@Jovi.Net> |
| 2 | 15 | ||
| 3 | * comint.el (comint-exec, comint-run, make-comint): Doc | 16 | * 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: | |||
| 1750 | (set (make-local-variable 'dired-directory) | 1750 | (set (make-local-variable 'dired-directory) |
| 1751 | (or dirname default-directory)) | 1751 | (or dirname default-directory)) |
| 1752 | ;; list-buffers uses this to display the dir being edited in this buffer. | 1752 | ;; list-buffers uses this to display the dir being edited in this buffer. |
| 1753 | (set (make-local-variable 'list-buffers-directory) | 1753 | (setq list-buffers-directory |
| 1754 | (expand-file-name (if (listp dired-directory) | 1754 | (expand-file-name (if (listp dired-directory) |
| 1755 | (car dired-directory) | 1755 | (car dired-directory) |
| 1756 | dired-directory))) | 1756 | dired-directory))) |
| 1757 | (set (make-local-variable 'dired-actual-switches) | 1757 | (set (make-local-variable 'dired-actual-switches) |
| 1758 | (or switches dired-listing-switches)) | 1758 | (or switches dired-listing-switches)) |
| 1759 | (set (make-local-variable 'font-lock-defaults) | 1759 | (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' | |||
| 656 | (unless (file-executable-p dir) | 656 | (unless (file-executable-p dir) |
| 657 | (error "Cannot cd to %s: Permission denied" dir)) | 657 | (error "Cannot cd to %s: Permission denied" dir)) |
| 658 | (setq default-directory dir) | 658 | (setq default-directory dir) |
| 659 | (set (make-local-variable 'list-buffers-directory) dir))) | 659 | (setq list-buffers-directory dir))) |
| 660 | 660 | ||
| 661 | (defun cd (dir) | 661 | (defun cd (dir) |
| 662 | "Make DIR become the current buffer's default directory. | 662 | "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." | |||
| 1687 | :type 'boolean | 1687 | :type 'boolean |
| 1688 | :group 'menu) | 1688 | :group 'menu) |
| 1689 | 1689 | ||
| 1690 | (defvar list-buffers-directory nil) | 1690 | (defvar list-buffers-directory nil |
| 1691 | "String to display in buffer listings for buffers not visiting a file. | ||
| 1692 | Dired, shell and other modes use this variable.") | ||
| 1693 | (make-variable-buffer-local 'list-buffers-directory) | ||
| 1691 | 1694 | ||
| 1692 | (defun menu-bar-select-buffer () | 1695 | (defun menu-bar-select-buffer () |
| 1693 | (interactive) | 1696 | (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." | |||
| 135 | (when (equal name list-buffers-directory) | 135 | (when (equal name list-buffers-directory) |
| 136 | (return buf))))) | 136 | (return buf))))) |
| 137 | (with-current-buffer (create-file-buffer name) | 137 | (with-current-buffer (create-file-buffer name) |
| 138 | (set (make-local-variable 'list-buffers-directory) name) | 138 | (setq list-buffers-directory name) |
| 139 | (current-buffer)))) | 139 | (current-buffer)))) |
| 140 | 140 | ||
| 141 | ;;;; | 141 | ;;;; |
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." | |||
| 399 | ;;(cvs-minor-mode 1) | 399 | ;;(cvs-minor-mode 1) |
| 400 | (let ((lbd list-buffers-directory)) | 400 | (let ((lbd list-buffers-directory)) |
| 401 | (if (fboundp mode) (funcall mode) (fundamental-mode)) | 401 | (if (fboundp mode) (funcall mode) (fundamental-mode)) |
| 402 | (when lbd (set (make-local-variable 'list-buffers-directory) lbd))) | 402 | (when lbd (setq list-buffers-directory lbd))) |
| 403 | (cvs-minor-mode 1) | 403 | (cvs-minor-mode 1) |
| 404 | ;;(set (make-local-variable 'cvs-buffer) cvs-buf) | 404 | ;;(set (make-local-variable 'cvs-buffer) cvs-buf) |
| 405 | (if normal | 405 | (if normal |
| @@ -1456,7 +1456,7 @@ The POSTPROC specified there (typically `log-edit') is then called, | |||
| 1456 | (let ((buf (cvs-temp-buffer "message" 'normal 'nosetup)) | 1456 | (let ((buf (cvs-temp-buffer "message" 'normal 'nosetup)) |
| 1457 | (setupfun (or (nth 2 (cdr (assoc "message" cvs-buffer-name-alist))) | 1457 | (setupfun (or (nth 2 (cdr (assoc "message" cvs-buffer-name-alist))) |
| 1458 | 'log-edit))) | 1458 | 'log-edit))) |
| 1459 | (funcall setupfun 'cvs-do-commit setup | 1459 | (funcall setupfun 'cvs-do-commit setup |
| 1460 | '((log-edit-listfun . cvs-commit-filelist) | 1460 | '((log-edit-listfun . cvs-commit-filelist) |
| 1461 | (log-edit-diff-function . cvs-mode-diff)) buf) | 1461 | (log-edit-diff-function . cvs-mode-diff)) buf) |
| 1462 | (set (make-local-variable 'cvs-minor-wrap-function) 'cvs-commit-minor-wrap) | 1462 | (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." | |||
| 1521 | ;; Set the filename before, so log-edit can correctly setup its | 1521 | ;; Set the filename before, so log-edit can correctly setup its |
| 1522 | ;; log-edit-initial-files variable. | 1522 | ;; log-edit-initial-files variable. |
| 1523 | (set (make-local-variable 'cvs-edit-log-files) (list file))) | 1523 | (set (make-local-variable 'cvs-edit-log-files) (list file))) |
| 1524 | (funcall setupfun 'cvs-do-edit-log nil | 1524 | (funcall setupfun 'cvs-do-edit-log nil |
| 1525 | '((log-edit-listfun . cvs-edit-log-filelist) | 1525 | '((log-edit-listfun . cvs-edit-log-filelist) |
| 1526 | (log-edit-diff-function . cvs-mode-diff)) | 1526 | (log-edit-diff-function . cvs-mode-diff)) |
| 1527 | buf) | 1527 | 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." | |||
| 440 | (make-local-variable 'shell-last-dir) | 440 | (make-local-variable 'shell-last-dir) |
| 441 | (setq shell-last-dir nil) | 441 | (setq shell-last-dir nil) |
| 442 | (setq comint-input-autoexpand shell-input-autoexpand) | 442 | (setq comint-input-autoexpand shell-input-autoexpand) |
| 443 | (shell-dirtrack-mode 1) | ||
| 443 | ;; This is not really correct, since the shell buffer does not really | 444 | ;; This is not really correct, since the shell buffer does not really |
| 444 | ;; edit this directory. But it is useful in the buffer list and menus. | 445 | ;; edit this directory. But it is useful in the buffer list and menus. |
| 445 | (make-local-variable 'list-buffers-directory) | ||
| 446 | (shell-dirtrack-mode 1) | ||
| 447 | (setq list-buffers-directory (expand-file-name default-directory)) | 446 | (setq list-buffers-directory (expand-file-name default-directory)) |
| 448 | ;; shell-dependent assignments. | 447 | ;; shell-dependent assignments. |
| 449 | (when (ring-empty-p comint-input-ring) | 448 | (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. | |||
| 928 | (set (make-local-variable 'vc-ewoc) (ewoc-create #'vc-dir-printer)) | 928 | (set (make-local-variable 'vc-ewoc) (ewoc-create #'vc-dir-printer)) |
| 929 | (set (make-local-variable 'revert-buffer-function) | 929 | (set (make-local-variable 'revert-buffer-function) |
| 930 | 'vc-dir-revert-buffer-function) | 930 | 'vc-dir-revert-buffer-function) |
| 931 | (set (make-local-variable 'list-buffers-directory) | 931 | (setq list-buffers-directory (expand-file-name default-directory)) |
| 932 | (expand-file-name default-directory)) | ||
| 933 | (add-hook 'after-save-hook 'vc-dir-resynch-file) | 932 | (add-hook 'after-save-hook 'vc-dir-resynch-file) |
| 934 | ;; Make sure that if the directory buffer is killed, the update | 933 | ;; Make sure that if the directory buffer is killed, the update |
| 935 | ;; process running in the background is also killed. | 934 | ;; process running in the background is also killed. |