]> git.eshelyaron.com Git - emacs.git/commitdiff
Prevent eldoc from changing the mode line
authorNick Helm <nick@tenpoint.co.nz>
Sat, 21 Oct 2017 08:41:28 +0000 (11:41 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 21 Oct 2017 08:41:28 +0000 (11:41 +0300)
* 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

index cba9a00fa5a3ee4911da8364dee8e55f2db7fcf3..ad08977b81a2f03527dee50d947b6d2dcfd050a7 100644 (file)
@@ -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)))