[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master dbeb5b1 303/348: Ensure counsel-M-x preserves last-command
From: |
Oleh Krehel |
Subject: |
[elpa] master dbeb5b1 303/348: Ensure counsel-M-x preserves last-command |
Date: |
Sat, 8 Apr 2017 11:04:19 -0400 (EDT) |
branch: master
commit dbeb5b1c7f883ce75da39b56d0fdb18074a6dbbc
Author: Wilfred Hughes <address@hidden>
Commit: Oleh Krehel <address@hidden>
Ensure counsel-M-x preserves last-command
Fixes #891.
Fixes #893.
---
counsel.el | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/counsel.el b/counsel.el
index adc46d8..d7bc5bc 100644
--- a/counsel.el
+++ b/counsel.el
@@ -699,6 +699,12 @@ Optional INITIAL-INPUT is the initial input in the
minibuffer."
(setq cands smex-ido-cache)
(setq pred nil)
(setq sort nil))
+ ;; When `counsel-M-x' returns, `last-command' would be set to
+ ;; `counsel-M-x' because :action hasn't been invoked yet.
+ ;; Instead, preserve the old value of `this-command'.
+ (setq this-command last-command)
+ (setq real-this-command real-last-command)
+
(ivy-read (counsel--M-x-prompt) cands
:predicate pred
:require-match t
- [elpa] master 1ac1cc1 316/348: ivy.el (ivy-completing-read): Don't require-match for null, (continued)
- [elpa] master 1ac1cc1 316/348: ivy.el (ivy-completing-read): Don't require-match for null, Oleh Krehel, 2017/04/08
- [elpa] master 7ca301b 334/348: swiper.el (swiper-goto-start-of-match) New defcustom, Oleh Krehel, 2017/04/08
- [elpa] master fc2e198 335/348: swiper.el (swiper--action): Set evil search direction to forward, Oleh Krehel, 2017/04/08
- [elpa] master 718a06b 345/348: doc/Changelog.org: Fix links, Oleh Krehel, 2017/04/08
- [elpa] master 802c9da 271/348: counsel.el: Add counsel-command-history, Oleh Krehel, 2017/04/08
- [elpa] master ee91a25 283/348: ivy.el (ivy--sort-maybe): Fix byte-compiler warning, Oleh Krehel, 2017/04/08
- [elpa] master dc693c3 280/348: Make ivy--flx-sort more intelligent, Oleh Krehel, 2017/04/08
- [elpa] master 182e35e 298/348: Apply search highlighting for evil when applicable, Oleh Krehel, 2017/04/08
- [elpa] master aedea1a 289/348: counsel.el (counsel-package): Add func to manage packages., Oleh Krehel, 2017/04/08
- [elpa] master b9c52be 301/348: counsel.el (counsel-git): Add "x" action, Oleh Krehel, 2017/04/08
- [elpa] master dbeb5b1 303/348: Ensure counsel-M-x preserves last-command,
Oleh Krehel <=
- [elpa] master ae3ca26 117/348: counsel.el (counsel-locate-action-extern): Add w32 support, Oleh Krehel, 2017/04/08
- [elpa] master 3e651a3 116/348: Make swiper-all use point positions instead of line positions, Oleh Krehel, 2017/04/08
- [elpa] master ef3f010 128/348: ivy.el (ivy--insert-prompt): Improve the extra "\n" logic, Oleh Krehel, 2017/04/08
- [elpa] master 870112e 176/348: counsel.el (counsel-ag-function): Use sync on remote, Oleh Krehel, 2017/04/08
- [elpa] master 1914ecd 203/348: counsel.el (counsel-recoll-function): Add shell-quote-argument, Oleh Krehel, 2017/04/08
- [elpa] master f0e49d5 213/348: Improve recursive minibuffers with two emacsclients, Oleh Krehel, 2017/04/08
- [elpa] master df9ad89 220/348: counsel.el (counsel-rpm): New command, Oleh Krehel, 2017/04/08
- [elpa] master aea4919 225/348: Shrink ivy back to ivy-height after dispatching actions., Oleh Krehel, 2017/04/08
- [elpa] master 88bf299 228/348: counsel.el (counsel-recentf): Remove properties from recentf-list, Oleh Krehel, 2017/04/08
- [elpa] master 576a1e3 232/348: Revert "ivy.el (ivy-call): setq default-directory instead of let", Oleh Krehel, 2017/04/08