branch: elpa/powershell
commit b6ae591a9f7c5cb9be2f9bfd5fc48973170fde86
Merge: 4e215e4cd68 8d1ae8e044e
Author: Joe Schafer <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #23 from andschwa/master
Defer loading `speedbar`
---
powershell.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/powershell.el b/powershell.el
index 668ba5e32da..bae6e8c26b1 100644
--- a/powershell.el
+++ b/powershell.el
@@ -727,9 +727,10 @@ Where <fcn-name> is the name of the function to which
<helper string> applies.
(setq imenu-case-fold-search nil)
(imenu-add-menubar-index)))
-(when (require 'speedbar nil t)
- (declare-function speedbar-add-supported-extension "speedbar")
- (speedbar-add-supported-extension ".ps1?"))
+(defun powershell-setup-speedbar ()
+ "Install `speedbar-add-supported-extension'."
+ (when (require 'speedbar nil t)
+ (speedbar-add-supported-extension ".ps1?")))
;; A better command would be something like "powershell.exe -NoLogo
;; -NonInteractive -Command & (buffer-file-name)". But it will just
@@ -765,6 +766,7 @@ that value is non-nil."
(setq-local electric-indent-chars
(append "{}():;," electric-indent-chars))
(powershell-setup-imenu)
+ (powershell-setup-speedbar)
(powershell-setup-menu)
(powershell-setup-eldoc))