Skip to content

Commit

Permalink
Minor fixes for helm-M-x.
Browse files Browse the repository at this point in the history
* helm-command.el (helm-M-x-map): Don't quote nil (typo).
(helm-M-x-universal-argument): Add docstring and helm-only prop.
  • Loading branch information
Thierry Volpiatto committed Jun 24, 2016
1 parent 4cfb031 commit 4006c8a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion helm-command.el
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,12 @@ fuzzy matching is running its own sort function with a different algorithm."
(defvar helm-M-x-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map helm-comp-read-map)
(define-key map (kbd "C-u") 'nil)
(define-key map (kbd "C-u") nil)
(define-key map (kbd "C-u") 'helm-M-x-universal-argument)
map))

(defun helm-M-x-universal-argument ()
"Same as `universal-argument' but for `helm-M-x'."
(interactive)
(if helm-M-x-prefix-argument
(progn (setq helm-M-x-prefix-argument nil)
Expand All @@ -179,6 +180,7 @@ fuzzy matching is running its own sort function with a different algorithm."
(message "Initial prefix arg disabled"))
(setq prefix-arg (list 4))
(universal-argument--mode)))
(put 'helm-M-x-universal-argument 'helm-only t)

(defun helm-M-x-read-extended-command (&optional collection history)
"Read command name to invoke in `helm-M-x'.
Expand Down

3 comments on commit 4006c8a

@xuchunyang
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I have merged this change to master.

git merge just creates a new commit to include the change, so the original commit (commit message, author info, etc) is lost, so now it looks like I made this change, which is not true, I am sorry about this. I need to learn more about git-merge.

@thierryvolpiatto
Copy link
Member

@thierryvolpiatto thierryvolpiatto commented on 4006c8a Jun 24, 2016 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xuchunyang
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, you are right. Thanks for the explanation.

Please sign in to comment.