diff options
| author | Glenn Morris | 2020-01-16 21:21:29 -0800 |
|---|---|---|
| committer | Glenn Morris | 2020-01-16 21:21:29 -0800 |
| commit | e32bae617788bc22f2d6643d920ebcafa70a002d (patch) | |
| tree | 7c4e5f8fc6245285a88623fcb4e259e449768f3b | |
| parent | 98c6416bfd31b7f19de4b6289715cc73df3c6394 (diff) | |
| download | emacs-e32bae617788bc22f2d6643d920ebcafa70a002d.tar.gz emacs-e32bae617788bc22f2d6643d920ebcafa70a002d.zip | |
Replace add-hook load-hook with with-eval-after-load
* lisp/info.el (Info-install-speedbar-variables):
* lisp/cedet/ede.el (speedbar):
* lisp/cedet/semantic/imenu.el (speedbar):
* lisp/emacs-lisp/eieio-opt.el (eieio-class-speedbar-key-map):
* lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar-create):
* lisp/erc/erc-speedbar.el (erc-install-speedbar-variables):
* lisp/mail/rmail.el (rmail-install-speedbar-variables):
* lisp/progmodes/gud.el (gud-install-speedbar-variables):
Use with-eval-after-load.
| -rw-r--r-- | lisp/cedet/ede.el | 5 | ||||
| -rw-r--r-- | lisp/cedet/semantic/imenu.el | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/eieio-opt.el | 9 | ||||
| -rw-r--r-- | lisp/emacs-lisp/eieio-speedbar.el | 6 | ||||
| -rw-r--r-- | lisp/erc/erc-speedbar.el | 5 | ||||
| -rw-r--r-- | lisp/info.el | 5 | ||||
| -rw-r--r-- | lisp/mail/rmail.el | 5 | ||||
| -rw-r--r-- | lisp/progmodes/gud.el | 5 |
8 files changed, 14 insertions, 31 deletions
diff --git a/lisp/cedet/ede.el b/lisp/cedet/ede.el index 1418ad9539d..c2036878288 100644 --- a/lisp/cedet/ede.el +++ b/lisp/cedet/ede.el | |||
| @@ -1527,8 +1527,7 @@ It does not apply the value to buffers." | |||
| 1527 | 1527 | ||
| 1528 | ;; If this does not occur after the provide, we can get a recursive | 1528 | ;; If this does not occur after the provide, we can get a recursive |
| 1529 | ;; load. Yuck! | 1529 | ;; load. Yuck! |
| 1530 | (if (featurep 'speedbar) | 1530 | (with-eval-after-load 'speedbar |
| 1531 | (ede-speedbar-file-setup) | 1531 | (ede-speedbar-file-setup)) |
| 1532 | (add-hook 'speedbar-load-hook 'ede-speedbar-file-setup)) | ||
| 1533 | 1532 | ||
| 1534 | ;;; ede.el ends here | 1533 | ;;; ede.el ends here |
diff --git a/lisp/cedet/semantic/imenu.el b/lisp/cedet/semantic/imenu.el index 19e0515ac63..cdf0a23fa07 100644 --- a/lisp/cedet/semantic/imenu.el +++ b/lisp/cedet/semantic/imenu.el | |||
| @@ -44,9 +44,8 @@ | |||
| 44 | 44 | ||
| 45 | ;; Because semantic imenu tags will hose the current imenu handling | 45 | ;; Because semantic imenu tags will hose the current imenu handling |
| 46 | ;; code in speedbar, force semantic/sb in. | 46 | ;; code in speedbar, force semantic/sb in. |
| 47 | (if (featurep 'speedbar) | 47 | (with-eval-after-load 'speedbar |
| 48 | (require 'semantic/sb) | 48 | (require 'semantic/sb)) |
| 49 | (add-hook 'speedbar-load-hook (lambda () (require 'semantic/sb)))) | ||
| 50 | 49 | ||
| 51 | (defgroup semantic-imenu nil | 50 | (defgroup semantic-imenu nil |
| 52 | "Semantic interface to Imenu." | 51 | "Semantic interface to Imenu." |
diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el index dda90373069..59af7e12d21 100644 --- a/lisp/emacs-lisp/eieio-opt.el +++ b/lisp/emacs-lisp/eieio-opt.el | |||
| @@ -278,14 +278,7 @@ are not abstract." | |||
| 278 | 278 | ||
| 279 | (if eieio-class-speedbar-key-map | 279 | (if eieio-class-speedbar-key-map |
| 280 | nil | 280 | nil |
| 281 | (if (not (featurep 'speedbar)) | 281 | (with-eval-after-load 'speedbar |
| 282 | (add-hook 'speedbar-load-hook (lambda () | ||
| 283 | (eieio-class-speedbar-make-map) | ||
| 284 | (speedbar-add-expansion-list | ||
| 285 | '("EIEIO" | ||
| 286 | eieio-class-speedbar-menu | ||
| 287 | eieio-class-speedbar-key-map | ||
| 288 | eieio-class-speedbar)))) | ||
| 289 | (eieio-class-speedbar-make-map) | 282 | (eieio-class-speedbar-make-map) |
| 290 | (speedbar-add-expansion-list '("EIEIO" | 283 | (speedbar-add-expansion-list '("EIEIO" |
| 291 | eieio-class-speedbar-menu | 284 | eieio-class-speedbar-menu |
diff --git a/lisp/emacs-lisp/eieio-speedbar.el b/lisp/emacs-lisp/eieio-speedbar.el index c11608da5d8..5c6e0e516d1 100644 --- a/lisp/emacs-lisp/eieio-speedbar.el +++ b/lisp/emacs-lisp/eieio-speedbar.el | |||
| @@ -140,11 +140,7 @@ MENU-VAR is the symbol containing an easymenu compatible menu part to use. | |||
| 140 | MODENAME is a string used to identify this browser mode. | 140 | MODENAME is a string used to identify this browser mode. |
| 141 | FETCHER is a generic function used to fetch the base object list used when | 141 | FETCHER is a generic function used to fetch the base object list used when |
| 142 | creating the speedbar display." | 142 | creating the speedbar display." |
| 143 | (if (not (featurep 'speedbar)) | 143 | (with-eval-after-load 'speedbar |
| 144 | (add-hook 'speedbar-load-hook | ||
| 145 | (list 'lambda nil | ||
| 146 | (list 'eieio-speedbar-create-engine | ||
| 147 | map-fn map-var menu-var modename fetcher))) | ||
| 148 | (eieio-speedbar-create-engine map-fn map-var menu-var modename fetcher))) | 144 | (eieio-speedbar-create-engine map-fn map-var menu-var modename fetcher))) |
| 149 | 145 | ||
| 150 | (defun eieio-speedbar-create-engine (map-fn map-var menu-var modename fetcher) | 146 | (defun eieio-speedbar-create-engine (map-fn map-var menu-var modename fetcher) |
diff --git a/lisp/erc/erc-speedbar.el b/lisp/erc/erc-speedbar.el index 1ff44afe46d..e1f27b0a8f6 100644 --- a/lisp/erc/erc-speedbar.el +++ b/lisp/erc/erc-speedbar.el | |||
| @@ -89,9 +89,8 @@ nil - Do not sort users" | |||
| 89 | "Additional menu-items to add to speedbar frame.") | 89 | "Additional menu-items to add to speedbar frame.") |
| 90 | 90 | ||
| 91 | ;; Make sure our special speedbar major mode is loaded | 91 | ;; Make sure our special speedbar major mode is loaded |
| 92 | (if (featurep 'speedbar) | 92 | (with-eval-after-load 'speedbar |
| 93 | (erc-install-speedbar-variables) | 93 | (erc-install-speedbar-variables)) |
| 94 | (add-hook 'speedbar-load-hook 'erc-install-speedbar-variables)) | ||
| 95 | 94 | ||
| 96 | ;;; ERC hierarchy display method | 95 | ;;; ERC hierarchy display method |
| 97 | ;;;###autoload | 96 | ;;;###autoload |
diff --git a/lisp/info.el b/lisp/info.el index 7a11bb3ff9d..3d4bdb969b3 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -5135,9 +5135,8 @@ first line or header line, and for breadcrumb links.") | |||
| 5135 | "Additional menu-items to add to speedbar frame.") | 5135 | "Additional menu-items to add to speedbar frame.") |
| 5136 | 5136 | ||
| 5137 | ;; Make sure our special speedbar major mode is loaded | 5137 | ;; Make sure our special speedbar major mode is loaded |
| 5138 | (if (featurep 'speedbar) | 5138 | (with-eval-after-load 'speedbar |
| 5139 | (Info-install-speedbar-variables) | 5139 | (Info-install-speedbar-variables)) |
| 5140 | (add-hook 'speedbar-load-hook 'Info-install-speedbar-variables)) | ||
| 5141 | 5140 | ||
| 5142 | ;;; Info hierarchy display method | 5141 | ;;; Info hierarchy display method |
| 5143 | ;;;###autoload | 5142 | ;;;###autoload |
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index d798ffa0516..d79cea987e9 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -4392,9 +4392,8 @@ browsing, and moving of messages." | |||
| 4392 | (text face mouse function &optional token prevline)) | 4392 | (text face mouse function &optional token prevline)) |
| 4393 | 4393 | ||
| 4394 | ;; Make sure our special speedbar major mode is loaded | 4394 | ;; Make sure our special speedbar major mode is loaded |
| 4395 | (if (featurep 'speedbar) | 4395 | (with-eval-after-load 'speedbar |
| 4396 | (rmail-install-speedbar-variables) | 4396 | (rmail-install-speedbar-variables)) |
| 4397 | (add-hook 'speedbar-load-hook 'rmail-install-speedbar-variables)) | ||
| 4398 | 4397 | ||
| 4399 | (defun rmail-speedbar-buttons (buffer) | 4398 | (defun rmail-speedbar-buttons (buffer) |
| 4400 | "Create buttons for BUFFER containing rmail messages. | 4399 | "Create buttons for BUFFER containing rmail messages. |
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index d5fd1dce6f5..567f452b935 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -486,9 +486,8 @@ The value t means that there is no stack, and we are in display-file mode.") | |||
| 486 | "Additional menu items to add to the speedbar frame.") | 486 | "Additional menu items to add to the speedbar frame.") |
| 487 | 487 | ||
| 488 | ;; Make sure our special speedbar mode is loaded | 488 | ;; Make sure our special speedbar mode is loaded |
| 489 | (if (featurep 'speedbar) | 489 | (with-eval-after-load 'speedbar |
| 490 | (gud-install-speedbar-variables) | 490 | (gud-install-speedbar-variables)) |
| 491 | (add-hook 'speedbar-load-hook 'gud-install-speedbar-variables)) | ||
| 492 | 491 | ||
| 493 | (defun gud-expansion-speedbar-buttons (_directory _zero) | 492 | (defun gud-expansion-speedbar-buttons (_directory _zero) |
| 494 | "Wrapper for call to `speedbar-add-expansion-list'. | 493 | "Wrapper for call to `speedbar-add-expansion-list'. |