>From 1a2044a6275002c5e56b3e6c2090cf9c9a882f23 Mon Sep 17 00:00:00 2001 From: Ikumi Keita Date: Thu, 15 Dec 2022 13:31:03 +0900 Subject: [PATCH] Fix argument description in doc strings * latex.el (TeX-read-key-val): * multi-prompt.el (multi-prompt-key-value): Correct the format of KEY-VAL-ALIST and state that variable is also allowed. * style/acro.el (LaTeX-arg-acro-key-val): Simplify instead of stating the detail. --- latex.el | 8 +++++--- multi-prompt.el | 10 +++++++--- style/acro.el | 9 ++++----- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/latex.el b/latex.el index 491e6067..6eaf2768 100644 --- a/latex.el +++ b/latex.el @@ -3266,9 +3266,11 @@ reading an optional argument. KEY-VAL-ALIST can be - A symbol returning an alist - An alist -The car of each element should be a string representing a key and -the optional cdr should be a list with strings to be used as -values for the key. +Each entry of this alist is a list. The first element of each +list is a string representing a key and the optional second +element is a list with strings to be used as values for the key. +The second element can also be a variable returning a list of +strings. PROMPT replaces the standard one where \\=' (k=v): \\=' is appended to it. If you want the full control over the prompt, diff --git a/multi-prompt.el b/multi-prompt.el index b8632711..06f28ca5 100644 --- a/multi-prompt.el +++ b/multi-prompt.el @@ -185,9 +185,13 @@ the alist elements." hist def inherit-input-method) "Read multiple strings, with completion and key=value support. PROMPT is a string to prompt with, usually ending with a colon -and a space. TABLE is an alist. The car of each element should -be a string representing a key and the optional cdr should be a -list with strings to be used as values for the key. +and a space. + +TABLE is an alist where each entry is a list. The first element +of each list is a string representing a key and the optional +second element is a list with strings to be used as values for +the key. The second element can also be a variable returning a +list of strings. See the documentation for `completing-read' for details on the other arguments: PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST, diff --git a/style/acro.el b/style/acro.el index 56291a1b..26e32b8d 100644 --- a/style/acro.el +++ b/style/acro.el @@ -152,11 +152,10 @@ in its optional argument.") (defun LaTeX-arg-acro-key-val (optional prompt key-val-alist) "Prompt for keys and values in KEY-VAL-ALIST. key binding in minibuffer is removed temporarily. Insert -the given value as a TeX macro argument. If OPTIONAL is non-nil, -insert it as an optional argument. Use PROMPT as the prompt -string. KEY-VAL-ALIST is an alist. The car of each element -should be a string representing a key and the optional cdr should -be a list with strings to be used as values for the key." +the given value as a TeX macro argument. + +See `TeX-read-key-val' for explanation of OPTIONAL, PROMPT and +KEY-VAL-ALIST." ;; Remove key binding from map used in `multi-prompt-key-value' (called ;; by `TeX-arg-key-val') with `require-match' set to `nil'. (let ((crm-local-completion-map -- 2.38.1