unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: David Reitter <david.reitter@gmail.com>
Subject: Mode-specific font setting?
Date: Mon, 25 Apr 2005 19:35:43 +0100	[thread overview]
Message-ID: <85241ee522fb59bebe6eeb599d39b831@gmail.com> (raw)

How do I set a mode-specific font?
I've tried this hack:

  (add-hook 'after-change-major-mode-hook	
  	  (lambda ()
  	  (case major-mode
	  ('text-mode
  		(set-frame-font "fontset-lucida14")
)))
)

Unfortunately it doesn't work, obviously because the selected frame is 
a different one when the hook is called (find-file-other-frame was used 
to open a file), so the font gets set in the wrong frame.

Maybe there is a more elegant way (customization?) than using a hook, 
anyways.

Thanks!

             reply	other threads:[~2005-04-25 18:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-25 18:35 David Reitter [this message]
2005-04-26 19:43 ` Mode-specific font setting? Kevin Rodgers
  -- strict thread matches above, loose matches on Subject: below --
2005-04-26  6:42 David Reitter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85241ee522fb59bebe6eeb599d39b831@gmail.com \
    --to=david.reitter@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).