-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Advice
section
#265
base: master
Are you sure you want to change the base?
Improve Advice
section
#265
Conversation
`helpful--skip-advice' now actually works with advice other than :around, and properly deletes the newlines added by the advice functions. All advice is now displayed in the "Advice" section, and not in the docstring.
"Advice" is a relatively important section, so move it closer to "Documentation", which used to display most advice.
In the "Advice" section, a clickable X is displayed that will remove the given piece of advice.
`advice-add' and `defadvice' add `advice' to the front of the docstring, so `helpful--extract-advice' ends up displaying them in reverse-chronological order.
The buffer in the middle shows the code used to create the function with advice. |
`helpful-remove-all-advice' removes all advice for the current helpful button. There is now a button in the Debugging section that removes all advice, which is enabled only if the function is advised.
- Make the dot optional, supporting Emacs pre Emacs-27 - Remove the newline after advice, fixing the CI - Only skip advice if the function is advised (since `helpful--skip-advice' isn't 100% strict)
eff60eb
to
d89c5dc
Compare
Sometimes, there can be newlines between advice in docstrings. Handle those cases.
Advice names may contain escapes, which are handled with `read'.
helpful--skip-advice
now works for non:around
advice. This means that thedocstring no longer displays any advice.
Advice
section no longer just says "This function is advised", but nowlists the advice, one per line, with the format
<clickable X to remove> :<before/after/...> <advice symbol>
: