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

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

[elpa] externals/el-search 07bed84 330/332: [el-search] Fix eldoc suppor


From: Stefan Monnier
Subject: [elpa] externals/el-search 07bed84 330/332: [el-search] Fix eldoc support for uncompiled patterns
Date: Tue, 1 Dec 2020 15:49:16 -0500 (EST)

branch: externals/el-search
commit 07bed84dd8ae9e4c6c648834224b1d33fdbd51e0
Author: Michael Heerdegen <michael_heerdegen@web.de>
Commit: Michael Heerdegen <michael_heerdegen@web.de>

    [el-search] Fix eldoc support for uncompiled patterns
    
    * packages/el-search/el-search.el
    (el-search-eldoc-documentation-function): Make it work for uncompiled
    pattern definitions.
---
 el-search.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/el-search.el b/el-search.el
index 46c3260..4e9cd98 100644
--- a/el-search.el
+++ b/el-search.el
@@ -987,15 +987,16 @@ nil."
     (pcase-let (((and current-fsym `(,fnsym ,index))
                  (elisp--fnsym-in-current-sexp)))
       (defvar el-search--pcase-macros) ;defined later
-      (let (pattern-def  docstring  help)
+      (let (pattern-def  help)
         (and fnsym
              (setq pattern-def (cdr (assoc fnsym el-search--pcase-macros)))
              ;; This is what `elisp-get-fnsym-args-string' (which we can't 
use) does
-             (setq docstring (documentation pattern-def))
-             (setq help (help-split-fundoc docstring fnsym))
+             (setq help (if-let* ((docstring (documentation pattern-def))
+                                  (from-docstring (help-split-fundoc docstring 
fnsym)))
+                            (elisp-function-argstring (car from-docstring))
+                          (prin1-to-string (help-function-arglist 
pattern-def))))
              (elisp--highlight-function-argument
-              current-fsym (elisp-function-argstring (car help))
-              index (concat (symbol-name fnsym) ": ")))))))
+              current-fsym help index (concat (symbol-name fnsym) ": ")))))))
 
 (defvar el-search--this-session-match-count-data nil)
 



reply via email to

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