unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#48408: BUGFIX: window-default-font-height: check for nil string
@ 2021-05-14  1:15 Boruch Baum
  2021-05-14  6:39 ` Eli Zaretskii
  2021-05-14  7:09 ` martin rudalics
  0 siblings, 2 replies; 30+ messages in thread
From: Boruch Baum @ 2021-05-14  1:15 UTC (permalink / raw)
  To: 48408

In package windows.el, function `window-default-font-height' calls
function `face-font', which can return a nil value, but performs a
`string-equal' operation on the output without checking for that
possibiliy.

I came across this in an unusual case, of having an 'emacs -nw' server
an 'emacsclient -nw', and opening a GUI emacsclient to connect to it.
From that point forward until the fix, every *second* attempt to use the
minibuffer on the 'emacsclient -nw' would fail.

The fix I'm using is:

    (if (and (display-multi-font-p (frame-parameter frame 'display))
             (stringp default-font)  ; <<<---!!!
	     (not (string-equal (frame-parameter frame 'font) default-font)))

But there could be other considerations to performing things in another way.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0





^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2022-07-12 22:59 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-14  1:15 bug#48408: BUGFIX: window-default-font-height: check for nil string Boruch Baum
2021-05-14  6:39 ` Eli Zaretskii
2021-05-16  3:06   ` Boruch Baum
2021-05-16  4:22     ` Eli Zaretskii
2021-05-16  4:42       ` Boruch Baum
2021-05-16  5:25         ` Eli Zaretskii
2021-05-16  6:05           ` Boruch Baum
2021-05-16  6:32             ` Eli Zaretskii
2021-05-16  6:29           ` Eli Zaretskii
     [not found]             ` <20210516065904.5wweuipi23oy5g2x@E15-2016.optimum.net>
2021-05-16  8:30               ` Eli Zaretskii
2021-05-16  8:35                 ` martin rudalics
2021-05-16  8:56                   ` Eli Zaretskii
2021-05-16  9:08                     ` Eli Zaretskii
2021-05-16  9:28                       ` martin rudalics
2021-05-16  9:36                         ` Eli Zaretskii
2021-05-19  4:00                 ` Boruch Baum
2021-05-19  7:45                   ` martin rudalics
2021-05-19 10:39                     ` Boruch Baum
2021-05-19 11:29                   ` Eli Zaretskii
2021-05-19 11:55                     ` Boruch Baum
2021-05-19 14:17                       ` Eli Zaretskii
2021-05-19 16:01                   ` Eli Zaretskii
2022-07-12 22:59                     ` Lars Ingebrigtsen
2021-05-16  8:31             ` martin rudalics
2021-05-14  7:09 ` martin rudalics
2021-05-14  7:15   ` martin rudalics
2021-05-14  7:26     ` Eli Zaretskii
2021-05-14  8:15       ` martin rudalics
2021-05-14 10:45         ` Eli Zaretskii
2021-05-16  3:11   ` Boruch Baum

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).