Emacs: Pretty Lambda λ in Emacs 24.4

Buy Xah Emacs Tutorial. Master emacs benefits for life.
,

Emacs 24.4 has a nice prettify-symbols-mode. In lisp code, it displays lambda as “λ”.

emacs pretty lambda 26110
emacs prettify symbols mode

Call prettify-symbols-mode to activate it.

Open a emacs lisp file. (For example, call describe-functionF1 f】 then type byte-compile, then click to source file.) Then, search for “lambda”. Then, call prettify-symbols-mode to watch it change.

Note that it only DISPLAYS the function named “lambda” as λ, it doesn't really change the string.

To set it globally, put the following in your emacs init:

;; display “lambda” as “λ”
(global-prettify-symbols-mode 1)
emacs pretty lambda 44670
emacs prettify symbols mode

If you don't have emacs 24.4 yet, see: Web Browser Bundled in Emacs 24.4, and How to Build Emacs from git Repository.

Like it?
Buy Xah Emacs Tutorial
or share
blog comments powered by Disqus