From bb6066c863f0c21701c06d12cbc8159447e2f217 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 8 Nov 1993 15:06:59 +0000 Subject: [PATCH] (describe-current-display-table): Don't get error if no display table now. (describe-display-table): Put all the output in the temp buffer. --- lisp/disp-table.el | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/lisp/disp-table.el b/lisp/disp-table.el index 7add5e3a261..d162d4ef8bc 100644 --- a/lisp/disp-table.el +++ b/lisp/disp-table.el @@ -38,22 +38,27 @@ (princ "\nSelective display glyph sequence: ") (prin1 (aref dt 260)) (princ "\nCharacter display glyph sequences:\n") - (let ((vector (make-vector 256 nil)) - (i 0)) - (while (< i 256) - (aset vector i (aref dt i)) - (setq i (1+ i))) - (describe-vector vector)) + (save-excursion + (set-buffer standard-output) + (let ((vector (make-vector 256 nil)) + (i 0)) + (while (< i 256) + (aset vector i (aref dt i)) + (setq i (1+ i))) + (describe-vector vector))) (print-help-return-message))) ;;;###autoload (defun describe-current-display-table () - "Describe the display table in use in the selected window and buffer." - (interactive) - (describe-display-table - (or (window-display-table (selected-window)) - buffer-display-table - standard-display-table))) + "Describe the display table in use in the selected window and buffer." + (interactive) + (let ((disptab + (or (window-display-table (selected-window)) + buffer-display-table + standard-display-table))) + (if disptab + (describe-display-table disptab) + (message "No display table")))) ;;;###autoload (defun make-display-table ()