summaryrefslogtreecommitdiff
path: root/lisp/erc/erc-speedbar.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/erc/erc-speedbar.el')
-rw-r--r--lisp/erc/erc-speedbar.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/erc/erc-speedbar.el b/lisp/erc/erc-speedbar.el
index 0fde3bf7cc3..1c0635c528c 100644
--- a/lisp/erc/erc-speedbar.el
+++ b/lisp/erc/erc-speedbar.el
@@ -90,9 +90,8 @@ nil - Do not sort users"
"Additional menu-items to add to speedbar frame.")
;; Make sure our special speedbar major mode is loaded
-(if (featurep 'speedbar)
- (erc-install-speedbar-variables)
- (add-hook 'speedbar-load-hook 'erc-install-speedbar-variables))
+(with-eval-after-load 'speedbar
+ (erc-install-speedbar-variables))
;;; ERC hierarchy display method
;;;###autoload