bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#57673: [PATCH] Parse --help messages for pcomplete


From: Augusto Stoffel
Subject: bug#57673: [PATCH] Parse --help messages for pcomplete
Date: Wed, 14 Sep 2022 21:41:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

On Wed, 14 Sep 2022 at 21:21, Lars Ingebrigtsen wrote:

> Augusto Stoffel <arstoffel@gmail.com> writes:
>
>> The patch includes completion for a variety of commands (in part to test
>> the flexibility of the parser), including most commands from coreutils,
>> so it has become a bit bulky.  Given the large number of new functions,
>> I hope the commit message is detailed enough.
>
> I've pushed the first (trivial) patch, but the second has two warnings:
>
> In pcomplete/systemctl:
> pcmpl-linux.el:154:12: Warning: Unused lexical variable `subcmd'

I've attached a patch to be applied (and squashed) on top of what I sent
previously.  Let me know if this is inconvenient and I'll send the whole
thing.

> In pcomplete-from-help:
> pcomplete.el:1344:2: Warning: docstring wider than 80 characters

Hum, I don't know how to fix this.  The long line is the function
signature, which is created mechanically by cl-defun and displays all
the default values of the keyword arguments.

The formatting is horrible:

    (pcomplete-from-help COMMAND &rest ARGS &key (MARGIN (rx bol (+ " ")))
    (ARGUMENT (rx "-" (+ (any "-" alnum)) (32 "="))) (METAVAR (rx (32 " ")
    (or (+ (any alnum "_-")) (seq "[" (+? nonl) "]") (seq "<" (+? nonl)
    ">") (seq "{" (+? nonl) "}")))) (SEPARATOR (rx ", " symbol-start))
    (DESCRIPTION (rx (* nonl) (* "\n" (>= 9 " ") (* nonl)))) NARROW-START
    NARROW-END)

But the information is good to have, because you need to know what these
regexps are in order to use the function.

Attachment: 0001-Fix-to-Warning-Unused-lexical-variable-subcmd.patch
Description: Text Data


reply via email to

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