bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#36886: 26.2; (global-eldoc-mode -1) should disable eldoc completely


From: Dmitry Gutov
Subject: bug#36886: 26.2; (global-eldoc-mode -1) should disable eldoc completely
Date: Thu, 1 Aug 2019 16:38:28 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 01.08.2019 14:37, Basil L. Contovounesios wrote:
Sanel Zukan <sanelz@gmail.com> writes:

When Emacs is run with (global-eldoc-mode -1), eldoc is not completely
disabled because it will show function arguments inside mode-line.

I believe intention behind (global-eldoc-mode -1) should be that all
eldoc facility gets disabled. Right now, the only way to stop poping
stuff in mode-line is this:

  (setq-default eldoc-message-function 'ignore)

CCing Dmitry, who explicitly enabled eldoc-mode in read--expression as
part of bug#27202: https://debbugs.gnu.org/27202.

My gut says that bug should be fixable within eldoc.el, without having
to tweak read--expression, but I'm not familiar with eldoc.

I'm not sure what's the best way. But this should help:

diff --git a/lisp/simple.el b/lisp/simple.el
index 0bc39f08c0..4eec9e732d 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1583,7 +1583,8 @@ read--expression
           ;; FIXME: call emacs-lisp-mode?
(add-function :before-until (local 'eldoc-documentation-function)
                         #'elisp-eldoc-documentation-function)
-          (eldoc-mode 1)
+          (when global-eldoc-mode
+            (eldoc-mode 1))
           (add-hook 'completion-at-point-functions
                     #'elisp-completion-at-point nil t)
           (run-hooks 'eval-expression-minibuffer-setup-hook))





reply via email to

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