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

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

[nongnu] elpa/helm fe07184122 3/3: Try to fix eldoc in mode-line the bes


From: ELPA Syncer
Subject: [nongnu] elpa/helm fe07184122 3/3: Try to fix eldoc in mode-line the best as possible
Date: Sat, 30 Jul 2022 00:58:54 -0400 (EDT)

branch: elpa/helm
commit fe071841226e1a2b0a8196d71f0dc76f27901712
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Try to fix eldoc in mode-line the best as possible
---
 helm-eval.el | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/helm-eval.el b/helm-eval.el
index 0b87b06f4d..cc056d2ecc 100644
--- a/helm-eval.el
+++ b/helm-eval.el
@@ -118,6 +118,9 @@ Should take one arg: the string to display."
   (with-selected-window (minibuffer-window)
     (push (current-buffer) helm-eldoc-active-minibuffers-list)))
 
+;; From emacs-28.1: As the eldoc API is nowaday a pain to use, try to
+;; provide some eldoc in mode-line the best as possible (may break at
+;; some point).
 (defun helm-eldoc-show-in-eval ()
   "Return eldoc in mode-line for current minibuffer input."
   (let ((buf (window-buffer (active-minibuffer-window))))
@@ -131,8 +134,12 @@ Should take one arg: the string to display."
                    (info-fn (eldoc-fnsym-in-current-sexp))
                    (doc     (or (eldoc-get-var-docstring sym)
                                 (eldoc-get-fnsym-args-string
-                                 (car info-fn) (cadr info-fn)))))
-              (when doc (funcall helm-eldoc-in-minibuffer-show-fn doc)))))
+                                 (car info-fn) (cadr info-fn))))
+                   (all (format "%s: %s"
+                                (propertize (symbol-name (or sym (car 
info-fn)))
+                                            'face 
'font-lock-function-name-face)
+                                doc)))
+              (when doc (funcall helm-eldoc-in-minibuffer-show-fn all)))))
       (error (message "Eldoc in minibuffer error: %S" err) nil))))
 
 (defun helm-show-info-in-mode-line (str)



reply via email to

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