summaryrefslogtreecommitdiff
path: root/lisp/disp-table.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2022-09-08 10:14:10 +0300
committerEli Zaretskii <eliz@gnu.org>2022-09-08 10:14:10 +0300
commite97ca476a138411c4624d76028eefba47e974e7c (patch)
tree259e21c18a749a8b4bf9dc5d4614347405bb3501 /lisp/disp-table.el
parent740a1a3d0ee7cd754b4049f0d65cd756f10b48f6 (diff)
downloademacs-e97ca476a138411c4624d76028eefba47e974e7c.tar.gz
; Minor improvements in 'standard-display-by-replacement-char'
* lisp/disp-table.el (standard-display-by-replacement-char): Minor improvements. Suggested by Richard Stallman <rms@gnu.org>.
Diffstat (limited to 'lisp/disp-table.el')
-rw-r--r--lisp/disp-table.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/disp-table.el b/lisp/disp-table.el
index c762b88cb66..f0ee3d1d780 100644
--- a/lisp/disp-table.el
+++ b/lisp/disp-table.el
@@ -337,13 +337,15 @@ which characters can be displayed and which cannot."
(with-current-buffer buf
(erase-buffer)
(insert "\
+;; This code was produced by `standard-display-by-replacement-char'.
;; Evaluate the Lisp code below to make Emacs show the standard
;; replacement character as a substitute for each undisplayable character.
;; One way to do that is with \"C-x h M-x eval-region RET\".
;; Normally you would put this code in your Emacs initialization file,
;; perhaps conditionally based on the type of terminal, so that
;; this setup happens automatically on each startup.
-(let ((tbl standard-display-table))\n")
+(let ((tbl (or standard-display-table
+ (setq standard-display-table (make-display-table)))))\n")
(while (<= ch to)
(cond
((or (char-displayable-p ch)