diff options
author | Boris Goldowsky <boris@gnu.org> | 1995-03-21 21:47:23 +0000 |
---|---|---|
committer | Boris Goldowsky <boris@gnu.org> | 1995-03-21 21:47:23 +0000 |
commit | 3243f24c1b2a2640f928b62fdf2c890b70f5511e (patch) | |
tree | f12c5a3a3c10d88bbfbd7372754733012219a062 /lisp/facemenu.el | |
parent | 02050ec1d5729bd8f05f9317316424abed6128b1 (diff) | |
download | emacs-3243f24c1b2a2640f928b62fdf2c890b70f5511e.tar.gz |
(list-text-properties-at): New fn.
(facemenu-menu): Add it to menu.
Diffstat (limited to 'lisp/facemenu.el')
-rw-r--r-- | lisp/facemenu.el | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lisp/facemenu.el b/lisp/facemenu.el index 7cbc338bad7..2cbb1d85e80 100644 --- a/lisp/facemenu.el +++ b/lisp/facemenu.el @@ -187,7 +187,8 @@ when they are created.") (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 @@ This sets the `read-only' text property; it can be undone with 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: ") |