Subject: bug#47234: 28.0.50; frame-inner-height fails without window system on tab-bar-height

From: Eli Zaretskii <[email-masked]>
Date: Thu, 18 Mar 2021 16:30:43 +0200

> From: "Basil L. Contovounesios" <[email-masked]>
> Date: Thu, 18 Mar 2021 13:41:04 +0000
> Cc: juri linkov <[email-masked]>
> 
> In a build --without-x:
> 
> 0. ./src/emacs -Q
> 1. (frame-inner-height) C-j
> 
>   Debugger entered--Lisp error: (void-function tab-bar-height)
>     tab-bar-height(#<frame F1 0x55aeb85320a0> t)
>     frame-inner-height()
>     (progn (frame-inner-height))
>     eval((progn (frame-inner-height)) t)
>     elisp--eval-last-sexp(t)
>     eval-last-sexp(t)
>     eval-print-last-sexp(nil)
>     funcall-interactively(eval-print-last-sexp nil)
>     call-interactively(eval-print-last-sexp nil nil)
>     command-execute(eval-print-last-sexp)
> 
> The obvious band-aid is to check (fboundp 'tab-bar-height) in
> frame-inner-height, but shouldn't we count 1 line when tab-bar-mode is
> enabled even --without-x?  IOW, can/should tab-bar-height or similar be
> defined regardless of HAVE_WINDOW_SYSTEM?  What's TRT here?

TRT is to teach Emacs to return the tab-bar height on TTY frames as
well.  But I don't think defining tab-bar-height on TTY frames is the
right way: the tab-bar is always 1 line high on those frames, so we
could simply use that hardcoded value instead of signaling an error, I
think.