emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ivy-hydra 4d161cc 128/395: counsel-kmacro: Clarify copy


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra 4d161cc 128/395: counsel-kmacro: Clarify copying of values for next macro user defines.
Date: Thu, 25 Feb 2021 08:31:46 -0500 (EST)

branch: externals/ivy-hydra
commit 4d161cc2f7fecae198d1fb112cfd7eb4d2c2a819
Author: dude <ej32u@protonmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    counsel-kmacro: Clarify copying of values for next macro user defines.
    
    - Rename `counsel-kmacro-action-copy-counter` to
      `counsel-kmacro-action-copy-initial-counter-value-for-new-macro`.
    - Rename `counsel-kmacro-action-copy-format` to
      `counsel-kmacro-action-copy-format-for-new-macro`.
    - Update documentation string in `counsel-kmacro` and renamed functions to
      clarigy that they affect new macros, not existing macros.
---
 counsel.el | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/counsel.el b/counsel.el
index 94aa9a4..1ae1d87 100644
--- a/counsel.el
+++ b/counsel.el
@@ -5316,9 +5316,12 @@ You can insert or kill the name of the selected font."
 
 With prefix argument, run macro that many times.
 
-Macros are run using the current value of `kmacro-counter-value-start' their 
defined format.
-One can use actions to copy the counter format or initial counter value of a 
command,
-using them for the next defined macro."
+Macros are run using the current value of `kmacro-counter-value'
+and their respective counter format. Displayed next to each macro is
+the counter's format and initial value.
+
+One can use actions to copy the counter format or initial counter
+value of a macro, using them for a new macro."
   (interactive)
   (if (and (eq last-kbd-macro nil) (eq kmacro-ring nil))
       (message "counsel-kmacro: No keyboard macros defined.")
@@ -5389,14 +5392,16 @@ Either remove a macro from `kmacro-ring', or pop the 
head of the
                     prev-macro))))
       (setq kmacro-ring (remove actual-macro kmacro-ring)))))
 
-(defun counsel-kmacro-action-copy-counter (x)
-  "Set `kmacro-counter' to a value used by an existing macro."
+(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."
   (let* ((actual-kmacro (cdr x))
          (number (nth 1 actual-kmacro)))
     (kmacro-set-counter number)))
 
-(defun counsel-kmacro-action-copy-format (x)
-  "Copy the format of the chosen macro for the next defined macro."
+(defun counsel-kmacro-action-copy-counter-format-for-new-macro (x)
+  "Set `kmacro-default-counter-format' to an existing keyboard macro's counter 
format.
+This will apply to the next macro a user defines."
   (let* ((actual-kmacro (cdr x))
          (format (nth 2 actual-kmacro)))
     (kmacro-set-format format)))
@@ -5439,9 +5444,9 @@ counter value and iteration amount."
 
 (ivy-set-actions
  'counsel-kmacro
- '(("c" counsel-kmacro-action-copy-counter "copy counter")
+ '(("c" counsel-kmacro-action-copy-initial-counter-value-for-new-macro "copy 
initial counter value for new macro")
    ("d" counsel-kmacro-action-delete-kmacro "delete")
-   ("f" counsel-kmacro-action-copy-format "copy format")
+   ("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")))
 
 ;;** `counsel-geiser-doc-look-up-manual'



reply via email to

[Prev in Thread] Current Thread [Next in Thread]