diff options
Diffstat (limited to 'doc/misc/dired-x.texi')
-rw-r--r-- | doc/misc/dired-x.texi | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/doc/misc/dired-x.texi b/doc/misc/dired-x.texi index 5965da16bb7..d7497806602 100644 --- a/doc/misc/dired-x.texi +++ b/doc/misc/dired-x.texi @@ -185,13 +185,12 @@ In your @file{~/.emacs} file, or in the system-wide initialization file @file{default.el} in the @file{site-lisp} directory, put @example -(add-hook 'dired-load-hook - (lambda () - (load "dired-x") - ;; Set dired-x global variables here. For example: - ;; (setq dired-guess-shell-gnutar "gtar") - ;; (setq dired-x-hands-off-my-keys nil) - )) +(with-eval-after-load 'dired + (require 'dired-x) + ;; Set dired-x global variables here. For example: + ;; (setq dired-guess-shell-gnutar "gtar") + ;; (setq dired-x-hands-off-my-keys nil) + )) (add-hook 'dired-mode-hook (lambda () ;; Set dired-x buffer-local variables here. For example: @@ -242,12 +241,10 @@ If you choose to have @file{dired-x.el} bind @code{dired-x-find-file} over or call @code{dired-x-bind-find-file} after changing the value. @example -(add-hook 'dired-load-hook - (lambda () - ;; Bind dired-x-find-file. - (setq dired-x-hands-off-my-keys nil) - (load "dired-x") - )) +(with-eval-after-load 'dired + ;; Bind dired-x-find-file. + (setq dired-x-hands-off-my-keys nil) + (require 'dired-x)) @end example @node Omitting Files in Dired @@ -294,8 +291,8 @@ Marked files are never omitted. @end table @noindent -In order to make Dired Omit work you first need to load @file{dired-x.el} -inside @code{dired-load-hook} (@pxref{Installation}) and then evaluate +In order to make Dired Omit work you need to load @file{dired-x} +after loading @file{dired} (@pxref{Installation}) and then evaluate @code{(dired-omit-mode 1)} in some way (@pxref{Omitting Variables}). @ifnottex @@ -410,7 +407,7 @@ The default value is @kbd{C-o}. @item @cindex RCS files, how to omit them in Dired @cindex omitting RCS files in Dired -If you wish to avoid seeing RCS files and the @file{RCS} directory, then put +If you wish to avoid seeing RCS files and the @file{RCS} directory, then use @example (setq dired-omit-files @@ -418,7 +415,7 @@ If you wish to avoid seeing RCS files and the @file{RCS} directory, then put @end example @noindent -in the @code{dired-load-hook} (@pxref{Installation}). This assumes +after loading @file{dired-x} (@pxref{Installation}). This assumes @code{dired-omit-localp} has its default value of @code{no-dir} to make the @code{^}-anchored matches work. As a slower alternative, with @code{dired-omit-localp} set to @code{nil}, you can use @code{/} instead of @@ -429,7 +426,7 @@ in the @code{dired-load-hook} (@pxref{Installation}). This assumes @cindex omitting tib files in Dired If you use @code{tib}, the bibliography program for use with @TeX{} and @LaTeX{}, and you -want to omit the @file{INDEX} and the @file{*-t.tex} files, then put +want to omit the @file{INDEX} and the @file{*-t.tex} files, then use @example (setq dired-omit-files @@ -437,13 +434,13 @@ want to omit the @file{INDEX} and the @file{*-t.tex} files, then put @end example @noindent -in the @code{dired-load-hook} (@pxref{Installation}). +after loading @file{dired-x} (@pxref{Installation}). @item @cindex dot files, how to omit them in Dired @cindex omitting dot files in Dired If you do not wish to see @samp{dot} files (files starting with a @file{.}), -then put +then use @example (setq dired-omit-files @@ -451,7 +448,7 @@ then put @end example @noindent -in the @code{dired-load-hook} (@pxref{Installation}). (Of course, a +after loading @file{dired-x} (@pxref{Installation}). (Of course, a better way to achieve this particular goal is simply to omit @samp{-a} from @code{dired-listing-switches}.) @@ -830,7 +827,7 @@ When installed @file{dired-x} will substitute @code{dired-x-find-file} for (normally bound to @kbd{C-x 4 C-f}). In order to use this feature, you will need to set -@code{dired-x-hands-off-my-keys} to @code{nil} inside @code{dired-load-hook} +@code{dired-x-hands-off-my-keys} to @code{nil} before loading @file{dired-x} (@pxref{Optional Installation File At Point}). @table @code |