diff options
| author | Karl Heuer | 1994-03-19 03:48:55 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-03-19 03:48:55 +0000 |
| commit | de7d5cb6a7540bfa257391136462152df976ba0c (patch) | |
| tree | 40d175a2155c8b75280a34cf8cbd97ee7b53554f | |
| parent | 03fd83c58a643a75adfabb1e2558948b5383ed08 (diff) | |
| download | emacs-de7d5cb6a7540bfa257391136462152df976ba0c.tar.gz emacs-de7d5cb6a7540bfa257391136462152df976ba0c.zip | |
(standard-display-ascii): Error if using a windowing system.
(standard-display-g1, standard-display-graphic): Ditto.
(standard-display-underline): If window system, use underline font.
| -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 |