diff options
| author | Richard M. Stallman | 1993-03-08 08:11:01 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-03-08 08:11:01 +0000 |
| commit | e31b61e6147b2054f4bb4935874e87ee324345b7 (patch) | |
| tree | 2d9f0e8c3a8ef792074cf992122c45133d39064a | |
| parent | 0f03054a858b614eae5c4fa8365aec02cc8ac03b (diff) | |
| download | emacs-e31b61e6147b2054f4bb4935874e87ee324345b7.tar.gz emacs-e31b61e6147b2054f4bb4935874e87ee324345b7.zip | |
Add autoload comments.
(rope-to-vector): Deleted.
(describe-display-table): Don't use rope-to-vector.
| -rw-r--r-- | lisp/disp-table.el | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/lisp/disp-table.el b/lisp/disp-table.el index d4ef6649669..5ecf667c333 100644 --- a/lisp/disp-table.el +++ b/lisp/disp-table.el | |||
| @@ -24,15 +24,7 @@ | |||
| 24 | 24 | ||
| 25 | ;;; Code: | 25 | ;;; Code: |
| 26 | 26 | ||
| 27 | (defun rope-to-vector (rope) | 27 | (defun describe-display-table (dt) |
| 28 | (let* ((len (/ (length rope) 2)) | ||
| 29 | (vector (make-vector len nil)) | ||
| 30 | (i 0)) | ||
| 31 | (while (< i len) | ||
| 32 | (aset vector i (rope-elt rope i)) | ||
| 33 | (setq i (1+ i))))) | ||
| 34 | |||
| 35 | (defun describe-display-table (DT) | ||
| 36 | "Describe the display table DT in a help buffer." | 28 | "Describe the display table DT in a help buffer." |
| 37 | (with-output-to-temp-buffer "*Help*" | 29 | (with-output-to-temp-buffer "*Help*" |
| 38 | (princ "\nTruncation glyph: ") | 30 | (princ "\nTruncation glyph: ") |
| @@ -44,19 +36,17 @@ | |||
| 44 | (princ "\nCtrl glyph: ") | 36 | (princ "\nCtrl glyph: ") |
| 45 | (prin1 (aref dt 259)) | 37 | (prin1 (aref dt 259)) |
| 46 | (princ "\nSelective display rope: ") | 38 | (princ "\nSelective display rope: ") |
| 47 | (prin1 (rope-to-vector (aref dt 260))) | 39 | (prin1 (aref dt 260)) |
| 48 | (princ "\nCharacter display ropes:\n") | 40 | (princ "\nCharacter display ropes:\n") |
| 49 | (let ((vector (make-vector 256 nil)) | 41 | (let ((vector (make-vector 256 nil)) |
| 50 | (i 0)) | 42 | (i 0)) |
| 51 | (while (< i 256) | 43 | (while (< i 256) |
| 52 | (aset vector i | 44 | (aset vector i (aref dt i)) |
| 53 | (if (stringp (aref dt i)) | ||
| 54 | (rope-to-vector (aref dt i)) | ||
| 55 | (aref dt i))) | ||
| 56 | (setq i (1+ i))) | 45 | (setq i (1+ i))) |
| 57 | (describe-vector vector)) | 46 | (describe-vector vector)) |
| 58 | (print-help-return-message))) | 47 | (print-help-return-message))) |
| 59 | 48 | ||
| 49 | ;;;###autoload | ||
| 60 | (defun describe-current-display-table () | 50 | (defun describe-current-display-table () |
| 61 | "Describe the display table in use in the selected window and buffer." | 51 | "Describe the display table in use in the selected window and buffer." |
| 62 | (interactive) | 52 | (interactive) |
| @@ -65,9 +55,12 @@ | |||
| 65 | buffer-display-table | 55 | buffer-display-table |
| 66 | standard-display-table))) | 56 | standard-display-table))) |
| 67 | 57 | ||
| 58 | ;;;###autoload | ||
| 68 | (defun make-display-table () | 59 | (defun make-display-table () |
| 60 | "Return a new, empty display table." | ||
| 69 | (make-vector 261 nil)) | 61 | (make-vector 261 nil)) |
| 70 | 62 | ||
| 63 | ;;;###autoload | ||
| 71 | (defun standard-display-8bit (l h) | 64 | (defun standard-display-8bit (l h) |
| 72 | "Display characters in the range L to H literally." | 65 | "Display characters in the range L to H literally." |
| 73 | (while (<= l h) | 66 | (while (<= l h) |
| @@ -78,12 +71,14 @@ | |||
| 78 | (aset standard-display-table l l)) | 71 | (aset standard-display-table l l)) |
| 79 | (setq l (1+ l)))) | 72 | (setq l (1+ l)))) |
| 80 | 73 | ||
| 74 | ;;;###autoload | ||
| 81 | (defun standard-display-ascii (c s) | 75 | (defun standard-display-ascii (c s) |
| 82 | "Display character C using string S." | 76 | "Display character C using string S." |
| 83 | (or standard-display-table | 77 | (or standard-display-table |
| 84 | (setq standard-display-table (make-vector 261 nil))) | 78 | (setq standard-display-table (make-vector 261 nil))) |
| 85 | (aset standard-display-table c (apply 'make-rope (append s nil)))) | 79 | (aset standard-display-table c (apply 'make-rope (append s nil)))) |
| 86 | 80 | ||
| 81 | ;;;###autoload | ||
| 87 | (defun standard-display-g1 (c sc) | 82 | (defun standard-display-g1 (c sc) |
| 88 | "Display character C as character SC in the g1 character set." | 83 | "Display character C as character SC in the g1 character set." |
| 89 | (or standard-display-table | 84 | (or standard-display-table |
| @@ -91,6 +86,7 @@ | |||
| 91 | (aset standard-display-table c | 86 | (aset standard-display-table c |
| 92 | (make-rope (create-glyph (concat "\016" (char-to-string sc) "\017"))))) | 87 | (make-rope (create-glyph (concat "\016" (char-to-string sc) "\017"))))) |
| 93 | 88 | ||
| 89 | ;;;###autoload | ||
| 94 | (defun standard-display-graphic (c gc) | 90 | (defun standard-display-graphic (c gc) |
| 95 | "Display character C as character GC in graphics character set." | 91 | "Display character C as character GC in graphics character set." |
| 96 | (or standard-display-table | 92 | (or standard-display-table |
| @@ -98,6 +94,7 @@ | |||
| 98 | (aset standard-display-table c | 94 | (aset standard-display-table c |
| 99 | (make-rope (create-glyph (concat "\e(0" (char-to-string gc) "\e(B"))))) | 95 | (make-rope (create-glyph (concat "\e(0" (char-to-string gc) "\e(B"))))) |
| 100 | 96 | ||
| 97 | ;;;###autoload | ||
| 101 | (defun standard-display-underline (c uc) | 98 | (defun standard-display-underline (c uc) |
| 102 | "Display character C as character UC plus underlining." | 99 | "Display character C as character UC plus underlining." |
| 103 | (or standard-display-table | 100 | (or standard-display-table |
| @@ -106,6 +103,7 @@ | |||
| 106 | (make-rope (create-glyph (concat "\e[4m" (char-to-string uc) "\e[m"))))) | 103 | (make-rope (create-glyph (concat "\e[4m" (char-to-string uc) "\e[m"))))) |
| 107 | 104 | ||
| 108 | ;; Allocate a glyph code to display by sending STRING to the terminal. | 105 | ;; Allocate a glyph code to display by sending STRING to the terminal. |
| 106 | ;;;###autoload | ||
| 109 | (defun create-glyph (string) | 107 | (defun create-glyph (string) |
| 110 | (if (= (length glyph-table) 65536) | 108 | (if (= (length glyph-table) 65536) |
| 111 | (error "No free glyph codes remain")) | 109 | (error "No free glyph codes remain")) |