Skip to content

Commit

Permalink
Pacify Emacs 28 wide docstring warnings
Browse files Browse the repository at this point in the history
* counsel.el (counsel-read-directory-name)
(counsel--kmacro-candidates)
(counsel-kmacro-action-copy-counter-format-for-new-macro):
* ivy.el (ivy-read-action-format-columns): Refill and reword wide
docstrings.
  • Loading branch information
basil-conto committed Sep 28, 2021
1 parent 4de30b0 commit 5f49149
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
14 changes: 10 additions & 4 deletions counsel.el
Original file line number Diff line number Diff line change
Expand Up @@ -3101,7 +3101,9 @@ prompt additionally for EXTRA-AG-ARGS."
:exit-codes '(1 "No matches found"))

(defun counsel-read-directory-name (prompt &optional default)
"Read a directory name from user, a (partial) replacement of `read-directory-name'."
"Read a directory name.
This is intended as a (partial) replacement for
`read-directory-name'."
(let ((counsel--find-file-predicate #'file-directory-p))
(ivy-read prompt
#'read-file-name-internal
Expand Down Expand Up @@ -5639,8 +5641,9 @@ value of a macro, using them for a new macro."

(defun counsel--kmacro-candidates ()
"Create the list of keyboard macros used by `counsel-kmacro'.
This is a combination of `kmacro-ring' and, together in a list, `last-kbd-macro',
`kmacro-counter-format-start', and `kmacro-counter-value-start'."
This is a combination of `kmacro-ring' and, together in a list,
`last-kbd-macro', `kmacro-counter-format-start', and
`kmacro-counter-value-start'."
(mapcar
(lambda (kmacro)
(cons
Expand Down Expand Up @@ -5701,7 +5704,10 @@ to 0."
(kmacro-set-counter number)))

(defun counsel-kmacro-action-copy-counter-format-for-new-macro (x)
"Set `kmacro-default-counter-format' to an existing keyboard macro's counter format.
"Set the default keyboard macro counter format.
This sets `kmacro-default-counter-format' to the counter format
of an existing keyboard macro.
This will apply to the next macro a user defines."
(let* ((actual-kmacro (cdr x))
(format (nth 2 actual-kmacro)))
Expand Down
7 changes: 4 additions & 3 deletions ivy.el
Original file line number Diff line number Diff line change
Expand Up @@ -784,10 +784,11 @@ key (a string), cmd and doc (a string)."
"\n")))

(defun ivy-read-action-format-columns (actions)
"Create a docstring from ACTIONS, using several columns if needed to preserve `ivy-height'.
"Create a potentially multi-column docstring from ACTIONS.
Several columns are used as needed to preserve `ivy-height'.
ACTIONS is a list. Each list item is a list of 3 items: key (a
string), cmd and doc (a string)."
ACTIONS is a list with elements of the form (KEY COMMAND DOC),
where KEY and DOC are strings."
(let ((length (length actions))
(i 0)
(max-rows (- ivy-height 1))
Expand Down

0 comments on commit 5f49149

Please sign in to comment.