From 035d7ac7e42f1e1e82f4948e19ef8d8188bb902c Mon Sep 17 00:00:00 2001 From: Nick Helm Date: Sat, 21 Oct 2017 11:41:28 +0300 Subject: [PATCH] Prevent eldoc from changing the mode line * lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message): Don't change the mode line if it is not displayed. (Bug#28697) --- lisp/emacs-lisp/eldoc.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index cba9a00fa5a..ad08977b81a 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -264,12 +264,13 @@ Otherwise work like `message'." (or (window-in-direction 'above (minibuffer-window)) (minibuffer-selected-window) (get-largest-window))) + (when mode-line-format (unless (and (listp mode-line-format) (assq 'eldoc-mode-line-string mode-line-format)) (setq mode-line-format (list "" '(eldoc-mode-line-string (" " eldoc-mode-line-string " ")) - mode-line-format))) + mode-line-format)))) (setq eldoc-mode-line-string (when (stringp format-string) (apply #'format-message format-string args))) -- 2.39.2