Eli Zaretskii 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: