emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/which-key b11227b 23/51: Strip out advice in command do


From: Stefan Monnier
Subject: [elpa] externals/which-key b11227b 23/51: Strip out advice in command docstrings
Date: Tue, 8 Sep 2020 10:26:18 -0400 (EDT)

branch: externals/which-key
commit b11227b24be1c56b31380395f266983e889a7f8d
Author: Henrik Lissner <accounts@v0.io>
Commit: Justin Burkett <justin@burkett.cc>

    Strip out advice in command docstrings
---
 which-key.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/which-key.el b/which-key.el
index de96a49..2adda88 100644
--- a/which-key.el
+++ b/which-key.el
@@ -1671,7 +1671,12 @@ and `which-key-show-docstrings' is non-nil. If
 return the docstring."
   (let* ((orig-sym (intern original))
          (doc (when (commandp orig-sym)
-                (documentation orig-sym)))
+                (string-trim-left
+                 (documentation orig-sym)
+                 (concat "\\(?::"
+                         
"\\(?:\\(?:after\\|before\\)\\(?:-\\(?:until\\|while\\)\\)?\\|around\\|override\\|filter-\\(?:args\\|return\\)\\)"
+                         " advice: [^\n]+\n"
+                         "\\)+\n"))))
          (docstring (when doc
                       (which-key--propertize (car (split-string doc "\n"))
                                              'face 
'which-key-docstring-face))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]