summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
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))