[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-hydra 068ed9c 131/395: counsel-kmacro: Clarify Emac
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy-hydra 068ed9c 131/395: counsel-kmacro: Clarify Emacs's behavior regarding counter initial values. |
Date: |
Thu, 25 Feb 2021 08:31:47 -0500 (EST) |
branch: externals/ivy-hydra
commit 068ed9ca5431bfc4027f440b3a92ed68670a5cdb
Author: dude <ej32u@protonmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>
counsel-kmacro: Clarify Emacs's behavior regarding counter initial values.
Generally, calling a keyboard macro that uses counters effectively resets
the initial counter value used by the next defined keyboard macro to 0.
- The documentation strings now explicitly state this.
- The function for copying the counter value has been renamed to
`counsel-kmacro-action-copy-initial-counter-value` since it can affect
what happens when calling existing macros as well as when defining new
ones.
Fixes #2421
---
counsel.el | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/counsel.el b/counsel.el
index 8cb57ff..d39debc 100644
--- a/counsel.el
+++ b/counsel.el
@@ -5395,9 +5395,19 @@ to the popped head of the ring."
prev-macro))))
(setq kmacro-ring (delq actual-macro kmacro-ring)))))
-(defun counsel-kmacro-action-copy-initial-counter-value-for-new-macro (x)
- "Set `kmacro-initial-counter-value' to an existing keyboard macro's original
counter value.
-This will apply to the next macro a user defines."
+(defun counsel-kmacro-action-copy-initial-counter-value (x)
+ "Pass an existing keyboard macro's original value to `kmacro-set-counter'.
+This value will be used by the next executed macro, or as an
+initial value by the next macro defined.
+
+Note that calling an existing macro that itself uses a counter
+effectively resets the initial counter value for the next defined macro
+to 0."
+ ;; NOTE:
+ ;; Calling `kmacro-start-macro' without an argument sets `kmacro-counter'
+ ;; to 0 if `kmacro-initial-counter'is nil, and sets `kmacro-initial-counter'
+ ;; to nil regardless.
+ ;; Using `kmacro-insert-counter' sets `kmacro-initial-counter' to nil.
(let* ((actual-kmacro (cdr x))
(number (nth 1 actual-kmacro)))
(kmacro-set-counter number)))
@@ -5447,7 +5457,7 @@ counter value and iteration amount."
(ivy-set-actions
'counsel-kmacro
- '(("c" counsel-kmacro-action-copy-initial-counter-value-for-new-macro "copy
initial counter value for new macro")
+ '(("c" counsel-kmacro-action-copy-initial-counter-value "copy initial counter
value")
("d" counsel-kmacro-action-delete-kmacro "delete")
("f" counsel-kmacro-action-copy-counter-format-for-new-macro "copy counter
format for new macro")
("e" counsel-kmacro-action-execute-after-prompt "execute after prompt")))
- [elpa] externals/ivy-hydra 249ccc6 041/395: ivy.el (ivy--split): Re-write, (continued)
- [elpa] externals/ivy-hydra 249ccc6 041/395: ivy.el (ivy--split): Re-write, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 69dbbf6 056/395: ivy.el (ivy--tramp-candidates): Extract, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 95d557b 070/395: swiper.el (swiper-query-replace): Add a more straightforward default, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra e3fc84f 104/395: counsel.el (counsel--git-grep-occur-cmd): Simplify, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra a159810 120/395: counsel-recentf: Sort by access time when including XDG list., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 8dba6ff 115/395: ivy-test.el (swiper-query-replace): Add test, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra aefd669 114/395: swiper.el (swiper-query-replace): Fix for ivy--regex-ignore-order, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 9fd766d 122/395: counsel.el (counsel-evil-register-face): Add, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 47bd7b1 119/395: Handle case correctly in `counsel-grep-like-occur', Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra e860b11 116/395: ivy.el (ivy--resize-minibuffer-to-fit): Fix "M-o" not showing the list of actions, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 068ed9c 131/395: counsel-kmacro: Clarify Emacs's behavior regarding counter initial values.,
Basil L. Contovounesios <=
- [elpa] externals/ivy-hydra 56807a1 134/395: counsel.el (counsel-recentf): Add "d" action, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 7084d60 154/395: counsel.el (counsel-cd): Default to the directory of the current buffer, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra fcf5dcf 159/395: ivy.el (ivy--compute-extra-actions): Use the provided doc for "o", Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra e7cc776 174/395: swiper.el (swiper-verbose): New defcustom, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 2894f11 177/395: ivy.el (magic-slash): comment out windows behaviour, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 742119a 181/395: counsel.el (counsel-tracker): New command, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 9ccd93b 191/395: ivy-hydra.el (ivy-hydra-read-action): Work for "C-M-o", Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra bba92e0 188/395: counsel.el (counsel-file-name-filter-alist): Modify perl entry, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 64f05f4 189/395: swiper.el (swiper-font-lock-exclude): Add sieve-mode, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 6f04865 185/395: ivy.el (ivy-init-fns-alist): Add, Basil L. Contovounesios, 2021/02/25