From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jonas Bernoulli Newsgroups: gmane.emacs.bugs Subject: bug#42397: [PATCH v2 06/16] Merge two conditions and fix indentation Date: Mon, 10 Aug 2020 23:14:20 +0200 Message-ID: <20200810211430.22502-7-jonas@bernoul.li> References: <20200716144707.16857-1-jonas@bernoul.li> <20200810211430.22502-1-jonas@bernoul.li> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32095"; mail-complaints-to="usenet@ciao.gmane.io" To: 42397@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 10 23:17:02 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k5FAD-0008FA-TO for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 Aug 2020 23:17:01 +0200 Original-Received: from localhost ([::1]:53300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k5FAC-0003e2-Ot for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 Aug 2020 17:17:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37254) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k5F8L-0002hN-JY for bug-gnu-emacs@gnu.org; Mon, 10 Aug 2020 17:15:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54333) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k5F8L-0005le-9O for bug-gnu-emacs@gnu.org; Mon, 10 Aug 2020 17:15:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k5F8L-0007Ui-5V for bug-gnu-emacs@gnu.org; Mon, 10 Aug 2020 17:15:05 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jonas Bernoulli Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Aug 2020 21:15:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42397 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 42397-submit@debbugs.gnu.org id=B42397.159709410328782 (code B ref 42397); Mon, 10 Aug 2020 21:15:05 +0000 Original-Received: (at 42397) by debbugs.gnu.org; 10 Aug 2020 21:15:03 +0000 Original-Received: from localhost ([127.0.0.1]:37642 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5F8J-0007U3-4L for submit@debbugs.gnu.org; Mon, 10 Aug 2020 17:15:03 -0400 Original-Received: from mail.hostpark.net ([212.243.197.30]:56130) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5F8H-0007TK-Uu for 42397@debbugs.gnu.org; Mon, 10 Aug 2020 17:15:02 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id 5C72916B2A; Mon, 10 Aug 2020 23:15:01 +0200 (CEST) X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Original-Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail1.hostpark.net [127.0.0.1]) (amavisd-new, port 10124) with ESMTP id XZpRqG5o_nd6; Mon, 10 Aug 2020 23:15:01 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id 2EA5915FD0; Mon, 10 Aug 2020 23:15:01 +0200 (CEST) X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200810211430.22502-1-jonas@bernoul.li> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:184590 Archived-At: 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 19b3bd78ae..4825b5c5e6 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -289,13 +289,13 @@ eldoc-minibuffer-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)) + (when (and mode-line-format + (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)))) + mode-line-format))) (setq eldoc-mode-line-string (when (stringp format-string) (apply #'format-message format-string args))) -- 2.28.0