[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#50222: Advising a function pollutes its docstring
From: |
Clément Pit-Claudel |
Subject: |
bug#50222: Advising a function pollutes its docstring |
Date: |
Thu, 26 Aug 2021 23:25:15 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
Hi all,
Advising a function changes the first line of its docstring, which breaks
packages that use the first line of the docstring to display a short piece of
information about a function. I noticed this issue while playing with the
"shortdoc" feature. For example:
M-x shortdoc-display-group RET process:
(make-process &rest args)
Start a program in a subprocess. Return the process object for it.
(make-process :name "foo" :command '("cat" "/tmp/foo"))
But after running (advice-add 'make-process :before (lambda (&rest args))):
(make-process &rest args)
This function has :before advice: No documentation
(make-process :name "foo" :command '("cat" "/tmp/foo"))
eg. ⇒ #<process foo>
It would be nice to place the bit of text about advice somewhere else — maybe
with the indented paragraph of the docs that says when the function was
introduced and which group contains the relevant docs?
(make-process &rest ARGS)
Other relevant functions are documented in the process group.
Probably introduced at or before Emacs version 25.1.
// HERE? //
This function has :before advice: No documentation
Start a program in a subprocess. Return the process object for it.
Clément.
OpenPGP_signature
Description: OpenPGP digital signature
- bug#50222: Advising a function pollutes its docstring,
Clément Pit-Claudel <=