diff options
| -rw-r--r-- | lisp/disp-table.el | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/lisp/disp-table.el b/lisp/disp-table.el index fdf6a5acbb2..d8c861295b9 100644 --- a/lisp/disp-table.el +++ b/lisp/disp-table.el | |||
| @@ -89,14 +89,22 @@ | |||
| 89 | 89 | ||
| 90 | ;;;###autoload | 90 | ;;;###autoload |
| 91 | (defun standard-display-ascii (c s) | 91 | (defun standard-display-ascii (c s) |
| 92 | "Display character C using string S." | 92 | "Display character C using string S. |
| 93 | S is usually a terminal-dependent escape sequence. | ||
| 94 | This function is meaningless for an X frame." | ||
| 95 | (if window-system | ||
| 96 | (error "Cannot use string glyphs in a windowing system")) | ||
| 93 | (or standard-display-table | 97 | (or standard-display-table |
| 94 | (setq standard-display-table (make-vector 261 nil))) | 98 | (setq standard-display-table (make-vector 261 nil))) |
| 95 | (aset standard-display-table c (apply 'vector (append s nil)))) | 99 | (aset standard-display-table c (apply 'vector (append s nil)))) |
| 96 | 100 | ||
| 97 | ;;;###autoload | 101 | ;;;###autoload |
| 98 | (defun standard-display-g1 (c sc) | 102 | (defun standard-display-g1 (c sc) |
| 99 | "Display character C as character SC in the g1 character set." | 103 | "Display character C as character SC in the g1 character set. |
| 104 | This function assumes that your terminal uses the SO/SI characters; | ||
| 105 | it is meaningless for an X frame." | ||
| 106 | (if window-system | ||
| 107 | (error "Cannot use string glyphs in a windowing system")) | ||
| 100 | (or standard-display-table | 108 | (or standard-display-table |
| 101 | (setq standard-display-table (make-vector 261 nil))) | 109 | (setq standard-display-table (make-vector 261 nil))) |
| 102 | (aset standard-display-table c | 110 | (aset standard-display-table c |
| @@ -104,7 +112,11 @@ | |||
| 104 | 112 | ||
| 105 | ;;;###autoload | 113 | ;;;###autoload |
| 106 | (defun standard-display-graphic (c gc) | 114 | (defun standard-display-graphic (c gc) |
| 107 | "Display character C as character GC in graphics character set." | 115 | "Display character C as character GC in graphics character set. |
| 116 | This function assumes VT100-compatible escapes; it is meaningless for an | ||
| 117 | X frame." | ||
| 118 | (if window-system | ||
| 119 | (error "Cannot use string glyphs in a windowing system")) | ||
| 108 | (or standard-display-table | 120 | (or standard-display-table |
| 109 | (setq standard-display-table (make-vector 261 nil))) | 121 | (setq standard-display-table (make-vector 261 nil))) |
| 110 | (aset standard-display-table c | 122 | (aset standard-display-table c |
| @@ -113,10 +125,14 @@ | |||
| 113 | ;;;###autoload | 125 | ;;;###autoload |
| 114 | (defun standard-display-underline (c uc) | 126 | (defun standard-display-underline (c uc) |
| 115 | "Display character C as character UC plus underlining." | 127 | "Display character C as character UC plus underlining." |
| 128 | (if window-system (require 'faces)) | ||
| 116 | (or standard-display-table | 129 | (or standard-display-table |
| 117 | (setq standard-display-table (make-vector 261 nil))) | 130 | (setq standard-display-table (make-vector 261 nil))) |
| 118 | (aset standard-display-table c | 131 | (aset standard-display-table c |
| 119 | (vector (create-glyph (concat "\e[4m" (char-to-string uc) "\e[m"))))) | 132 | (vector |
| 133 | (if window-system | ||
| 134 | (logior uc (lsh (face-id (internal-find-face 'underline)) 8)) | ||
| 135 | (create-glyph (concat "\e[4m" (char-to-string uc) "\e[m")))))) | ||
| 120 | 136 | ||
| 121 | ;; Allocate a glyph code to display by sending STRING to the terminal. | 137 | ;; Allocate a glyph code to display by sending STRING to the terminal. |
| 122 | ;;;###autoload | 138 | ;;;###autoload |