New in Emacs 25.1: Have prettify-symbols-mode reveal the symbol at point28 Dec 2015, by Artur Malabarba.
New in 25.1 post series
- New in Emacs 25.1: Query-replace history is enhanced.
- New in Emacs 25.1: Better Rectangles
- New on Elpa and in Emacs 25.1: let-alist
- New in Emacs 25.1: Easily install multifile package from a directory
- New in Emacs 25.1: comment-line
- New on Elpa and in Emacs 25.1: seq.el
- New in Emacs 25.1: Have prettify-symbols-mode reveal the symbol at point
- New in Emacs 25.1: Round quotes in Help buffers
- New in Emacs 25.1: Easily search for non-ASCII characters
- New in Emacs 25.1: EWW improvements
- New in Emacs 25.1: map.el library
- New in Emacs 25.1: More flow control macros
I’ve written before about what
prettify-symbols-mode can do for your buffers,
ranging from pure eye-candy to signficant readability improvements. Simply put,
this minor-mode “disguises” some strings in your buffer to look like something
else. For instance, in
emacs-lisp-mode it makes
lambda be displayed as
and (for the next release) it’ll apply to a wide range of symbols in
The only problem is that this (obviously) hides the symbol itself, and there’s
no way of revealing it other than disabling the mode. That’s usually not a big
deal, but it can get just a little annoying sometimes—specially when a mode
adds over 400 elements to
In Emacs 25.1, thanks to Tassilo Horn, there’s a new variable called
prettify-symbols-unprettify-at-point. If you set it to
will “unprettify” a symbol as long as the cursor is inside it. So you can easily
(and temporarily) reveal a symbol by just moving over to it.
My preference is to set it to
right-edge which also reveals the symbol if the
point is immediately after it.