[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: |
Eshel Yaron |
Subject: |
bug#63825: 29.0.90; The header line should be hidden when empty |
Date: |
Sat, 03 Jun 2023 10:28:20 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eli Zaretskii <eliz@gnu.org> writes:
>> 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.
Indeed, my patch doesn't change `format-mode-line`. I removed this part
because AFAICT it's wrong: it suggests that if `format-mode-line`
returns the empty string with some argument, then using that argument as
the value of `header-line-format` will result in no header line at all.
But that's not the case (and it wasn't before my patch), because
`(format-mode-line header-line-format)` returning an empty string means
that the header line is either absent or empty, not necessarily absent.
>> + 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.
Got it, here's an updated patch:
v2-0001-Avoid-header-line-with-some-empty-non-nil-formats.patch
Description: Text Data
--
Best,
Eshel
- 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, 2023/06/03
- bug#63825: 29.0.90; The header line should be hidden when empty,
Eshel Yaron <=
- 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