GNU bug report logs - #42330
26.3; Emacs does not change fonts per mode when changing buffers

Previous Next

Package: emacs;

Reported by: Ray Dillinger <bear <at> sonic.net>

Date: Sat, 11 Jul 2020 23:01:02 UTC

Severity: normal

Found in version 26.3

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ray Dillinger <bear <at> sonic.net>
Cc: 42330 <at> debbugs.gnu.org
Subject: bug#42330: 26.3; Emacs does not change fonts per mode when changing buffers
Date: Sun, 12 Jul 2020 17:07:31 +0300
> From: Ray Dillinger <bear <at> sonic.net>
> Date: Sat, 11 Jul 2020 11:35:32 -0700
> 
> (add-hook 'text-mode-hook
>           (lambda()
>             (setq fill-column 9999) ; each "line" (as defined by ending
> in \n) is a paragraph.
>             '(buffer-face-set "xft:-PfEd-DejaVu Serif-normal-normal-
> semicondensed-*-21-*-*-*-*-0-iso10646-1 (#x4F)")

I believe the call to buffer-face-set above is in error, and thus
doesn't do what you want.

>             (set-frame-font "DejaVuSerifCondensed 16" t t)

And this switches the entire frame to the new font: again, not what
you want.

If you fix these two problems, i.e. use buffer-face-set correctly and
don't use set-frame-font at all, your setup will work as you want.

IOW, I don't think there's an Emacs bug here.




This bug report was last modified 5 years and 32 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.