Emacs: Pretty Lambda λ in Emacs 24.4

Master emacs+lisp, benefit for life. Testimonials. Thank you for support.
,

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 what you read?
Buy Xah Emacs Tutorial
or share some
blog comments powered by Disqus