I've configured prettify-symbols-mode
as below. However, only in the scratch buffer is any drawing performed. Further, lambda (λ) is the only multi-character token drawn as a unicode glyph. Is something missing or incorrectly set in the prettify configuration?
;; Globally prettify symbols
(global-prettify-symbols-mode 1)
(setq prettify-symbols-alist '(("lambda" . 955)
("->" . 8594)
("->>" . 21A0)
("=>" . 8658)
("map" . 8614)
("/=" . 2260)
("==" . 2261)
("<=" . 2264)
(">=" . 2265)
("=<<" . 226A)
(">>=" . 226B)
("<=<" . 21A2)
(">=>" . 21A3)
("&&" . 2227)
("||" . 2228)
("not" . 00AC)))
Update
(defun configure-prettify-symbols-alist ()
"Set prettify symbols alist."
(setq prettify-symbols-alist '(("lambda" . ?λ)
("->" . ?→)
("->>" . ?↠)
("=>" . ?⇒)
("map" . ?↦)
("/=" . ?≠)
("!=" . ?≠)
("==" . ?≡)
("<=" . ?≤)
(">=" . ?≥)
("=<<" . ?=≪)
(">>=" . ?≫=)
("<=<" . ?↢)
(">=>" . ?↣)
("&&" . ?∧)
("||" . ?∨)
("not" . ?¬))))
21A2
is wrong (as are all the other codes). You need to tell Emacs that you're writing your codes in hexadecimal. You can write?\u21A2
or just?↢
which will also be more readable ;-)Invalid read syntax: "?"
. Any ideas on this issue??=≪
and?≫=
.?x
is the read syntax for a single characterx
, and=≪
and≫=
are each two characters. If you remove those, it should work.("=<<" . (?= (Br . Bl) ?≪))
and(">>=" . (?≫ (Br . Bl) ?=))
respectively. Refer to emacs.stackexchange.com/q/34808/454