From: Nick Helm Date: Sat, 21 Oct 2017 08:41:28 +0000 (+0300) Subject: Prevent eldoc from changing the mode line X-Git-Tag: emacs-26.0.91~501 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=035d7ac7e42f1e1e82f4948e19ef8d8188bb902c;p=emacs.git 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) --- 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)))