diff options
| author | Jim Blandy | 1994-09-19 17:31:15 +0000 |
|---|---|---|
| committer | Jim Blandy | 1994-09-19 17:31:15 +0000 |
| commit | dc5a82ea28457c75d281a0c063fb8db67b1b1921 (patch) | |
| tree | 9da35cdd3de4a7f31998e8fe354790e76403b498 | |
| parent | a45e35e17336f766e1ef2fe79a95e703d5d184b3 (diff) | |
| download | emacs-dc5a82ea28457c75d281a0c063fb8db67b1b1921.tar.gz emacs-dc5a82ea28457c75d281a0c063fb8db67b1b1921.zip | |
* disp-table.el: Add support for new window border display table
element.
(describe-display-table): Describe the window border glyph.
(display-table-len): New constant.
(make-display-table, standard-display-8bit,
standard-display-default, standard-display-ascii,
standard-display-g1, standard-display-graphic,
standard-display-underline): Use display-table-len, instead of
hard-coding the display table length.
| -rw-r--r-- | lisp/disp-table.el | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/lisp/disp-table.el b/lisp/disp-table.el index 5dd76dd4f4b..b9e78eb0759 100644 --- a/lisp/disp-table.el +++ b/lisp/disp-table.el | |||
| @@ -24,6 +24,9 @@ | |||
| 24 | 24 | ||
| 25 | ;;; Code: | 25 | ;;; Code: |
| 26 | 26 | ||
| 27 | (defconst display-table-len 262 | ||
| 28 | "The proper length of a display table.") | ||
| 29 | |||
| 27 | (defun describe-display-table (dt) | 30 | (defun describe-display-table (dt) |
| 28 | "Describe the display table DT in a help buffer." | 31 | "Describe the display table DT in a help buffer." |
| 29 | (with-output-to-temp-buffer "*Help*" | 32 | (with-output-to-temp-buffer "*Help*" |
| @@ -37,6 +40,8 @@ | |||
| 37 | (prin1 (aref dt 259)) | 40 | (prin1 (aref dt 259)) |
| 38 | (princ "\nSelective display glyph sequence: ") | 41 | (princ "\nSelective display glyph sequence: ") |
| 39 | (prin1 (aref dt 260)) | 42 | (prin1 (aref dt 260)) |
| 43 | (princ "\nVertical window border glyph: ") | ||
| 44 | (prin1 (aref dt 261)) | ||
| 40 | (princ "\nCharacter display glyph sequences:\n") | 45 | (princ "\nCharacter display glyph sequences:\n") |
| 41 | (save-excursion | 46 | (save-excursion |
| 42 | (set-buffer standard-output) | 47 | (set-buffer standard-output) |
| @@ -63,7 +68,7 @@ | |||
| 63 | ;;;###autoload | 68 | ;;;###autoload |
| 64 | (defun make-display-table () | 69 | (defun make-display-table () |
| 65 | "Return a new, empty display table." | 70 | "Return a new, empty display table." |
| 66 | (make-vector 261 nil)) | 71 | (make-vector display-table-len nil)) |
| 67 | 72 | ||
| 68 | ;;;###autoload | 73 | ;;;###autoload |
| 69 | (defun standard-display-8bit (l h) | 74 | (defun standard-display-8bit (l h) |
| @@ -72,7 +77,7 @@ | |||
| 72 | (if (and (>= l ?\ ) (< l 127)) | 77 | (if (and (>= l ?\ ) (< l 127)) |
| 73 | (if standard-display-table (aset standard-display-table l nil)) | 78 | (if standard-display-table (aset standard-display-table l nil)) |
| 74 | (or standard-display-table | 79 | (or standard-display-table |
| 75 | (setq standard-display-table (make-vector 261 nil))) | 80 | (setq standard-display-table (make-vector display-table-len nil))) |
| 76 | (aset standard-display-table l (vector l))) | 81 | (aset standard-display-table l (vector l))) |
| 77 | (setq l (1+ l)))) | 82 | (setq l (1+ l)))) |
| 78 | 83 | ||
| @@ -83,7 +88,7 @@ | |||
| 83 | (if (and (>= l ?\ ) (< l 127)) | 88 | (if (and (>= l ?\ ) (< l 127)) |
| 84 | (if standard-display-table (aset standard-display-table l nil)) | 89 | (if standard-display-table (aset standard-display-table l nil)) |
| 85 | (or standard-display-table | 90 | (or standard-display-table |
| 86 | (setq standard-display-table (make-vector 261 nil))) | 91 | (setq standard-display-table (make-vector display-table-len nil))) |
| 87 | (aset standard-display-table l nil)) | 92 | (aset standard-display-table l nil)) |
| 88 | (setq l (1+ l)))) | 93 | (setq l (1+ l)))) |
| 89 | 94 | ||
| @@ -95,7 +100,7 @@ This function is meaningless for an X frame." | |||
| 95 | (if window-system | 100 | (if window-system |
| 96 | (error "Cannot use string glyphs in a windowing system")) | 101 | (error "Cannot use string glyphs in a windowing system")) |
| 97 | (or standard-display-table | 102 | (or standard-display-table |
| 98 | (setq standard-display-table (make-vector 261 nil))) | 103 | (setq standard-display-table (make-vector display-table-len nil))) |
| 99 | (aset standard-display-table c (apply 'vector (append s nil)))) | 104 | (aset standard-display-table c (apply 'vector (append s nil)))) |
| 100 | 105 | ||
| 101 | ;;;###autoload | 106 | ;;;###autoload |
| @@ -106,7 +111,7 @@ it is meaningless for an X frame." | |||
| 106 | (if window-system | 111 | (if window-system |
| 107 | (error "Cannot use string glyphs in a windowing system")) | 112 | (error "Cannot use string glyphs in a windowing system")) |
| 108 | (or standard-display-table | 113 | (or standard-display-table |
| 109 | (setq standard-display-table (make-vector 261 nil))) | 114 | (setq standard-display-table (make-vector display-table-len nil))) |
| 110 | (aset standard-display-table c | 115 | (aset standard-display-table c |
| 111 | (vector (create-glyph (concat "\016" (char-to-string sc) "\017"))))) | 116 | (vector (create-glyph (concat "\016" (char-to-string sc) "\017"))))) |
| 112 | 117 | ||
| @@ -118,7 +123,7 @@ X frame." | |||
| 118 | (if window-system | 123 | (if window-system |
| 119 | (error "Cannot use string glyphs in a windowing system")) | 124 | (error "Cannot use string glyphs in a windowing system")) |
| 120 | (or standard-display-table | 125 | (or standard-display-table |
| 121 | (setq standard-display-table (make-vector 261 nil))) | 126 | (setq standard-display-table (make-vector display-table-len nil))) |
| 122 | (aset standard-display-table c | 127 | (aset standard-display-table c |
| 123 | (vector (create-glyph (concat "\e(0" (char-to-string gc) "\e(B"))))) | 128 | (vector (create-glyph (concat "\e(0" (char-to-string gc) "\e(B"))))) |
| 124 | 129 | ||
| @@ -127,7 +132,7 @@ X frame." | |||
| 127 | "Display character C as character UC plus underlining." | 132 | "Display character C as character UC plus underlining." |
| 128 | (if window-system (require 'faces)) | 133 | (if window-system (require 'faces)) |
| 129 | (or standard-display-table | 134 | (or standard-display-table |
| 130 | (setq standard-display-table (make-vector 261 nil))) | 135 | (setq standard-display-table (make-vector display-table-len nil))) |
| 131 | (aset standard-display-table c | 136 | (aset standard-display-table c |
| 132 | (vector | 137 | (vector |
| 133 | (if window-system | 138 | (if window-system |