summaryrefslogtreecommitdiff
path: root/helm-command.el
diff options
context:
space:
mode:
authorMichael Heerdegen <michael_heerdegen@web.de>2014-11-29 16:14:21 +0100
committerMichael Heerdegen <michael_heerdegen@web.de>2014-11-29 16:14:21 +0100
commitd28bd65376ddf0f1e887358d648c6d99e99a3708 (patch)
tree3fdcbc11b8e6b1fe57ede8485e14fcb68191cd0f /helm-command.el
parent1318383da8e0ba36b387bca290644b00561fe8d7 (diff)
fix #730
discard user input after raising error due to given prefix arg in helm-M-x to prevent accidents
Diffstat (limited to 'helm-command.el')
-rw-r--r--helm-command.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/helm-command.el b/helm-command.el
index 99626cad..6e4bd423 100644
--- a/helm-command.el
+++ b/helm-command.el
@@ -169,10 +169,13 @@ You can get help on each command by persistent action."
(setq help-cand candidate))))
(tm (run-at-time 1 0.1 'helm-M-x--notify-prefix-arg)))
(unwind-protect
- (progn
+ (let ((msg "Error: Specifying a prefix arg before calling `helm-M-x'"))
(when current-prefix-arg
- (user-error
- "Error: Specifying a prefix arg before calling `helm-M-x'"))
+ (ding)
+ (message "%s" msg)
+ (while (not (sit-for 1))
+ (discard-input))
+ (user-error msg))
(setq current-prefix-arg nil)
(setq command (helm-comp-read
"M-x " obarray