From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#42397: [PATCH 06/14] * lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message): Fix indentation. Date: Fri, 17 Jul 2020 11:49:40 +0100 Message-ID: <875zamtnzv.fsf@tcd.ie> References: <20200716145456.17531-1-jonas@bernoul.li> <20200716145456.17531-2-jonas@bernoul.li> <20200716145456.17531-3-jonas@bernoul.li> <20200716145456.17531-4-jonas@bernoul.li> <20200716145456.17531-5-jonas@bernoul.li> <20200716145456.17531-6-jonas@bernoul.li> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4981"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 42397@debbugs.gnu.org To: Jonas Bernoulli Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 17 12:50:13 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 1jwNwT-0001D5-F6 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 17 Jul 2020 12:50:13 +0200 Original-Received: from localhost ([::1]:34718 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jwNwS-0003nh-Cx for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 17 Jul 2020 06:50:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43348) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jwNwI-0003nI-OX for bug-gnu-emacs@gnu.org; Fri, 17 Jul 2020 06:50:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45228) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jwNwI-0003Qm-FN for bug-gnu-emacs@gnu.org; Fri, 17 Jul 2020 06:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jwNwI-000140-D2 for bug-gnu-emacs@gnu.org; Fri, 17 Jul 2020 06:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Jul 2020 10:50:02 +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.15949829914065 (code B ref 42397); Fri, 17 Jul 2020 10:50:02 +0000 Original-Received: (at 42397) by debbugs.gnu.org; 17 Jul 2020 10:49:51 +0000 Original-Received: from localhost ([127.0.0.1]:56774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jwNw6-00013U-S0 for submit@debbugs.gnu.org; Fri, 17 Jul 2020 06:49:51 -0400 Original-Received: from mail-wr1-f41.google.com ([209.85.221.41]:39428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jwNw4-00013F-2v for 42397@debbugs.gnu.org; Fri, 17 Jul 2020 06:49:50 -0400 Original-Received: by mail-wr1-f41.google.com with SMTP id q5so10489499wru.6 for <42397@debbugs.gnu.org>; Fri, 17 Jul 2020 03:49:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=7r5zqFCOp5/gkupaMJinkeVrg0262gt0IebxEQ8os30=; b=1jFAmOoqULahp8x4QaSd5HrC3UT9oPeD7PBaun7HkCeK71+qvzMIgAM+OwfQoJcMXU 1X1Kdo6wzCWIREQTRO1vKDQo5P3BLsYZ3J3KKzZ6JXSaKf6mta5TNHmMyXtFicmBMWRw p0gNTG3z6h82/9BG99QzBMW3Z+xQQscKCyKuN1KWR8bLR1yGf9gFkc3i/LzmuiRGGHkC bD4DrxYf1/Ut3ZPWOQJ5nG+KpfhcdwBbYZR6Vf5133IIjxoiCBgLcSlqHWNisnFKmAym cbAqgnkIHcky5T2n737xrvl5KsZNrrWIPrZrmJYPnPfBc5xvcK6rr7exu9Myutv9nHy/ QtJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=7r5zqFCOp5/gkupaMJinkeVrg0262gt0IebxEQ8os30=; b=s/RqTvSqjhLSAHmRoc+6Os9qL2US/smhuMhpaghckqJPrlJuXwLiZt1ERSNRVuKIBy q+7ioxWtd6jscCR9+zgn+8pGLbrrcOVsYGg5rRZXxin3rgdH6ERw+4Y8LXvKh/KeXiwK WHF7ilifUgQ2k0OSIq4Wj4NjPdCvnR7KXZnj11LuVjMektrIZlUkC89l5O1OWwMDXxC8 sG1YMyE2Wce2ZSlTv95ZklOG2AZUXxp7fStmOnMF4sjgomVnLXSUMQOpL+JaHrxP+0mA ELRqxTMMim5dfnFdqNYC1PcK/Y1m/CsQTHWFJHlfOrWnR4J9QKGkQU8k4jXN3gJ2IaTr dUAQ== X-Gm-Message-State: AOAM53124exBqcc5rDOLQBVbHz1mwufPRuTy3eg9TPUUd/684nRVzDSm 9qHGRxZJLJICnzTcFyYdrYwt5A== X-Google-Smtp-Source: ABdhPJxp92IvagS0wrKAoIXx19PfMZVn7TaP2T3XpK59DEOLyqXHFCjs7oiBK2PdT/Jf8BLVsvugjA== X-Received: by 2002:adf:f60c:: with SMTP id t12mr10444494wrp.198.1594982982053; Fri, 17 Jul 2020 03:49:42 -0700 (PDT) Original-Received: from localhost ([2a02:8084:20e2:c380:92bd:1bfd:38fc:fae2]) by smtp.gmail.com with ESMTPSA id v7sm13971447wrp.45.2020.07.17.03.49.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jul 2020 03:49:41 -0700 (PDT) In-Reply-To: <20200716145456.17531-6-jonas@bernoul.li> (Jonas Bernoulli's message of "Thu, 16 Jul 2020 16:54:48 +0200") 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:183137 Archived-At: Jonas Bernoulli writes: > --- > lisp/emacs-lisp/eldoc.el | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el > index 510dff9ed0..90dce4a317 100644 > --- a/lisp/emacs-lisp/eldoc.el > +++ b/lisp/emacs-lisp/eldoc.el > @@ -285,13 +285,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)) > - (setq mode-line-format > - (list "" '(eldoc-mode-line-string > - (" " eldoc-mode-line-string " ")) > - mode-line-format)))) > + (when mode-line-format > + (unless (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)))) 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 (list "" '(eldoc-mode-line-string (" " eldoc-mode-line-string " ")) mode-line-format))) or similar. > (setq eldoc-mode-line-string > (when (stringp format-string) > (apply #'format-message format-string args))) Thanks, -- Basil