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#63825: 29.0.90; The header line should be hidden when empty Date: Sat, 03 Jun 2023 08:44:42 +0300 Message-ID: <83jzwl9k1h.fsf@gnu.org> References: <838rd3cg7u.fsf@gnu.org> <83353bc97b.fsf@gnu.org> <83mt1iayfj.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31463"; mail-complaints-to="usenet@ciao.gmane.io" Cc: sbaugh@janestreet.com, 63825@debbugs.gnu.org To: Eshel Yaron Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 03 07:45:31 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 1q5K4w-0007zO-Fd for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Jun 2023 07:45:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q5K4k-0002fM-5O; Sat, 03 Jun 2023 01:45:18 -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 1q5K4W-0002bP-AM for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2023 01:45:06 -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 1q5K4U-0005qH-A6 for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2023 01:45:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q5K4U-0001ak-6C for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2023 01:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Jun 2023 05:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63825 X-GNU-PR-Package: emacs Original-Received: via spool by 63825-submit@debbugs.gnu.org id=B63825.16857710416011 (code B ref 63825); Sat, 03 Jun 2023 05:45:02 +0000 Original-Received: (at 63825) by debbugs.gnu.org; 3 Jun 2023 05:44:01 +0000 Original-Received: from localhost ([127.0.0.1]:41401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5K3V-0001Yg-FJ for submit@debbugs.gnu.org; Sat, 03 Jun 2023 01:44:01 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5K3S-0001YM-D7 for 63825@debbugs.gnu.org; Sat, 03 Jun 2023 01:43:59 -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 1q5K3M-0005jM-OV; Sat, 03 Jun 2023 01:43:52 -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=3v2a6NFvyKTK3jaDobSGPU7zp4/NA7pXs1IIFlN7txk=; b=VHiDRo6NOmDY VO/HbRmSta8EuAwi/jFNmIGopesYd2cqZGePn6vwaVkCiTZ6EHXyduLaOF5rELOTnR1pD5tjvIRJ6 Lx6l/++iMyKfn5S34c7g6mfjLgrBwj7Yh7JDmbVWmMDqCNv0PAeaXWtyevFrEwLf0y3b/LBPfzbeW sQrEzV2NHgANd1vZQVBDcR9SlaAFc4Zt9xlmo4i/YIhBIXMov54LAx280V/5Tte2+xo8YrXsFNSz6 RHAZzjllpBpoP/1QrCSFPAXC0ew2MdppVnhXOcmUtXNWbajXUYlj7STZHE1FQK+s8heDNlRH3jobA yIliOXA1PO4KOx6wkorGkg==; 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 1q5K3M-0006GV-8Z; Sat, 03 Jun 2023 01:43:52 -0400 In-Reply-To: (message from Eshel Yaron on Fri, 02 Jun 2023 21:53:45 +0300) 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:262798 Archived-At: > From: Eshel Yaron > Cc: sbaugh@janestreet.com, 63825@debbugs.gnu.org > Date: Fri, 02 Jun 2023 21:53:45 +0300 > > Regarding this comment: > > >> +/** > >> + * null_header_line_format: > >> + * > >> + * Return 1 when header line format F indicates that the header line > >> + * should not be displayed at all. > > > We usually say "Return non-zero", not 1. > > I've changed the wording accordingly, note that some other functions > that return `bool` in src/window.c currently say "Return 1", > e.g. `window_wants_header_line`. Yes, those are leftovers from when those functions returned an 'int', not a 'bool', i.e. when we didn't require a C99 compiler. > Sure, here's the new patch: Thanks. > For example, @code{(format-mode-line header-line-format)} returns the > -text that would appear in the selected window's header line (@code{""} > -if it has no header line). @code{(format-mode-line header-line-format > -'header-line)} returns the same text, with each character > -carrying the face that it will have in the header line itself, and also > -redraws the header line. > +text that would appear in the selected window's header line. > +@code{(format-mode-line header-line-format 'header-line)} returns the > +same text, with each character carrying the face that it will have in > +the header line itself, and also redraws the header line. I'm not sure why you removed the part about an empty string. There's no change in format-mode-line to justify that, AFAICT, and neither should there be. > + if (CONSP (fmt)) > + { > + car = XCAR (fmt); > + if (SYMBOLP (car)) > + { > + if (EQ (car, QCeval) > + && NILP (Feval (XCAR (XCDR (fmt)), Qnil))) > + return true; This should use safe__eval (or something similar), not Feval, because it is called as part of redisplay, where we cannot allow any errors to throw to top-level.