From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Rainer M Krug Newsgroups: gmane.emacs.help Subject: Re: Set font Date: Tue, 27 Sep 2016 14:17:25 +0200 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1474984718 18979 195.159.176.226 (27 Sep 2016 13:58:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 27 Sep 2016 13:58:38 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (darwin) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 27 15:58:31 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bostj-0002Kl-Ua for geh-help-gnu-emacs@m.gmane.org; Tue, 27 Sep 2016 15:58:16 +0200 Original-Received: from localhost ([::1]:51221 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bosti-0005gG-Br for geh-help-gnu-emacs@m.gmane.org; Tue, 27 Sep 2016 09:58:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1borKL-00066W-Et for help-gnu-emacs@gnu.org; Tue, 27 Sep 2016 08:17:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1borKH-00079o-0T for help-gnu-emacs@gnu.org; Tue, 27 Sep 2016 08:17:37 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.135]:60957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1borKG-00079i-M8 for help-gnu-emacs@gnu.org; Tue, 27 Sep 2016 08:17:32 -0400 Original-Received: from Rainers-MacBook-Pro.local ([88.186.171.7]) by mrelayeu.kundenserver.de (mreue005) with ESMTPSA (Nemesis) id 0M36tX-1ayxQa07Vf-00srOO; Tue, 27 Sep 2016 14:17:31 +0200 In-Reply-To: (Rainer M. Krug's message of "Tue, 27 Sep 2016 14:02:34 +0200") X-Provags-ID: V03:K0:6gFH1o8+Empmw89fjmRv6NzSxgH4gBCf5qntLnVeDXbAKC61HT9 serreaemcjBKHDttmfnYMu//tYWwLyxdrE2JfvYa52UQeMlMh13oISizIOFYWHGFmwSMj6x MpMCZvszgN/OhrdLYbQ6fGdc6bg8nRxiRrKVVBOp8/x2Y++vXDNl0slth2NbuDZObkMrhfL 8ryEj5TPii3mUz4l83WMA== X-UI-Out-Filterresults: notjunk:1;V01:K0:4l4yntO6AGM=:7q3sK76qiJyJFXJMYaT9B7 pkam2JX9SlRWlAlF+K1jZYcXHPioh4jmJuF5ScLGyAPRHYqCgWjxccMTb2rCLSbVTyc9hdrSO y2fhxpvGh8Y2xtWv8C3PyvNkQu3Xcr1JiJObChEVz/GdzZskn/w+0vHrLF843f3Hy8W7UYJgS GjwyfgRemhdafZav7slBqZF17wmmU2YxECLd9lzttaGo2tFg9PR0Kg9U2E+ubwYcU0PR1Bc/p 7GzLUtFHEFxuDw29kbUFI9bSJawjsk84DzOtK3S6l7ttzWRj1mpkluO5MoJiDs+wnbS20qkDP dwhhNXlcCZWwc555cQa7KjpFopWMXUazW5lckiL3eREziMzVZh+mlfq8Ckhu16FdsnSGd/Sza 2a9euvqE4V0HwwUr6/W2TDcE+Vn7EQmOHcj8VmQlswAcRN2Q+QmM4mqxUsIQP3gEvYG/PZnXm 5Nup5tRBBtoOdxlhXeoh5/Upp1iqBIOmVx+zA3MwJzrJTOebJFuW0x+iTVfClOfgvr+zncXnj QEmNxzwMs231PnNDPprZ31qtm2ljDMywo0qIvup80gRLqFf95yKcOFaETq7aM0YzDSoP7yNJv HvytDSgHEeG2WZelyCxaSFvMGRTaIvS0XKRKnYay/nRCsghmHDaSlzOQ9rdm94owjOE+/gZQ4 154bptXeqmPPPDE6c2gJIffgfJISedZzeAYizhbIWK4KZmp5tcH59DcXRG+/WAYbVoSw= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.135 X-Mailman-Approved-At: Tue, 27 Sep 2016 09:31:07 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111407 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Rainer M Krug writes: > Rainer M Krug 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: =2D-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)) =2D-8<---------------cut here---------------end--------------->8--- > > > >> >> Thanks, >> >> Rainer =2D-=20 Rainer M. Krug email: Rainerkrugsde PGP: 0x0F52F982 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJX6mNZAAoJENvXNx4PUvmC454H/23LdreGvW+IlPNS58rnWugN YOGFxgdHzN6V6yC6PZCsEDf+N2OfYScfPFrYdt8sh0Unf5hNe4UhCV99sjP9HyXY AEpdPMMl1PwcBqxhNGBb24RTS+NRC6UosuLC4DdeBqq8/0e2HrpjyYwbhEaKnEQc fLe65SEZBDII6b+jOFbg+bjOhC4VnCvdeLaN0JMB67tToCL1qoDsUmrJXRf+PaWH ffjYlFjHAsGh8Knx2tIMHCIKTJnmWuqx+WPX4kWLRih58dcKnrj3ER+P3UDa5byw qgJ42shzofuv4s+w0A7txpjBL3f1RYCiZbhVU/EqDNZtahGZqrxRe9/LdLre9sQ= =HWPu -----END PGP SIGNATURE----- --=-=-=--