summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-12-21 22:19:45 -0500
committerKyle Meyer <kyle@kyleam.com>2014-12-21 22:19:45 -0500
commitb7236454acaf5b3549830bf62d2b192d51ddb1a5 (patch)
tree9be5815a28f22476efeda805e5704e68a8db359f /lisp
parenteeb0aa2391f7f2057f62fc9723064f61eebaae48 (diff)
downloademacs.d-b7236454acaf5b3549830bf62d2b192d51ddb1a5.tar.gz
Only rescan if imenu is already loaded
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-general.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/init-general.el b/lisp/init-general.el
index b2cb992..0a4f440 100644
--- a/lisp/init-general.el
+++ b/lisp/init-general.el
@@ -52,7 +52,9 @@
(defun km/imenu (rescan)
"Call `imenu', rescanning if RESCAN is non-nil"
(interactive "P")
- (when rescan
+ (when (and rescan
+ ;; No need to rescan if imenu hasn't been autoloaded yet.
+ (fboundp 'imenu--cleanup))
;; Taken from `imenu-choose-buffer-index'.
(imenu--cleanup)
(setq imenu--index-alist nil))