From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#64344: [PATCH] Make calculator work with customized mode-line Date: Thu, 29 Jun 2023 12:38:36 +0300 Message-ID: <83edlutxpf.fsf@gnu.org> References: <87jzvn4f4e.fsf@pub.pink> <83jzvmu2r1.fsf@gnu.org> <83fs6aty6b.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32589"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jm@pub.pink, 64344@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 29 11:39:12 2023 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 1qEo7M-0008Gm-Nr for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Jun 2023 11:39:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qEo7E-0007HS-PG; Thu, 29 Jun 2023 05:39:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEo7C-0007H5-OP for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2023 05:39:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qEo7C-0002DU-Fs for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2023 05:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qEo7B-0002Qz-SH for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2023 05:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Jun 2023 09:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64344 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 64344-submit@debbugs.gnu.org id=B64344.16880314989288 (code B ref 64344); Thu, 29 Jun 2023 09:39:01 +0000 Original-Received: (at 64344) by debbugs.gnu.org; 29 Jun 2023 09:38:18 +0000 Original-Received: from localhost ([127.0.0.1]:52283 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEo6T-0002Pk-RY for submit@debbugs.gnu.org; Thu, 29 Jun 2023 05:38:18 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEo6R-0002PQ-Su for 64344@debbugs.gnu.org; Thu, 29 Jun 2023 05:38:16 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEo6M-00026R-4Q; Thu, 29 Jun 2023 05:38:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=3r9EZxpS7Nv9SHZPSqxfG0EsaUUBpSJoEi5Vl4C0srE=; b=UMe9m/I7i5Gg wRv2IYn+D6KbAFuKLMM/raQOC17QO2bEPq087SVj6E19i+Hk/sWEciRek++Ig4BCy6o7ebrCibWju xu2q1+d9W3gw0XIfiNT4GSuUSYuCXYdNGTeP0ZKZw7jH//t1mkXvaZgeTFVynVtqMwLdgJ5Gt38is b/PRiyUKEU9cUoXhVbtynL6in2/mx4Vkq32FNtN1thRC3qdxqa3iXkxdQoqLA/bF8dE/9S5EsUyPq KqTOC2oEt4B18R3IzPPbXVQiJ7i+SdOZZse1Gi0OU7nudbzKJkYYB6a+QBRol+qKInZDjG6iDx/CW Jq2ids9JIeldWfD0BcTJ6A==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEo6L-0006gu-L2; Thu, 29 Jun 2023 05:38:09 -0400 In-Reply-To: (message from Andreas Schwab on Thu, 29 Jun 2023 11:31:06 +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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:264273 Archived-At: > From: Andreas Schwab > Cc: jm@pub.pink, 64344@debbugs.gnu.org > Date: Thu, 29 Jun 2023 11:31:06 +0200 > > On Jun 29 2023, Eli Zaretskii wrote: > > >> From: Andreas Schwab > >> Cc: john muhl , 64344@debbugs.gnu.org > >> Date: Thu, 29 Jun 2023 10:22:02 +0200 > >> > >> On Jun 29 2023, Eli Zaretskii wrote: > >> > >> >> - (and bx (or (not lh) (> lh 0)))) > >> >> + (and bx (or (not lh) (> (if (listp lh) (cdr lh) lh) 0)))) > >> > ^^^^^ > >> > Shouldn't that be 'consp' instead? 'listp' returns non-nil for nil > >> > argument. > >> > >> lh cannot be nil here, but it wouldn't make a difference anyway, since > >> (cdr nil) returns nil. > > > > I prefer not to have, nor force others, to analyze code in order to > > ensure it's correct. > > Then you need to add a comment, not change correct code. There's no reason whatsoever to comment correct code.