branch: master
commit ae0dbe914976ccd1251adae1f03eb4499487d0bc
Author: Michael Heerdegen <[email protected]>
Commit: Michael Heerdegen <[email protected]>
el-search--make-docstring: exclude some specially named patterns
Make patterns starting with a hyphen, or containing "--" not appear in
the generated docstring of `el-search-pattern': patterns with these
names are now considered internal.
---
packages/el-search/el-search.el | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index 28343d4..c2e8c0e 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -426,10 +426,11 @@ and return it."
(insert (or (cdr ud) main))
(mapc
(pcase-lambda (`(,symbol . ,fun))
- (when-let ((doc (documentation fun)))
- (insert "\n\n\n-- ")
- (setq doc (help-fns--signature symbol doc fun fun nil))
- (insert "\n" (or doc "Not documented."))))
+ (unless (string-match-p "\\`-\\|--" (symbol-name symbol)) ;let's
consider these "internal"
+ (when-let ((doc (documentation fun)))
+ (insert "\n\n\n-- ")
+ (setq doc (help-fns--signature symbol doc fun fun nil))
+ (insert "\n" (or doc "Not documented.")))))
(reverse el-search--pcase-macros))
(let ((combined-doc (buffer-string)))
(if ud (help-add-fundoc-usage combined-doc (car ud)) combined-doc)))))