Function: prettify-special-glyphs-mode
prettify-special-glyphs-mode is an autoloaded, interactive and
byte-compiled function defined in disp-table.el.gz.
Signature
(prettify-special-glyphs-mode &optional ARG)
Documentation
Mode to display pretty special character glyphs.
If you have already customized your special character glyphs, only the
special-glyphs face is applied to them. This mode only applies to the
standard-display-table. Window or buffer display table, if defined,
still take precedence.
This is a global minor mode. If called interactively, toggle the
Prettify-Special-Glyphs mode mode. If the prefix argument is
positive, enable the mode, and if it is zero or negative, disable the
mode.
If called from Lisp, toggle the mode if ARG is toggle. Enable the
mode if ARG is nil, omitted, or is a positive number. Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate (default-value \=prettify-special-glyphs-mode)'.
The mode's hook is called both when the mode is enabled and when it is disabled.
Probably introduced at or before Emacs version 31.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/disp-table.el.gz
;;;###autoload
(define-minor-mode prettify-special-glyphs-mode
"Mode to display pretty special character glyphs.
If you have already customized your special character glyphs, only the
`special-glyphs' face is applied to them. This mode only applies to the
`standard-display-table'. Window or buffer display table, if defined,
still take precedence."
:global t
:group 'display
(if prettify-special-glyphs-mode
(let ((tbl standard-display-table)
truncation wrap)
;; Save current glyphs.
(setq prettify-special-glyphs-saved-truncation
(display-table-slot tbl 'truncation)
prettify-special-glyphs-saved-continuation
(display-table-slot tbl 'wrap))
;; Prepare new ones with face.
(setq truncation
(if prettify-special-glyphs-saved-truncation
(make-glyph-code prettify-special-glyphs-saved-truncation
'special-glyphs)
(make-glyph-code ?→ 'special-glyphs))
wrap
(if prettify-special-glyphs-saved-continuation
(make-glyph-code prettify-special-glyphs-saved-continuation
'special-glyphs)
(make-glyph-code ?↩ 'special-glyphs)))
;; Alter display-table.
(set-display-table-slot tbl 'truncation truncation)
(set-display-table-slot tbl 'wrap wrap))
(let ((tbl standard-display-table))
;; Reset saved glyphs.
(set-display-table-slot tbl 'truncation prettify-special-glyphs-saved-truncation)
(set-display-table-slot tbl 'wrap prettify-special-glyphs-saved-continuation))))