Mercurial > emacs
comparison lisp/dired-x.el @ 11500:1bae87dcd653
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.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Thu, 20 Apr 1995 16:21:55 +0000 |
parents | 97da4cb32d03 |
children | 3ddbf9b31cf0 |
comparison
equal
deleted
inserted
replaced
11499:24ae4a1359b8 | 11500:1bae87dcd653 |
---|---|
41 ;;; INSTALLATION: In your ~/.emacs, | 41 ;;; INSTALLATION: In your ~/.emacs, |
42 ;;; | 42 ;;; |
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 ;;; |
51 ;;; At load time dired-x.el will install itself, redefine some functions, and | 55 ;;; At load time dired-x.el will install itself, redefine some functions, and |
52 ;;; bind some dired keys. *Please* see the info pages for more details. | 56 ;;; bind some dired keys. *Please* see the info pages for more details. |
153 (defvar dired-omit-files-p nil | 157 (defvar dired-omit-files-p nil |
154 "*If non-nil, \"uninteresting\" files are not listed (buffer-local). | 158 "*If non-nil, \"uninteresting\" files are not listed (buffer-local). |
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 |
164 files.") | 169 files.") |
165 | 170 |
526 (defvar dired-omit-marker-char ?\017 | 531 (defvar dired-omit-marker-char ?\017 |
527 "Temporary marker used by by dired-omit. | 532 "Temporary marker used by by dired-omit. |
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)))) |
535 | 539 |
536 (defun dired-omit-toggle (&optional flag) | 540 (defun dired-omit-toggle (&optional flag) |