diff options
| author | Glenn Morris | 2020-01-16 21:53:37 -0800 |
|---|---|---|
| committer | Glenn Morris | 2020-01-16 21:53:37 -0800 |
| commit | e135414b271e71c16e28efc2e3f29b803ab67424 (patch) | |
| tree | e124d1661f105225a2f8d8074c8f4b1ff48cd712 | |
| parent | e32bae617788bc22f2d6643d920ebcafa70a002d (diff) | |
| download | emacs-e135414b271e71c16e28efc2e3f29b803ab67424.tar.gz emacs-e135414b271e71c16e28efc2e3f29b803ab67424.zip | |
Replace doc references to load-hooks
with-eval-after-load is a cleaner, standard feature that works
for every file
* doc/misc/calc.texi (Hooks):
* doc/misc/dired-x.texi (Installation)
(Optional Installation File At Point, Omitting Files in Dired)
(Omitting Examples, Find File At Point):
* doc/misc/ediff.texi (Hooks, Selective Browsing)
(Highlighting Difference Regions):
* doc/misc/efaq.texi (Disabling backups):
* doc/misc/gnus.texi (Startup Variables):
* doc/misc/idlwave.texi (Structure Tag Completion, Misc Options):
* doc/misc/org.texi (Handling Links):
* doc/misc/reftex.texi (Key Bindings, Keymaps and Hooks):
* doc/misc/sem-user.texi (Speedbar):
* doc/misc/speedbar.texi (Hooks, Minor Display Modes):
* doc/misc/viper.texi (Rudimentary Changes):
Replace load-hooks with with-eval-after-load
| -rw-r--r-- | doc/misc/calc.texi | 11 | ||||
| -rw-r--r-- | doc/misc/dired-x.texi | 41 | ||||
| -rw-r--r-- | doc/misc/ediff.texi | 37 | ||||
| -rw-r--r-- | doc/misc/efaq.texi | 5 | ||||
| -rw-r--r-- | doc/misc/gnus.texi | 6 | ||||
| -rw-r--r-- | doc/misc/idlwave.texi | 8 | ||||
| -rw-r--r-- | doc/misc/org.texi | 7 | ||||
| -rw-r--r-- | doc/misc/reftex.texi | 9 | ||||
| -rw-r--r-- | doc/misc/sem-user.texi | 2 | ||||
| -rw-r--r-- | doc/misc/speedbar.texi | 10 | ||||
| -rw-r--r-- | doc/misc/viper.texi | 9 |
11 files changed, 50 insertions, 95 deletions
diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index a89a92d694e..a31f232089b 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi | |||
| @@ -35164,16 +35164,7 @@ which are called at various times. Calc defines a number of hooks | |||
| 35164 | that help you to customize it in various ways. Calc uses the Lisp | 35164 | that help you to customize it in various ways. Calc uses the Lisp |
| 35165 | function @code{run-hooks} to invoke the hooks shown below. Several | 35165 | function @code{run-hooks} to invoke the hooks shown below. Several |
| 35166 | other customization-related variables are also described here. | 35166 | other customization-related variables are also described here. |
| 35167 | 35167 | To run code after Calc has loaded, use @code{with-eval-after-load}. | |
| 35168 | @defvar calc-load-hook | ||
| 35169 | This hook is called at the end of @file{calc.el}, after the file has | ||
| 35170 | been loaded, before any functions in it have been called, but after | ||
| 35171 | @code{calc-mode-map} and similar variables have been set up. | ||
| 35172 | @end defvar | ||
| 35173 | |||
| 35174 | @defvar calc-ext-load-hook | ||
| 35175 | This hook is called at the end of @file{calc-ext.el}. | ||
| 35176 | @end defvar | ||
| 35177 | 35168 | ||
| 35178 | @defvar calc-start-hook | 35169 | @defvar calc-start-hook |
| 35179 | This hook is called as the last step in a @kbd{M-x calc} command. | 35170 | This hook is called as the last step in a @kbd{M-x calc} command. |
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 | |||
| 185 | @file{default.el} in the @file{site-lisp} directory, put | 185 | @file{default.el} in the @file{site-lisp} directory, put |
| 186 | 186 | ||
| 187 | @example | 187 | @example |
| 188 | (add-hook 'dired-load-hook | 188 | (with-eval-after-load 'dired |
| 189 | (lambda () | 189 | (require 'dired-x) |
| 190 | (load "dired-x") | 190 | ;; Set dired-x global variables here. For example: |
| 191 | ;; Set dired-x global variables here. For example: | 191 | ;; (setq dired-guess-shell-gnutar "gtar") |
| 192 | ;; (setq dired-guess-shell-gnutar "gtar") | 192 | ;; (setq dired-x-hands-off-my-keys nil) |
| 193 | ;; (setq dired-x-hands-off-my-keys nil) | 193 | )) |
| 194 | )) | ||
| 195 | (add-hook 'dired-mode-hook | 194 | (add-hook 'dired-mode-hook |
| 196 | (lambda () | 195 | (lambda () |
| 197 | ;; Set dired-x buffer-local variables here. For example: | 196 | ;; 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 | |||
| 242 | or call @code{dired-x-bind-find-file} after changing the value. | 241 | or call @code{dired-x-bind-find-file} after changing the value. |
| 243 | 242 | ||
| 244 | @example | 243 | @example |
| 245 | (add-hook 'dired-load-hook | 244 | (with-eval-after-load 'dired |
| 246 | (lambda () | 245 | ;; Bind dired-x-find-file. |
| 247 | ;; Bind dired-x-find-file. | 246 | (setq dired-x-hands-off-my-keys nil) |
| 248 | (setq dired-x-hands-off-my-keys nil) | 247 | (require 'dired-x)) |
| 249 | (load "dired-x") | ||
| 250 | )) | ||
| 251 | @end example | 248 | @end example |
| 252 | 249 | ||
| 253 | @node Omitting Files in Dired | 250 | @node Omitting Files in Dired |
| @@ -294,8 +291,8 @@ Marked files are never omitted. | |||
| 294 | @end table | 291 | @end table |
| 295 | 292 | ||
| 296 | @noindent | 293 | @noindent |
| 297 | In order to make Dired Omit work you first need to load @file{dired-x.el} | 294 | In order to make Dired Omit work you need to load @file{dired-x} |
| 298 | inside @code{dired-load-hook} (@pxref{Installation}) and then evaluate | 295 | after loading @file{dired} (@pxref{Installation}) and then evaluate |
| 299 | @code{(dired-omit-mode 1)} in some way (@pxref{Omitting Variables}). | 296 | @code{(dired-omit-mode 1)} in some way (@pxref{Omitting Variables}). |
| 300 | 297 | ||
| 301 | @ifnottex | 298 | @ifnottex |
| @@ -410,7 +407,7 @@ The default value is @kbd{C-o}. | |||
| 410 | @item | 407 | @item |
| 411 | @cindex RCS files, how to omit them in Dired | 408 | @cindex RCS files, how to omit them in Dired |
| 412 | @cindex omitting RCS files in Dired | 409 | @cindex omitting RCS files in Dired |
| 413 | If you wish to avoid seeing RCS files and the @file{RCS} directory, then put | 410 | If you wish to avoid seeing RCS files and the @file{RCS} directory, then use |
| 414 | 411 | ||
| 415 | @example | 412 | @example |
| 416 | (setq dired-omit-files | 413 | (setq dired-omit-files |
| @@ -418,7 +415,7 @@ If you wish to avoid seeing RCS files and the @file{RCS} directory, then put | |||
| 418 | @end example | 415 | @end example |
| 419 | 416 | ||
| 420 | @noindent | 417 | @noindent |
| 421 | in the @code{dired-load-hook} (@pxref{Installation}). This assumes | 418 | after loading @file{dired-x} (@pxref{Installation}). This assumes |
| 422 | @code{dired-omit-localp} has its default value of @code{no-dir} to make the | 419 | @code{dired-omit-localp} has its default value of @code{no-dir} to make the |
| 423 | @code{^}-anchored matches work. As a slower alternative, with | 420 | @code{^}-anchored matches work. As a slower alternative, with |
| 424 | @code{dired-omit-localp} set to @code{nil}, you can use @code{/} instead of | 421 | @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 | |||
| 429 | @cindex omitting tib files in Dired | 426 | @cindex omitting tib files in Dired |
| 430 | If you use @code{tib}, the bibliography program for use with @TeX{} and | 427 | If you use @code{tib}, the bibliography program for use with @TeX{} and |
| 431 | @LaTeX{}, and you | 428 | @LaTeX{}, and you |
| 432 | want to omit the @file{INDEX} and the @file{*-t.tex} files, then put | 429 | want to omit the @file{INDEX} and the @file{*-t.tex} files, then use |
| 433 | 430 | ||
| 434 | @example | 431 | @example |
| 435 | (setq dired-omit-files | 432 | (setq dired-omit-files |
| @@ -437,13 +434,13 @@ want to omit the @file{INDEX} and the @file{*-t.tex} files, then put | |||
| 437 | @end example | 434 | @end example |
| 438 | 435 | ||
| 439 | @noindent | 436 | @noindent |
| 440 | in the @code{dired-load-hook} (@pxref{Installation}). | 437 | after loading @file{dired-x} (@pxref{Installation}). |
| 441 | 438 | ||
| 442 | @item | 439 | @item |
| 443 | @cindex dot files, how to omit them in Dired | 440 | @cindex dot files, how to omit them in Dired |
| 444 | @cindex omitting dot files in Dired | 441 | @cindex omitting dot files in Dired |
| 445 | If you do not wish to see @samp{dot} files (files starting with a @file{.}), | 442 | If you do not wish to see @samp{dot} files (files starting with a @file{.}), |
| 446 | then put | 443 | then use |
| 447 | 444 | ||
| 448 | @example | 445 | @example |
| 449 | (setq dired-omit-files | 446 | (setq dired-omit-files |
| @@ -451,7 +448,7 @@ then put | |||
| 451 | @end example | 448 | @end example |
| 452 | 449 | ||
| 453 | @noindent | 450 | @noindent |
| 454 | in the @code{dired-load-hook} (@pxref{Installation}). (Of course, a | 451 | after loading @file{dired-x} (@pxref{Installation}). (Of course, a |
| 455 | better way to achieve this particular goal is simply to omit @samp{-a} from | 452 | better way to achieve this particular goal is simply to omit @samp{-a} from |
| 456 | @code{dired-listing-switches}.) | 453 | @code{dired-listing-switches}.) |
| 457 | 454 | ||
| @@ -830,7 +827,7 @@ When installed @file{dired-x} will substitute @code{dired-x-find-file} for | |||
| 830 | (normally bound to @kbd{C-x 4 C-f}). | 827 | (normally bound to @kbd{C-x 4 C-f}). |
| 831 | 828 | ||
| 832 | In order to use this feature, you will need to set | 829 | In order to use this feature, you will need to set |
| 833 | @code{dired-x-hands-off-my-keys} to @code{nil} inside @code{dired-load-hook} | 830 | @code{dired-x-hands-off-my-keys} to @code{nil} before loading @file{dired-x} |
| 834 | (@pxref{Optional Installation File At Point}). | 831 | (@pxref{Optional Installation File At Point}). |
| 835 | 832 | ||
| 836 | @table @code | 833 | @table @code |
diff --git a/doc/misc/ediff.texi b/doc/misc/ediff.texi index 99ba89b0d7f..1ef13716b11 100644 --- a/doc/misc/ediff.texi +++ b/doc/misc/ediff.texi | |||
| @@ -1197,10 +1197,6 @@ refer to Emacs manual for the information on how to set Emacs X resources. | |||
| 1197 | The bulk of customization can be done via the following hooks: | 1197 | The bulk of customization can be done via the following hooks: |
| 1198 | 1198 | ||
| 1199 | @table @code | 1199 | @table @code |
| 1200 | @item ediff-load-hook | ||
| 1201 | @vindex ediff-load-hook | ||
| 1202 | This hook can be used to change defaults after Ediff is loaded. | ||
| 1203 | |||
| 1204 | @item ediff-before-setup-hook | 1200 | @item ediff-before-setup-hook |
| 1205 | @vindex ediff-before-setup-hook | 1201 | @vindex ediff-before-setup-hook |
| 1206 | Hook that is run just before Ediff rearranges windows to its liking. | 1202 | Hook that is run just before Ediff rearranges windows to its liking. |
| @@ -1211,8 +1207,8 @@ Can be used to save windows configuration. | |||
| 1211 | @vindex ediff-mode-map | 1207 | @vindex ediff-mode-map |
| 1212 | This hook can be used to alter bindings in Ediff's keymap, | 1208 | This hook can be used to alter bindings in Ediff's keymap, |
| 1213 | @code{ediff-mode-map}. These hooks are | 1209 | @code{ediff-mode-map}. These hooks are |
| 1214 | run right after the default bindings are set but before | 1210 | run right after the default bindings are set. |
| 1215 | @code{ediff-load-hook}. The regular user needs not be concerned with this | 1211 | The regular user needs not be concerned with this |
| 1216 | hook---it is provided for implementers of other Emacs packages built on top | 1212 | hook---it is provided for implementers of other Emacs packages built on top |
| 1217 | of Ediff. | 1213 | of Ediff. |
| 1218 | 1214 | ||
| @@ -1545,12 +1541,13 @@ directly (using @kbd{j}) to any numbered | |||
| 1545 | difference. | 1541 | difference. |
| 1546 | 1542 | ||
| 1547 | Users can supply their own functions to specify how Ediff should do | 1543 | Users can supply their own functions to specify how Ediff should do |
| 1548 | selective browsing. To change the default Ediff function, add a function to | 1544 | selective browsing. To change the default Ediff function, use |
| 1549 | @code{ediff-load-hook} which will do the following assignments: | 1545 | something like the following: |
| 1550 | 1546 | ||
| 1551 | @example | 1547 | @example |
| 1552 | (setq ediff-hide-regexp-matches-function 'your-hide-function) | 1548 | (with-eval-after-load 'ediff |
| 1553 | (setq ediff-focus-on-regexp-matches-function 'your-focus-function) | 1549 | (setq ediff-hide-regexp-matches-function 'your-hide-function) |
| 1550 | (setq ediff-focus-on-regexp-matches-function 'your-focus-function)) | ||
| 1554 | @end example | 1551 | @end example |
| 1555 | 1552 | ||
| 1556 | @strong{Useful hint}: To specify a regexp that matches everything, don't | 1553 | @strong{Useful hint}: To specify a regexp that matches everything, don't |
| @@ -1728,23 +1725,17 @@ difference region in buffer A (this face is not a good choice, by the way). | |||
| 1728 | 1725 | ||
| 1729 | If you are unhappy with just @emph{some} of the aspects of the default | 1726 | If you are unhappy with just @emph{some} of the aspects of the default |
| 1730 | faces, you can modify them when Ediff is being loaded using | 1727 | faces, you can modify them when Ediff is being loaded using |
| 1731 | @code{ediff-load-hook}. For instance: | 1728 | @code{with-eval-after-load}. For instance: |
| 1732 | 1729 | ||
| 1733 | @smallexample | 1730 | @smallexample |
| 1734 | (add-hook 'ediff-load-hook | 1731 | (with-eval-after-load 'ediff |
| 1735 | (lambda () | 1732 | (set-face-foreground |
| 1736 | (set-face-foreground | 1733 | ediff-current-diff-face-B "blue") |
| 1737 | ediff-current-diff-face-B "blue") | 1734 | (set-face-background |
| 1738 | (set-face-background | 1735 | ediff-current-diff-face-B "red") |
| 1739 | ediff-current-diff-face-B "red") | 1736 | (make-face-italic ediff-current-diff-face-B)) |
| 1740 | (make-face-italic | ||
| 1741 | ediff-current-diff-face-B))) | ||
| 1742 | @end smallexample | 1737 | @end smallexample |
| 1743 | 1738 | ||
| 1744 | @strong{Please note:} to set Ediff's faces, use only @code{copy-face} | ||
| 1745 | or @code{set/make-face-@dots{}} as shown above. Emacs's low-level | ||
| 1746 | face-manipulation functions should be avoided. | ||
| 1747 | |||
| 1748 | @node Narrowing | 1739 | @node Narrowing |
| 1749 | @section Narrowing | 1740 | @section Narrowing |
| 1750 | 1741 | ||
diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index dcb0a68944e..06c39a53764 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi | |||
| @@ -2533,9 +2533,8 @@ To avoid seeing backup files (and other ``uninteresting'' files) in Dired, | |||
| 2533 | load @code{dired-x} by adding the following to your @file{.emacs} file: | 2533 | load @code{dired-x} by adding the following to your @file{.emacs} file: |
| 2534 | 2534 | ||
| 2535 | @lisp | 2535 | @lisp |
| 2536 | (add-hook 'dired-load-hook | 2536 | (with-eval-after-load 'dired |
| 2537 | (lambda () | 2537 | (require 'dired-x)) |
| 2538 | (require 'dired-x))) | ||
| 2539 | @end lisp | 2538 | @end lisp |
| 2540 | 2539 | ||
| 2541 | With @code{dired-x} loaded, @kbd{M-o} toggles omitting in each dired buffer. | 2540 | With @code{dired-x} loaded, @kbd{M-o} toggles omitting in each dired buffer. |
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 5ec1f022d45..2545d21863a 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi | |||
| @@ -1563,12 +1563,6 @@ secondary select methods. | |||
| 1563 | 1563 | ||
| 1564 | @table @code | 1564 | @table @code |
| 1565 | 1565 | ||
| 1566 | @item gnus-load-hook | ||
| 1567 | @vindex gnus-load-hook | ||
| 1568 | A hook run while Gnus is being loaded. Note that this hook will | ||
| 1569 | normally be run just once in each Emacs session, no matter how many | ||
| 1570 | times you start Gnus. | ||
| 1571 | |||
| 1572 | @item gnus-before-startup-hook | 1566 | @item gnus-before-startup-hook |
| 1573 | @vindex gnus-before-startup-hook | 1567 | @vindex gnus-before-startup-hook |
| 1574 | A hook called as the first thing when Gnus is started. | 1568 | A hook called as the first thing when Gnus is started. |
diff --git a/doc/misc/idlwave.texi b/doc/misc/idlwave.texi index 547b16622fc..5cb6b19181c 100644 --- a/doc/misc/idlwave.texi +++ b/doc/misc/idlwave.texi | |||
| @@ -1805,8 +1805,8 @@ Structure tag completion is not enabled by default. To enable it, | |||
| 1805 | simply add the following to your @file{.emacs}: | 1805 | simply add the following to your @file{.emacs}: |
| 1806 | 1806 | ||
| 1807 | @lisp | 1807 | @lisp |
| 1808 | (add-hook 'idlwave-load-hook | 1808 | (with-eval-after-load 'idlwave |
| 1809 | (lambda () (require 'idlw-complete-structtag))) | 1809 | (require 'idlw-complete-structtag)) |
| 1810 | @end lisp | 1810 | @end lisp |
| 1811 | 1811 | ||
| 1812 | Once enabled, you'll also be able to access online help on the structure | 1812 | Once enabled, you'll also be able to access online help on the structure |
| @@ -2360,10 +2360,6 @@ is first called. | |||
| 2360 | Normal hook. Executed when a buffer is put into @code{idlwave-mode}. | 2360 | Normal hook. Executed when a buffer is put into @code{idlwave-mode}. |
| 2361 | @end defopt | 2361 | @end defopt |
| 2362 | 2362 | ||
| 2363 | @defopt idlwave-load-hook | ||
| 2364 | Normal hook. Executed when @file{idlwave.el} is loaded. | ||
| 2365 | @end defopt | ||
| 2366 | |||
| 2367 | @node The IDLWAVE Shell | 2363 | @node The IDLWAVE Shell |
| 2368 | @chapter The IDLWAVE Shell | 2364 | @chapter The IDLWAVE Shell |
| 2369 | @cindex IDLWAVE shell | 2365 | @cindex IDLWAVE shell |
diff --git a/doc/misc/org.texi b/doc/misc/org.texi index 0de91fa803b..897979610ec 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi | |||
| @@ -3979,10 +3979,9 @@ key bindings for this are really too long; you might want to bind | |||
| 3979 | this also to @kbd{M-n} and @kbd{M-p}. | 3979 | this also to @kbd{M-n} and @kbd{M-p}. |
| 3980 | 3980 | ||
| 3981 | @lisp | 3981 | @lisp |
| 3982 | (add-hook 'org-load-hook | 3982 | (with-eval-after-load 'org |
| 3983 | (lambda () | 3983 | (define-key org-mode-map "\M-n" 'org-next-link) |
| 3984 | (define-key org-mode-map "\M-n" 'org-next-link) | 3984 | (define-key org-mode-map "\M-p" 'org-previous-link)) |
| 3985 | (define-key org-mode-map "\M-p" 'org-previous-link))) | ||
| 3986 | @end lisp | 3985 | @end lisp |
| 3987 | @end table | 3986 | @end table |
| 3988 | 3987 | ||
diff --git a/doc/misc/reftex.texi b/doc/misc/reftex.texi index 013c5639a1e..0dab5241517 100644 --- a/doc/misc/reftex.texi +++ b/doc/misc/reftex.texi | |||
| @@ -2896,9 +2896,8 @@ default. If you want to have these key bindings available, set in your | |||
| 2896 | Note that this variable has to be set before @RefTeX{} is loaded to | 2896 | Note that this variable has to be set before @RefTeX{} is loaded to |
| 2897 | have an effect. | 2897 | have an effect. |
| 2898 | 2898 | ||
| 2899 | @vindex reftex-load-hook | 2899 | Changing and adding to @RefTeX{}'s key bindings is best done using |
| 2900 | Changing and adding to @RefTeX{}'s key bindings is best done in the hook | 2900 | @code{with-eval-after-load}. For information on the keymaps |
| 2901 | @code{reftex-load-hook}. For information on the keymaps | ||
| 2902 | which should be used to add keys, see @ref{Keymaps and Hooks}. | 2901 | which should be used to add keys, see @ref{Keymaps and Hooks}. |
| 2903 | 2902 | ||
| 2904 | @node Faces | 2903 | @node Faces |
| @@ -5320,10 +5319,6 @@ argument. | |||
| 5320 | The keymap for @RefTeX{} mode. | 5319 | The keymap for @RefTeX{} mode. |
| 5321 | @end deffn | 5320 | @end deffn |
| 5322 | 5321 | ||
| 5323 | @deffn {Normal Hook} reftex-load-hook | ||
| 5324 | Normal hook which is being run when loading @file{reftex.el}. | ||
| 5325 | @end deffn | ||
| 5326 | |||
| 5327 | @deffn {Normal Hook} reftex-mode-hook | 5322 | @deffn {Normal Hook} reftex-mode-hook |
| 5328 | Normal hook which is being run when turning on @RefTeX{} mode. | 5323 | Normal hook which is being run when turning on @RefTeX{} mode. |
| 5329 | @end deffn | 5324 | @end deffn |
diff --git a/doc/misc/sem-user.texi b/doc/misc/sem-user.texi index c02887d104a..d151cee02cc 100644 --- a/doc/misc/sem-user.texi +++ b/doc/misc/sem-user.texi | |||
| @@ -1068,7 +1068,7 @@ You can integrate @semantic{} with the Speedbar. | |||
| 1068 | line to your init file: | 1068 | line to your init file: |
| 1069 | 1069 | ||
| 1070 | @example | 1070 | @example |
| 1071 | (add-hook 'speedbar-load-hook (lambda () (require 'semantic/sb))) | 1071 | (with-eval-after-load 'speedbar (require 'semantic/sb)) |
| 1072 | @end example | 1072 | @end example |
| 1073 | 1073 | ||
| 1074 | @noindent | 1074 | @noindent |
diff --git a/doc/misc/speedbar.texi b/doc/misc/speedbar.texi index 57ad0220103..c9c3daf963b 100644 --- a/doc/misc/speedbar.texi +++ b/doc/misc/speedbar.texi | |||
| @@ -828,9 +828,6 @@ Hooks run when speedbar visits a file in the selected frame. | |||
| 828 | @cindex @code{speedbar-visiting-tag-hook} | 828 | @cindex @code{speedbar-visiting-tag-hook} |
| 829 | @item speedbar-visiting-tag-hook | 829 | @item speedbar-visiting-tag-hook |
| 830 | Hooks run when speedbar visits a tag in the selected frame. | 830 | Hooks run when speedbar visits a tag in the selected frame. |
| 831 | @cindex @code{speedbar-load-hook} | ||
| 832 | @item speedbar-load-hook | ||
| 833 | Hooks run when speedbar is loaded. | ||
| 834 | @cindex @code{speedbar-reconfigure-keymaps-hook} | 831 | @cindex @code{speedbar-reconfigure-keymaps-hook} |
| 835 | @item speedbar-reconfigure-keymaps-hook | 832 | @item speedbar-reconfigure-keymaps-hook |
| 836 | Hooks run when the keymaps are regenerated. Keymaps are reconfigured | 833 | Hooks run when the keymaps are regenerated. Keymaps are reconfigured |
| @@ -913,12 +910,11 @@ bindings: | |||
| 913 | This function creates a special keymap for use in speedbar. | 910 | This function creates a special keymap for use in speedbar. |
| 914 | 911 | ||
| 915 | @item | 912 | @item |
| 916 | Call your install function, or assign it to a hook like this: | 913 | Call your install function, like this: |
| 917 | 914 | ||
| 918 | @smallexample | 915 | @smallexample |
| 919 | (if (featurep 'speedbar) | 916 | (with-eval-after-load 'speedbar |
| 920 | (@var{name}-install-speedbar-variables) | 917 | (@var{name}-install-speedbar-variables)) |
| 921 | (add-hook 'speedbar-load-hook '@var{name}-install-speedbar-variables)) | ||
| 922 | @end smallexample | 918 | @end smallexample |
| 923 | 919 | ||
| 924 | @item | 920 | @item |
diff --git a/doc/misc/viper.texi b/doc/misc/viper.texi index 9ce809e7d4d..661eb7c947a 100644 --- a/doc/misc/viper.texi +++ b/doc/misc/viper.texi | |||
| @@ -1752,10 +1752,10 @@ state. If @code{nil}, the cursor stays where it was before the switch. | |||
| 1752 | @item viper-always t | 1752 | @item viper-always t |
| 1753 | @code{t} means: leave it to Viper to decide when a buffer must be brought | 1753 | @code{t} means: leave it to Viper to decide when a buffer must be brought |
| 1754 | up in Vi state, | 1754 | up in Vi state, |
| 1755 | Insert state, or Emacs state. This heuristics works well in virtually all | 1755 | Insert state, or Emacs state. This heuristic works well in virtually all |
| 1756 | cases. @code{nil} means you either has to invoke @code{viper-mode} manually | 1756 | cases. @code{nil} means you either have to invoke @code{viper-mode} manually |
| 1757 | for each buffer (or you can add @code{viper-mode} to the appropriate major mode | 1757 | for each buffer (or you can add @code{viper-mode} to the appropriate major mode |
| 1758 | hooks using @code{viper-load-hook}). | 1758 | hooks using @code{with-eval-after-load}). |
| 1759 | 1759 | ||
| 1760 | This option must be set in your Viper customization file. | 1760 | This option must be set in your Viper customization file. |
| 1761 | @item viper-custom-file-name "~/.emacs.d/viper" | 1761 | @item viper-custom-file-name "~/.emacs.d/viper" |
| @@ -1903,9 +1903,6 @@ List of (parameterless) functions called just after entering Replace state | |||
| 1903 | @item viper-emacs-state-hook nil | 1903 | @item viper-emacs-state-hook nil |
| 1904 | List of (parameterless) functions called just after switching from Vi state | 1904 | List of (parameterless) functions called just after switching from Vi state |
| 1905 | to Emacs state. | 1905 | to Emacs state. |
| 1906 | @item viper-load-hook nil | ||
| 1907 | List of (parameterless) functions called just after loading Viper. This is | ||
| 1908 | the last chance to do customization before Viper is up and running. | ||
| 1909 | @end table | 1906 | @end table |
| 1910 | @noindent | 1907 | @noindent |
| 1911 | You can reset some of these constants in Viper with the Ex command @kbd{:set} | 1908 | You can reset some of these constants in Viper with the Ex command @kbd{:set} |