Open
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.
Contributor
Author
|
The buffer in the middle shows the code used to create the function with advice. |
Contributor
Author
`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'.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


helpful--skip-advicenow works for non:aroundadvice. This means that thedocstring no longer displays any advice.
Advicesection 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>: