From: Eli Zaretskii <eliz@gnu.org>
Date: Fri, 23 Jun 2023 10:47:53 +0000 (+0300)
Subject: Revert "; Fix last change"
X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=accff13e646c06f3ce526b62c5ca81a76361da6e;p=emacs.git

Revert "; Fix last change"

This reverts commit 05c2be28a3e97bd920d0bf8c8b59ec682a420cce.
This is part of removing the recently-added feature whereby
certain non-nil values of 'header-line-format' could signal
that the header line shall not be displayed.  The feature is
being reverted because its advantages are very minor, whereas
the complications it causes are serious.
---

diff --git a/src/window.c b/src/window.c
index 58f98e78354..164af6f67f0 100644
--- a/src/window.c
+++ b/src/window.c
@@ -5474,14 +5474,14 @@ window_wants_mode_line (struct window *w)
  * null_header_line_format:
  *
  * Return non-zero when header line format FMT indicates that the
- * header line should not be displayed at all, for windows on frame F.
+ * header line should not be displayed at all.
  *
  * This is when FMT is nil, or if FMT is a cons cell and either its
  * car is a symbol whose value as a variable is nil or void, or its
  * car is the symbol ':eval' and its cadr evaluates to nil.
  */
 static bool
-null_header_line_format (Lisp_Object fmt, struct frame *f)
+null_header_line_format (Lisp_Object fmt, struct frame * f)
 {
   Lisp_Object car;
   Lisp_Object val;
@@ -5532,7 +5532,7 @@ window_wants_header_line (struct window *w)
   Lisp_Object window_header_line_format =
     window_parameter (w, Qheader_line_format);
 
-  struct frame *f = WINDOW_XFRAME(w);
+  struct frame * f = WINDOW_XFRAME(w);
 
   return (WINDOW_LEAF_P (w)
 	  && !MINI_WINDOW_P (w)
@@ -5540,7 +5540,8 @@ window_wants_header_line (struct window *w)
 	  && !EQ (window_header_line_format, Qnone)
 	  && (!null_header_line_format (window_header_line_format, f)
 	      || !null_header_line_format (BVAR (XBUFFER (WINDOW_BUFFER (w)),
-						 header_line_format), f))
+						 header_line_format),
+					   f))
 	  && (WINDOW_PIXEL_HEIGHT (w)
 	      > (window_wants_mode_line (w)
 		 ? 2 * WINDOW_FRAME_LINE_HEIGHT (w)