[Top][All Lists]

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

master 0bc9e7b 05/15: Merge two conditions and fix indentation

From: Jonas Bernoulli
Subject: master 0bc9e7b 05/15: Merge two conditions and fix indentation
Date: Thu, 13 Aug 2020 05:36:54 -0400 (EDT)

branch: master
commit 0bc9e7b8f5658c3f4f2d881de3aed158c6f49021
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    Merge two conditions and fix indentation
    The motivation behind this change is that the indentation of some
    lines was outright wrong.  If we address that issue, then we might
    as well also address the issue that some code is needlessly nested
    an additional level.  That we can fix by merging the conditions.
    By doing these two changes in on commit we have to change the fewest
    lines.  Even though we are moving to using just spaces for indentation
    of the modified lines, other lines in the same function are left alone
    and continue to us tabs+spaces for indentation.  That is not "wrong",
    but just the style we are slowly migrating away from when touching
    lines for other reasons.
    Discussed in bug#42397.
    * lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message): Merge two
    conditions and fix indentation.
 lisp/emacs-lisp/eldoc.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 19b3bd7..4825b5c 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -289,13 +289,13 @@ Otherwise work like `message'."
             (or (window-in-direction 'above (minibuffer-window))
-    (when mode-line-format
-         (unless (and (listp mode-line-format)
-                      (assq 'eldoc-mode-line-string mode-line-format))
+          (when (and mode-line-format
+                     (not (and (listp mode-line-format)
+                               (assq 'eldoc-mode-line-string 
            (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)))

reply via email to

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