From: Eli Zaretskii <eliz@gnu.org>
To: Eshel Yaron <me@eshelyaron.com>
Cc: sbaugh@janestreet.com, 63825@debbugs.gnu.org
Subject: bug#63825: 29.0.90; The header line should be hidden when empty
Date: Sat, 03 Jun 2023 08:44:42 +0300 [thread overview]
Message-ID: <83jzwl9k1h.fsf@gnu.org> (raw)
In-Reply-To: <m1o7lxhf0m.fsf@eshelyaron.com> (message from Eshel Yaron on Fri, 02 Jun 2023 21:53:45 +0300)
> From: Eshel Yaron <me@eshelyaron.com>
> 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.
next prev parent reply other threads:[~2023-06-03 5:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-01 13:37 bug#63825: 29.0.90; The header line should be hidden when empty Spencer Baugh
2023-06-01 16:14 ` Eli Zaretskii
2023-06-01 16:45 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-01 17:37 ` Spencer Baugh
2023-06-01 18:46 ` Eli Zaretskii
2023-06-01 20:22 ` Spencer Baugh
2023-06-02 6:19 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-02 11:36 ` Eli Zaretskii
2023-06-02 18:53 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-03 5:44 ` Eli Zaretskii [this message]
2023-06-03 7:28 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 7:03 ` Eli Zaretskii
2023-06-04 16:45 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-06 12:18 ` Eli Zaretskii
2023-06-06 12:28 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-02 6:23 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83jzwl9k1h.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=63825@debbugs.gnu.org \
--cc=me@eshelyaron.com \
--cc=sbaugh@janestreet.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).