changeset 2203:12e9bc8a4a7f

* register.el (view-register): Neglect not to avoid failing to properly display all the possible sorts of things one might find in a buffer.
author Jim Blandy <jimb@redhat.com>
date Mon, 15 Mar 1993 09:02:00 +0000
parents 081afcef5e85
children 41258d6c3eee
files lisp/register.el
diffstat 1 files changed, 30 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/register.el	Mon Mar 15 08:51:02 1993 +0000
+++ b/lisp/register.el	Mon Mar 15 09:02:00 1993 +0000
@@ -122,23 +122,36 @@
 	(princ "Register ")
 	(princ (single-key-description char))
 	(princ " contains ")
-	(if (integerp val)
-	    (princ val)
-	  (if (markerp val)
-	      (progn
-		(princ "a buffer position:\nbuffer ")
-		(princ (buffer-name (marker-buffer val)))
-		(princ ", position ")
-		(princ (+ 0 val)))
-	    (if (consp val)
-		(progn
-		  (princ "the rectangle:\n")
-		  (while val
-		    (princ (car val))
-		    (terpri)
-		    (setq val (cdr val))))
-	      (princ "the string:\n")
-	      (princ val))))))))
+	(cond
+	 ((integerp val)
+	  (princ val))
+
+	 ((markerp val)
+	  (princ "a buffer position:\nbuffer ")
+	  (princ (buffer-name (marker-buffer val)))
+	  (princ ", position ")
+	  (princ (+ 0 val)))
+
+	 ((window-configuration-p val)
+	  (princ "a window configuration."))
+
+	 ((frame-configuration-p val)
+	  (princ "a frame configuration."))
+
+	 ((consp val)
+	  (princ "the rectangle:\n")
+	  (while val
+	    (princ (car val))
+	    (terpri)
+	    (setq val (cdr val))))
+
+	 ((stringp val)
+	  (princ "the text:\n")
+	  (princ val))
+
+	 (t
+	  (princ "Garbage:\n")
+	  (prin1 val)))))))
 
 (defun insert-register (char &optional arg)
   "Insert contents of register REG.  REG is a character.