diff options
author | Kyle Meyer <kyle@kyleam.com> | 2014-12-21 22:19:45 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2014-12-21 22:19:45 -0500 |
commit | b7236454acaf5b3549830bf62d2b192d51ddb1a5 (patch) | |
tree | 9be5815a28f22476efeda805e5704e68a8db359f | |
parent | eeb0aa2391f7f2057f62fc9723064f61eebaae48 (diff) | |
download | emacs.d-b7236454acaf5b3549830bf62d2b192d51ddb1a5.tar.gz |
Only rescan if imenu is already loaded
-rw-r--r-- | lisp/init-general.el | 4 |
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)) |