helpful

a fork of Wilfred's helpful
git clone https://git.trogloxene.org/helpful.git
Log | Files | Refs | README

commit b0e937fff71dc0a5d34066bfd25310e76f284621
parent c0662aa07266fe204f4e6d72ccaa6af089400556
Author: Wilfred Hughes <me@wilfred.me.uk>
Date:   Thu, 17 Sep 2020 23:35:58 -0700

Fix docstring extraction in Emacs 27

Fixes #248

Diffstat:
MCHANGELOG.md | 2++
Mhelpful.el | 5++++-
2 files changed, 6 insertions(+), 1 deletion(-)

diff --git 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 diff --git a/helpful.el b/helpful.el @@ -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)