|
From: | Jonas Bernoulli |
Subject: | bug#42397: [PATCH 06/14] * lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message): Fix indentation. |
Date: | Fri, 17 Jul 2020 20:23:37 +0200 |
"Basil L. Contovounesios" <contovob@tcd.ie> writes: > Jonas Bernoulli <jonas@bernoul.li> writes: >> + (when mode-line-format >> + (unless (and (listp mode-line-format) >> + (assq 'eldoc-mode-line-string mode-line-format)) >> + (setq mode-line-format ...))) > > You can avoid reindenting this whole block by merging the conditions of > the redundantly nested when and unless: > > (unless (if (consp mode-line-format) > (assq 'eldoc-mode-line-string mode-line-format) > (not mode-line-format)) > (setq mode-line-format ...)) I suppose; but IMO this variant is trying to hard to be smart. > or similar. I think I will go with: (when (and mode-line-format (not (and (listp mode-line-format) (assq 'eldoc-mode-line-string mode-line-format)))) (setq mode-line-format ...))
[Prev in Thread] | Current Thread | [Next in Thread] |