]> git.eshelyaron.com Git - emacs.git/commitdiff
Eldoc: play nice with mode-line-format-right-align (bug#68547)
authorEshel Yaron <me@eshelyaron.com>
Sat, 20 Jan 2024 11:43:27 +0000 (05:43 -0600)
committerEshel Yaron <me@eshelyaron.com>
Sat, 20 Jan 2024 16:31:03 +0000 (17:31 +0100)
* lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message): Avoid nesting
'mode-line-format', since that breaks 'mode-line-format-right-align'.

(cherry picked from commit 412cc0212d7bf2f2d0f49fdb8a4ff69480b8afed)

lisp/emacs-lisp/eldoc.el

index cdf50b34f950513e816ec506b31b9fcf25ff40e0..912a7357ca7a228759c924614576345120ff5b0e 100644 (file)
@@ -313,9 +313,7 @@ Otherwise, it displays the message like `message' would."
                                (assq 'eldoc-mode-line-string mode-line-format))))
            (setq mode-line-format
                   (funcall
-                   (if (listp mode-line-format)
-                       #'append
-                     #'list)
+                   (if (listp mode-line-format) #'append #'list)
                    (list "" '(eldoc-mode-line-string
                              (" " eldoc-mode-line-string " ")))
                    mode-line-format)))