emacs-diffs
[Top][All Lists]
Advanced

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

master 412cc0212d7: Eldoc: play nice with mode-line-format-right-align (


From: João Távora
Subject: master 412cc0212d7: Eldoc: play nice with mode-line-format-right-align (bug#68547)
Date: Sat, 20 Jan 2024 07:00:52 -0500 (EST)

branch: master
commit 412cc0212d7bf2f2d0f49fdb8a4ff69480b8afed
Author: Eshel Yaron <me@eshelyaron.com>
Commit: João Távora <joaotavora@gmail.com>

    Eldoc: play nice with mode-line-format-right-align (bug#68547)
    
    * lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message): Avoid nesting
    'mode-line-format', since that breaks 'mode-line-format-right-align'.
---
 lisp/emacs-lisp/eldoc.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 06970d40e8a..912a7357ca7 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -312,9 +312,11 @@ Otherwise, it displays the message like `message' would."
                      (not (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)))
+                  (funcall
+                   (if (listp mode-line-format) #'append #'list)
+                   (list "" '(eldoc-mode-line-string
+                             (" " eldoc-mode-line-string " ")))
+                   mode-line-format)))
           (setq eldoc-mode-line-string
                 (when (stringp format-string)
                   (apply #'format-message format-string args)))



reply via email to

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