diff options
author | Chunyang Xu <xuchunyang.me@gmail.com> | 2016-06-22 11:56:27 +0800 |
---|---|---|
committer | Chunyang Xu <xuchunyang.me@gmail.com> | 2016-06-22 11:56:27 +0800 |
commit | 5ab9d1cd17ccc90d1331792e3d6effe0d5c5df56 (patch) | |
tree | d6a974d6f799058e00c6ce58f50ab92cc6cbede3 /helm-command.el | |
parent | 4b86d1ba9643171df610de48755c631f9116412b (diff) |
Only display prefix arg before helm-M-x at the beginning
Diffstat (limited to 'helm-command.el')
-rw-r--r-- | helm-command.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/helm-command.el b/helm-command.el index 6f26f740..0159f362 100644 --- a/helm-command.el +++ b/helm-command.el @@ -71,6 +71,7 @@ Show all candidates on startup when 0 (default)." (defvar helm-M-x-input-history nil) (defvar helm-M-x-prefix-argument nil "Prefix argument before calling `helm-M-x'.") +(defvar helm-M-x-display-prefix-argument-p nil) (cl-defun helm-M-x-get-major-mode-command-alist (mode-map) @@ -144,7 +145,8 @@ fuzzy matching is running its own sort function with a different algorithm." (defun helm-M-x--notify-prefix-arg () ;; Notify a prefix-arg set AFTER calling M-x. (when (or prefix-arg - (when helm-M-x-allow-prefix-argument + (when (and helm-M-x-allow-prefix-argument + helm-M-x-display-prefix-argument-p) helm-M-x-prefix-argument)) (with-helm-window (helm-display-mode-line (helm-get-current-source) 'force)))) @@ -197,7 +199,8 @@ than the default which is OBARRAY." (unwind-protect (let ((msg "Error: Specifying a prefix arg before calling `helm-M-x'")) (if helm-M-x-allow-prefix-argument - (setq helm-M-x-prefix-argument current-prefix-arg) + (setq helm-M-x-prefix-argument current-prefix-arg + helm-M-x-display-prefix-argument-p t) (when current-prefix-arg (ding) (message "%s" msg) |