("lambda" . 955) in my
prettify-symbols-alist for Emacs Lisp to transform
λ. I would like to do something similar for
dash.el. I have tried adding
("-lambda" . (?- (Br . Bl) 955)) to my
prettify-symbols-alist but this does not work. Curiously, it works if I make it
"-lambd" instead, so I suspect that the previous
lambda prettification is conflicting. How can I resolve this?
That should work just fine, but you'll need to "reload"
prettify-symbols-mode for the buffer you're working with.
For instance after starting
-q and doing
M-x prettify-symbols-mode to turn it on, in my scratch buffer I did the following:
;; we're in lisp-interaction mode where ^J runs eval-print-last-sexp ;; starting with prettify-symbols-mode ON ;; two lambda examples, the first is prettified by default (λ () ) (-lambda () ) (print prettify-symobls-alist)^J (("lambda" . 955)) (("lambda" . 955)) (push '("-lambda" . (?- (Br . Bl) 955)) prettify-symbols-alist)^J (("-lambda" 45 (Br . Bl) 955) ("lambda" . 955)) (prettify-symbols-mode -1)^J nil ;; the above lambdas are now not "prettified" (prettify-symbols-mode 1)^J t ;; now, both above lambdas are "prettified"
In fact, I've added that to my own
prettify-symbols-alist in my init file, and after restarting Emacs, it's working just fine.