Skip to content

Commit

Permalink
Only update once every five minutes.
Browse files Browse the repository at this point in the history
Getting keybindings is relatively slow (~3 seconds on my machine) so do
it less often.
  • Loading branch information
Wilfred committed Nov 15, 2015
1 parent 3fb4872 commit b88f45e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion smex.el
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ Uses the currently active keymap."

(defun smex-auto-update (&optional idle-time)
"Update Smex when Emacs has been idle for IDLE-TIME."
(unless idle-time (setq idle-time 60))
(unless idle-time (setq idle-time 300))
(run-with-idle-timer idle-time t
'(lambda () (if (smex-detect-new-commands) (smex-update)))))

Expand Down

0 comments on commit b88f45e

Please sign in to comment.