aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Goldowsky1995-03-21 21:47:23 +0000
committerBoris Goldowsky1995-03-21 21:47:23 +0000
commitc0a7db8434499de9362a94ea620f2a95b98fdd49 (patch)
tree1290091bd9ff8590745a0ecfafc1b1434c0bb031
parent243a81f5240b6da4fd0d7a9747fd1c00eb8258b3 (diff)
downloademacs-c0a7db8434499de9362a94ea620f2a95b98fdd49.tar.gz
emacs-c0a7db8434499de9362a94ea620f2a95b98fdd49.zip
(list-text-properties-at): New fn.
(facemenu-menu): Add it to menu.
-rw-r--r--lisp/facemenu.el17
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.")
187 (let ((map (make-sparse-keymap "Face"))) 187 (let ((map (make-sparse-keymap "Face")))
188 (define-key map [dc] (cons "Display Colors" 'list-colors-display)) 188 (define-key map [dc] (cons "Display Colors" 'list-colors-display))
189 (define-key map [df] (cons "Display Faces" 'list-faces-display)) 189 (define-key map [df] (cons "Display Faces" 'list-faces-display))
190 (define-key map [rm] (cons "Remove Props" 'facemenu-remove-all)) 190 (define-key map [dp] (cons "List Properties" 'list-text-properties-at))
191 (define-key map [rm] (cons "Remove Properties" 'facemenu-remove-all))
191 (define-key map [s1] (list "-----------------")) 192 (define-key map [s1] (list "-----------------"))
192 (define-key map [in] (cons "Indentation" 'facemenu-indentation-menu)) 193 (define-key map [in] (cons "Indentation" 'facemenu-indentation-menu))
193 (define-key map [ju] (cons "Justification" 'facemenu-justification-menu)) 194 (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
337 read-only nil category nil)))) 338 read-only nil category nil))))
338 339
339;;;###autoload 340;;;###autoload
341(defun list-text-properties-at (p)
342 "Pop up a buffer listing text-properties at LOCATION."
343 (interactive "d")
344 (let ((props (text-properties-at p)))
345 (if (null props)
346 (message "None")
347 (with-output-to-temp-buffer "*Text Properties*"
348 (princ (format "Text properties at %d:\n\n" p))
349 (while props
350 (princ (format "%-20s %S\n"
351 (car props) (car (cdr props))))
352 (setq props (cdr (cdr props))))))))
353
354;;;###autoload
340(defun facemenu-read-color (prompt) 355(defun facemenu-read-color (prompt)
341 "Read a color using the minibuffer." 356 "Read a color using the minibuffer."
342 (let ((col (completing-read (or "Color: ") 357 (let ((col (completing-read (or "Color: ")