[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#63825: 29.0.90; The header line should be hidden when empty
From: |
Eli Zaretskii |
Subject: |
bug#63825: 29.0.90; The header line should be hidden when empty |
Date: |
Sat, 03 Jun 2023 08:44:42 +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.
- bug#63825: 29.0.90; The header line should be hidden when empty, Spencer Baugh, 2023/06/01
- bug#63825: 29.0.90; The header line should be hidden when empty, Eli Zaretskii, 2023/06/01
- bug#63825: 29.0.90; The header line should be hidden when empty, Eshel Yaron, 2023/06/01
- bug#63825: 29.0.90; The header line should be hidden when empty, Spencer Baugh, 2023/06/01
- bug#63825: 29.0.90; The header line should be hidden when empty, Eli Zaretskii, 2023/06/01
- bug#63825: 29.0.90; The header line should be hidden when empty, Spencer Baugh, 2023/06/01
- bug#63825: 29.0.90; The header line should be hidden when empty, Eshel Yaron, 2023/06/02
- bug#63825: 29.0.90; The header line should be hidden when empty, Eli Zaretskii, 2023/06/02
- bug#63825: 29.0.90; The header line should be hidden when empty, Eshel Yaron, 2023/06/02
- bug#63825: 29.0.90; The header line should be hidden when empty,
Eli Zaretskii <=
- bug#63825: 29.0.90; The header line should be hidden when empty, Eshel Yaron, 2023/06/03
- bug#63825: 29.0.90; The header line should be hidden when empty, Eli Zaretskii, 2023/06/04
- bug#63825: 29.0.90; The header line should be hidden when empty, Eshel Yaron, 2023/06/04
- bug#63825: 29.0.90; The header line should be hidden when empty, Eli Zaretskii, 2023/06/06
- bug#63825: 29.0.90; The header line should be hidden when empty, Eshel Yaron, 2023/06/06
- bug#63825: 29.0.90; The header line should be hidden when empty, Eli Zaretskii, 2023/06/02