From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.help Subject: Re: Changing the default font on the fly Date: Sun, 24 Jun 2012 02:11:00 +0200 Message-ID: <87ipehvaaz.fsf@gnuvola.org> References: <20120623171812.26a1fce1@mageiahp> <20120623185009.78679dea@mageiahp> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1340496677 29000 80.91.229.3 (24 Jun 2012 00:11:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 24 Jun 2012 00:11:17 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Eddie Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jun 24 02:11:17 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SiaQ8-0000wv-Sr for geh-help-gnu-emacs@m.gmane.org; Sun, 24 Jun 2012 02:11:17 +0200 Original-Received: from localhost ([::1]:50216 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SiaQ8-0007fg-Hu for geh-help-gnu-emacs@m.gmane.org; Sat, 23 Jun 2012 20:11:16 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36906) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SiaQ3-0007fI-Oz for help-gnu-emacs@gnu.org; Sat, 23 Jun 2012 20:11:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SiaQ1-0006uZ-PI for help-gnu-emacs@gnu.org; Sat, 23 Jun 2012 20:11:11 -0400 Original-Received: from smtp205.alice.it ([82.57.200.101]:40654) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SiaQ1-0006sg-El for help-gnu-emacs@gnu.org; Sat, 23 Jun 2012 20:11:09 -0400 Original-Received: from ambire (188.10.57.111) by smtp205.alice.it (8.6.023.02) id 4F421F7B0E8A2B35; Sun, 24 Jun 2012 02:10:48 +0200 Original-Received: from ttn by ambire with local (Exim 4.72) (envelope-from ) id 1SiaPt-0002Y0-7V; Sun, 24 Jun 2012 02:11:01 +0200 In-Reply-To: <20120623185009.78679dea@mageiahp> (Eddie's message of "Sat, 23 Jun 2012 18:50:09 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.57.200.101 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:85403 Archived-At: () Eddie () Sat, 23 Jun 2012 18:50:09 -0400 (set-frame-font "-unknown-Droid Sans Mono-normal-normal-normal-*-*-*-*-*-m-0-iso10646-1") and (set-frame-font "-unknown-Carmina Md BT-normal-normal-normal-*-*-*-*-*-*-0-iso10646-1") These are expressions. You can make them commands (one of which you already know: =E2=80=98typopunct-mode=E2=80=99) by placing a: ;; -*- emacs-lisp -*- (defun COMMAND-NAME () DOCSTRING (interactive) EXPRESSION) in ~/.emacs (or rather, two of them). For example: (defun use-droid-font () "Set the frame font to Droid Sans Mono." (interactive) (set-frame-font "-unknown-Droid Sans Mono-normal-normal-normal-*-*-*-*-*= -m-0-iso10646-1")) (defun use-carmina-font () "Set the frame font to Carmina Md BT." (interactive) (set-frame-font "-unknown-Carmina Md BT-normal-normal-normal-*-*-*-*-*-*= -0-iso10646-1")) Lastly, make keybindings to taste and you are done, and can demonstrably call yourself a programmer. Welcome, a world of bug creation awaits!