diff lisp/facemenu.el @ 11081:b651fb9a8216

(list-text-properties-at): New fn. (facemenu-menu): Add it to menu.
author Boris Goldowsky <boris@gnu.org>
date Tue, 21 Mar 1995 21:47:23 +0000
parents 48bfa8e29f36
children c968d4c026b7
line wrap: on
line diff
--- a/lisp/facemenu.el	Tue Mar 21 20:22:41 1995 +0000
+++ b/lisp/facemenu.el	Tue Mar 21 21:47:23 1995 +0000
@@ -187,7 +187,8 @@
   (let ((map (make-sparse-keymap "Face")))
     (define-key map [dc] (cons "Display Colors" 'list-colors-display))
     (define-key map [df] (cons "Display Faces" 'list-faces-display))
-    (define-key map [rm] (cons "Remove Props" 'facemenu-remove-all))
+    (define-key map [dp] (cons "List Properties" 'list-text-properties-at))
+    (define-key map [rm] (cons "Remove Properties" 'facemenu-remove-all))
     (define-key map [s1] (list "-----------------"))
     (define-key map [in] (cons "Indentation" 'facemenu-indentation-menu))
     (define-key map [ju] (cons "Justification" 'facemenu-justification-menu))
@@ -337,6 +338,20 @@
 		      read-only nil category nil))))
 
 ;;;###autoload
+(defun list-text-properties-at (p)
+  "Pop up a buffer listing text-properties at LOCATION."
+  (interactive "d")
+  (let ((props (text-properties-at p)))
+    (if (null props)
+	(message "None")
+      (with-output-to-temp-buffer "*Text Properties*"
+	(princ (format "Text properties at %d:\n\n" p))
+	(while props
+	  (princ (format "%-20s %S\n"
+			 (car props) (car (cdr props))))
+	  (setq props (cdr (cdr props))))))))
+
+;;;###autoload
 (defun facemenu-read-color (prompt)
   "Read a color using the minibuffer."
   (let ((col (completing-read (or  "Color: ")