all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Rainer M Krug <Rainer@krugs.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Set font
Date: Tue, 27 Sep 2016 14:17:25 +0200	[thread overview]
Message-ID: <m27f9xr0yy.fsf@krugs.de> (raw)
In-Reply-To: <m2bmz9r1np.fsf@krugs.de> (Rainer M. Krug's message of "Tue, 27 Sep 2016 14:02:34 +0200")

[-- Attachment #1: Type: text/plain, Size: 1535 bytes --]

Rainer M Krug <Rainer@krugs.de> writes:

> Rainer M Krug <Rainer@krugs.de> writes:
>
>> Hi
>>
>> I would like to set the font for all source code editing modes to a
>> specific font (Monoid https://larsenwork.com/monoid/ ). I have defined a
>> function rmk/set-font-to-programming-font which sets the font and also
>> have added this function to the ess-mode-hook:
>>
>> (defun rmk/set-font-to-programming-font ()
>>   "Change font in current window to a monospaced font."
>>   (interactive)
>>   (set-frame-font "Monoid-12" nil t))
>>
>> (add-hook 'ess-mode-hook 'rmk/set-programming-font)
>>
>> Now what is the easiest to use this font for all source languages
>> (emacs-lisp-mode, c-mode, c++-mode, ...)? Do I have to add to all of
>> them the function to the hook, or is there an easier approach which
>> sets the font for all these languages?
>
> And I just realized - the font stays when I switch back to another
> buffer - but I only want to have it on specific buffers - how can I do
> this?

I have it now only for the buffer by using:

--8<---------------cut here---------------start------------->8---
(defun rmk/set-buffer-face-mode-programming ()
  "Sets a fixed width (monospace) font in current buffer"
  (interactive)
  (setq buffer-face-mode-face '(:family "Monoid" :height 120))
  (buffer-face-mode))
--8<---------------cut here---------------end--------------->8---


>
>
>
>>
>> Thanks,
>>
>> Rainer

-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 454 bytes --]

  reply	other threads:[~2016-09-27 12:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-27 11:57 Set font Rainer M Krug
2016-09-27 12:02 ` Rainer M Krug
2016-09-27 12:17   ` Rainer M Krug [this message]
2016-09-28  9:59 ` Rasmus
  -- strict thread matches above, loose matches on Subject: below --
2002-08-20 17:08 set font Wu XiaoGuang
2002-08-20  9:14 ` Charles Muller
2002-08-20 18:37   ` Wu XiaoGuang

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

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

  git send-email \
    --in-reply-to=m27f9xr0yy.fsf@krugs.de \
    --to=rainer@krugs.de \
    --cc=help-gnu-emacs@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.