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 06/14] * lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message): Fix indentation. Date: Fri, 17 Jul 2020 20:23:37 +0200 Message-ID: <87a6zyngpi.fsf@bernoul.li> 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> <875zamtnzv.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11539"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 42397@debbugs.gnu.org To: "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 17 20:24:39 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 1jwV2F-0002tk-9A for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 17 Jul 2020 20:24:39 +0200 Original-Received: from localhost ([::1]:48716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jwV2E-0005x0-54 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 17 Jul 2020 14:24:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jwV1e-0005wp-Qt for bug-gnu-emacs@gnu.org; Fri, 17 Jul 2020 14:24:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46501) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jwV1d-0005fJ-QS for bug-gnu-emacs@gnu.org; Fri, 17 Jul 2020 14:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jwV1d-00028S-Jx for bug-gnu-emacs@gnu.org; Fri, 17 Jul 2020 14:24:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jonas Bernoulli Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Jul 2020 18:24:01 +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.15950102208174 (code B ref 42397); Fri, 17 Jul 2020 18:24:01 +0000 Original-Received: (at 42397) by debbugs.gnu.org; 17 Jul 2020 18:23:40 +0000 Original-Received: from localhost ([127.0.0.1]:58047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jwV1H-00027m-SG for submit@debbugs.gnu.org; Fri, 17 Jul 2020 14:23:40 -0400 Original-Received: from mail.hostpark.net ([212.243.197.30]:60860) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jwV1G-00027e-No for 42397@debbugs.gnu.org; Fri, 17 Jul 2020 14:23:39 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id 94AE216617; Fri, 17 Jul 2020 20:23:37 +0200 (CEST) X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Original-Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail0.hostpark.net [127.0.0.1]) (amavisd-new, port 10124) with ESMTP id 5f0UlPaoDuTc; Fri, 17 Jul 2020 20:23:37 +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 ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id 67036165CB; Fri, 17 Jul 2020 20:23:37 +0200 (CEST) In-Reply-To: <875zamtnzv.fsf@tcd.ie> 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:183161 Archived-At: "Basil L. Contovounesios" writes: > Jonas Bernoulli 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 ...))