Clementson's Blog

Bits and pieces (mostly Lisp-related) that I collect from the ether.

December 2003
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
Nov  Jan

Some more useful Emacs code - Enable Greek fonts for pretty-lambda - in quack.el

Sunday, December 7, 2003

Ok, this one is for MS Windows only - it is apparently not an issue on Unix/Linux machines as the necessary fonts are available.

I like the pretty-lambda feature in Neil Van Dyke's quack.el - it sets up font lock display settings to show a lambda character rather than the word "lambda" (use Emacs customization or put "(setq quack-pretty-lambda-p t)" in your .emacs file to enable this). Unfortunately, with Emacs in MS Windows, the default font set does not include the Greek lambda character. The following code snippet will enable a variety of different language characters on MS Windows under Emacs. Note: I use a font size of 10 - if you use a different font size as your default, change the "100" value in the font definitions below (e.g. -- "120" for a font size of 12). Here's the code that you need in your .emacs file:

;;;; Set fonts up on MS Windows

(if mswindows-p
    (progn
      ;; Show as much as we can using fonts bundled with IE5
      (setq w32-standard-fontset-spec
	    "-*-Courier New-normal-r-*-*-*-100-*-*-c-*-fontset-courier,
   ascii:-*-Courier New-normal-r-*-*-*-100-*-*-c-*-iso8859-1,
   latin-iso8859-1:-*-Courier New-normal-r-*-*-*-100-*-*-c-*-iso8859-1,
   latin-iso8859-2:-*-Courier New-normal-r-*-*-*-100-*-*-c-*-iso8859-2,
   latin-iso8859-3:-*-Courier New-normal-r-*-*-*-100-*-*-c-*-iso8859-3,
   latin-iso8859-4:-*-Courier New-normal-r-*-*-*-100-*-*-c-*-iso8859-4,
   latin-iso8859-7:-*-Courier New-normal-r-*-*-*-100-*-*-c-*-iso8859-7,
   latin-iso8859-9:-*-Courier New-normal-r-*-*-*-100-*-*-c-*-iso8859-9,
   cyrillic-iso8859-5:-*-Courier New-normal-r-*-*-*-100-*-*-c-*-iso8859-5,
   greek-iso8859-7:-*-Courier New-normal-r-*-*-*-100-*-*-c-*-iso8859-7,
   hebrew-iso8859-8:-*-Rod-normal-r-*-*-*-100-*-*-c-*-iso8859-8,
   ipa:-*-Lucida Sans Unicode-normal-r-*-*-*-100-*-*-c-*-muleipa*-*,
   thai-tis620:-*-Tahoma-normal-r-*-*-*-100-*-*-c-*-tis620-*,
   latin-jisx0201:-*-MS Gothic-normal-r-*-*-*-100-*-*-c-*-jisx0208-sjis,
   katakana-jisx0201:-*-MS Gothic-normal-r-*-*-*-100-*-*-c-*-jisx0208-sjis,
   japanese-jisx0208:-*-MS Gothic-normal-r-*-*-*-100-*-*-c-*-jisx0208-sjis,
   japanese-jisx0208-1978:-*-MS Gothic-normal-r-*-*-*-100-*-*-c-*-jisx0208-sjis,
   japanese-jisx0212:-*-MS Gothic-normal-r-*-*-*-100-*-*-c-*-jisx0212-sjis,
   korean-ksc5601:-*-Gulim-normal-r-*-*-*-100-*-*-c-*-ksc5601-*,
   chinese-gb2312:-*-MS Song-normal-r-*-*-*-100-*-*-c-*-gb2312-*,
   chinese-big5-1:-*-MingLiU-normal-r-*-*-*-100-*-*-c-*-big5-*,
   chinese-big5-2:-*-MingLiU-normal-r-*-*-*-100-*-*-c-*-big5-*")

(setq w32-enable-italics t) (create-fontset-from-fontset-spec w32-standard-fontset-spec t)

(setq default-frame-alist '((font . "fontset-courier")))

(setq initial-frame-alist default-frame-alist)))

emacs Copyright © 2004 by Bill Clementson