summaryrefslogtreecommitdiff
path: root/helm-command.el
diff options
context:
space:
mode:
Diffstat (limited to 'helm-command.el')
-rw-r--r--helm-command.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/helm-command.el b/helm-command.el
index 34565c62..5f5aef82 100644
--- a/helm-command.el
+++ b/helm-command.el
@@ -67,10 +67,11 @@ Show all candidates on startup when 0 (default)."
(cl-defun helm-M-x-get-major-mode-command-alist (mode-map)
"Return alist of MODE-MAP."
- (cl-loop for key being the key-seqs of mode-map using (key-bindings com)
- for str-key = (key-description key)
- for ismenu = (string-match "<menu-bar>" str-key)
- unless ismenu collect (cons str-key com)))
+ (when mode-map
+ (cl-loop for key being the key-seqs of mode-map using (key-bindings com)
+ for str-key = (key-description key)
+ for ismenu = (string-match "<menu-bar>" str-key)
+ unless ismenu collect (cons str-key com))))
(defun helm-get-mode-map-from-mode (mode)
"Guess the mode-map name according to MODE.