changeset 4936:35e9402cb6bf

(describe-current-display-table): Don't get error if no display table now. (describe-display-table): Put all the output in the temp buffer.
author Richard M. Stallman <rms@gnu.org>
date Mon, 08 Nov 1993 15:06:59 +0000
parents 1f5c25761f2f
children 50db67ef8d64
files lisp/disp-table.el
diffstat 1 files changed, 17 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/disp-table.el	Mon Nov 08 15:01:44 1993 +0000
+++ b/lisp/disp-table.el	Mon Nov 08 15:06:59 1993 +0000
@@ -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 ()