diff options
| author | Wilfred Hughes <me@wilfred.me.uk> | 2020-09-17 23:35:58 -0700 |
|---|---|---|
| committer | Wilfred Hughes <me@wilfred.me.uk> | 2020-09-17 23:36:56 -0700 |
| commit | b0e937fff71dc0a5d34066bfd25310e76f284621 (patch) | |
| tree | 5492f095ff4268801dcd55641a90f4cfd1728ee9 | |
| parent | c0662aa07266fe204f4e6d72ccaa6af089400556 (diff) | |
Fix docstring extraction in Emacs 27
Fixes #248
| -rw-r--r-- | CHANGELOG.md | 2 | ||||
| -rw-r--r-- | helpful.el | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index d193500..a2ae57e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ Report the package version when custom variables were added. Fixed a crash on assigning byte-compiled objects to keybindings. +Fixed an issue with advice being shown in docstrings on Emacs 27+. + # v0.17 Fixed a minor docstring formatting issue when keymap references were @@ -2391,7 +2391,10 @@ state of the current symbol." "Remove mentions of advice from DOCSTRING." (let* ((lines (s-lines docstring)) (relevant-lines - (--drop-while (s-starts-with-p ":around advice:" it) lines))) + (--drop-while + (or (s-starts-with-p ":around advice:" it) + (s-starts-with-p "This function has :around advice:" it)) + lines))) (s-trim (s-join "\n" relevant-lines)))) (defun helpful--format-argument (arg) |
