mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-24 00:40:35 -08:00
Strip out advice in command docstrings
This commit is contained in:
parent
1e3640e48c
commit
0d0af8a0a2
1 changed files with 6 additions and 1 deletions
|
|
@ -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))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue