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!



_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Reply via email to