summaryrefslogtreecommitdiff
path: root/helm-command.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2016-03-26 23:09:08 +0100
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2016-03-26 23:09:08 +0100
commit62549026fbc419d1479e721606df47d84934f6c1 (patch)
tree52bc45c9971c644ae68dbcfb809f7fbd4b1e1695 /helm-command.el
parent5df8962c0c4b6722c9654f916ae67b5a543089bf (diff)
Finally revert c3ef651 adding actions to helm-comp-read.
Keep exiting with a string to be safe, adding actions there will cause problems in future. * helm-command.el (helm-M-x-read-extended-command): Remove :actions. (helm-M-x): Check for sym. * helm-mode.el (helm-comp-read): Remove actions.
Diffstat (limited to 'helm-command.el')
-rw-r--r--helm-command.el35
1 files changed, 16 insertions, 19 deletions
diff --git a/helm-command.el b/helm-command.el
index 00a24313..69beab24 100644
--- a/helm-command.el
+++ b/helm-command.el
@@ -213,10 +213,6 @@ than the default which is OBARRAY."
:must-match t
:fuzzy helm-M-x-fuzzy-match
:nomark t
- :actions (helm-make-actions
- "Execute command" 'identity
- "Switch to apropos" (lambda (candidate)
- (helm-apropos candidate)))
:candidates-in-buffer t
:fc-transformer 'helm-M-x-transformer
:hist-fc-transformer 'helm-M-x-transformer-hist))
@@ -234,21 +230,22 @@ the prefix args if needed, are passed AFTER starting `helm-M-x'.
You can get help on each command by persistent action."
(interactive (list current-prefix-arg (helm-M-x-read-extended-command)))
(let ((sym-com (and (stringp command-name) (intern-soft command-name))))
- ;; Avoid having `this-command' set to *exit-minibuffer.
- (setq this-command sym-com
- ;; Handle C-x z (repeat) Issue #322
- real-this-command sym-com)
- ;; If helm-M-x is called with regular emacs completion (kmacro)
- ;; use the value of arg otherwise use helm-current-prefix-arg.
- (let ((prefix-arg (or helm-current-prefix-arg arg)))
- ;; This ugly construct is to save history even on error.
- (unless helm-M-x-always-save-history
- (command-execute sym-com 'record))
- (setq extended-command-history
- (cons command-name
- (delete command-name extended-command-history)))
- (when helm-M-x-always-save-history
- (command-execute sym-com 'record)))))
+ (when sym-com
+ ;; Avoid having `this-command' set to *exit-minibuffer.
+ (setq this-command sym-com
+ ;; Handle C-x z (repeat) Issue #322
+ real-this-command sym-com)
+ ;; If helm-M-x is called with regular emacs completion (kmacro)
+ ;; use the value of arg otherwise use helm-current-prefix-arg.
+ (let ((prefix-arg (or helm-current-prefix-arg arg)))
+ ;; This ugly construct is to save history even on error.
+ (unless helm-M-x-always-save-history
+ (command-execute sym-com 'record))
+ (setq extended-command-history
+ (cons command-name
+ (delete command-name extended-command-history)))
+ (when helm-M-x-always-save-history
+ (command-execute sym-com 'record))))))
(provide 'helm-command)