Function: widget-character--change-character-display

widget-character--change-character-display is a byte-compiled function defined in wid-edit.el.gz.

Signature

(widget-character--change-character-display C)

Documentation

Return a string to represent the character C, or nil.

The character widget represents some characters (e.g., the newline character or the tab character) specially, to make it easier for the user to see what's in it. For those characters, return a string to display that character in a more user-friendly way.

For the caller, nil should mean that it is good enough to use the return value of char-to-string for the representation of C.

Source Code

;; Defined in /usr/src/emacs/lisp/wid-edit.el.gz
(defun widget-character--change-character-display (c)
  "Return a string to represent the character C, or nil.

The character widget represents some characters (e.g., the newline character
or the tab character) specially, to make it easier for the user to see what's
in it.  For those characters, return a string to display that character in a
more user-friendly way.

For the caller, nil should mean that it is good enough to use the return value
of `char-to-string' for the representation of C."
  (let ((char (alist-get c widget-character--escape-sequences-alist)))
    (and char (propertize (format "\\%c" char) 'face 'escape-glyph))))