diff options
| author | Karl Heuer | 1995-04-20 16:21:55 +0000 |
|---|---|---|
| committer | Karl Heuer | 1995-04-20 16:21:55 +0000 |
| commit | e2439696ea341c3b7cf0337ae7190e817cf3451f (patch) | |
| tree | 831a4fa8d778a577ab9b3dabe9d0f69045ef7fc2 | |
| parent | 873828203c80c68d57c2b7014e4f0caf8dde23ba (diff) | |
| download | emacs-e2439696ea341c3b7cf0337ae7190e817cf3451f.tar.gz emacs-e2439696ea341c3b7cf0337ae7190e817cf3451f.zip | |
Change the instructions in the INSTALLATION
comment block to set buffer-local variables like
dired-omit-files-p in dired-mode-hook.
(dired-omit-files-p): Make local to all buffers.
(dired-omit-files): Fix doc string (not buffer-local).
(dired-omit-startup): Don't need to make dired-omit-files-p
local to buffer here.
| -rw-r--r-- | lisp/dired-x.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/dired-x.el b/lisp/dired-x.el index 876b040f2ca..c8aaf780fef 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el | |||
| @@ -43,8 +43,12 @@ | |||
| 43 | ;;; (add-hook 'dired-load-hook | 43 | ;;; (add-hook 'dired-load-hook |
| 44 | ;;; (function (lambda () | 44 | ;;; (function (lambda () |
| 45 | ;;; (load "dired-x") | 45 | ;;; (load "dired-x") |
| 46 | ;;; ;; Set variables here. For example: | 46 | ;;; ;; Set global variables here. For example: |
| 47 | ;;; ;; (setq dired-guess-shell-gnutar "gtar") | 47 | ;;; ;; (setq dired-guess-shell-gnutar "gtar") |
| 48 | ;;; ))) | ||
| 49 | ;;; (add-hook 'dired-mode-hook | ||
| 50 | ;;; (function (lambda () | ||
| 51 | ;;; ;; Set buffer-local variables here. For example: | ||
| 48 | ;;; ;; (setq dired-omit-files-p t) | 52 | ;;; ;; (setq dired-omit-files-p t) |
| 49 | ;;; ))) | 53 | ;;; ))) |
| 50 | ;;; | 54 | ;;; |
| @@ -155,9 +159,10 @@ Read-only folders only work in VM 5, not in VM 4.") | |||
| 155 | Use \\[dired-omit-toggle] to toggle its value. | 159 | Use \\[dired-omit-toggle] to toggle its value. |
| 156 | Uninteresting files are those whose filenames match regexp `dired-omit-files', | 160 | Uninteresting files are those whose filenames match regexp `dired-omit-files', |
| 157 | plus those ending with extensions in `dired-omit-extensions'.") | 161 | plus those ending with extensions in `dired-omit-extensions'.") |
| 162 | (make-variable-buffer-local 'dired-omit-files-p) | ||
| 158 | 163 | ||
| 159 | (defvar dired-omit-files "^#\\|^\\.$\\|^\\.\\.$" | 164 | (defvar dired-omit-files "^#\\|^\\.$\\|^\\.\\.$" |
| 160 | "*Filenames matching this regexp will not be displayed \(buffer-local\). | 165 | "*Filenames matching this regexp will not be displayed. |
| 161 | This only has effect when `dired-omit-files-p' is t. See interactive function | 166 | This only has effect when `dired-omit-files-p' is t. See interactive function |
| 162 | `dired-omit-toggle' \(\\[dired-omit-toggle]\) and variable | 167 | `dired-omit-toggle' \(\\[dired-omit-toggle]\) and variable |
| 163 | `dired-omit-extensions'. The default is to omit `.', `..', and auto-save | 168 | `dired-omit-extensions'. The default is to omit `.', `..', and auto-save |
| @@ -528,7 +533,6 @@ whole pathname.") | |||
| 528 | Should never be used as marker by the user or other packages.") | 533 | Should never be used as marker by the user or other packages.") |
| 529 | 534 | ||
| 530 | (defun dired-omit-startup () | 535 | (defun dired-omit-startup () |
| 531 | (make-local-variable 'dired-omit-files-p) | ||
| 532 | (or (assq 'dired-omit-files-p minor-mode-alist) | 536 | (or (assq 'dired-omit-files-p minor-mode-alist) |
| 533 | (setq minor-mode-alist | 537 | (setq minor-mode-alist |
| 534 | (append '((dired-omit-files-p " Omit")) minor-mode-alist)))) | 538 | (append '((dired-omit-files-p " Omit")) minor-mode-alist)))) |