Function: describe-text-properties-1
describe-text-properties-1 is a byte-compiled function defined in
descr-text.el.gz.
Signature
(describe-text-properties-1 POS OUTPUT-BUFFER)
Source Code
;; Defined in /usr/src/emacs/lisp/descr-text.el.gz
(defun describe-text-properties-1 (pos output-buffer)
(let* ((properties (text-properties-at pos))
(overlays (overlays-in pos (1+ pos)))
(wid-field (get-char-property pos 'field))
(wid-button (get-char-property pos 'button))
(wid-doc (get-char-property pos 'widget-doc))
(button (button-at pos))
(button-type (and button (button-type button)))
(button-label (and button (button-label button)))
(widget (or wid-field wid-button wid-doc)))
(with-current-buffer output-buffer
;; Widgets
(when (widgetp widget)
(newline)
(insert (cond (wid-field "This is an editable text area")
(wid-button "This is an active area")
(wid-doc "This is documentation text")))
(insert " of a ")
(describe-text-widget widget)
(insert ".\n\n"))
;; Buttons
(when (and button (not (widgetp wid-button)))
(newline)
(insert (format-message "Here is a `%S' button labeled `%s'.\n\n"
button-type button-label)))
;; Overlays
(when overlays
(newline)
(if (eq (length overlays) 1)
(insert "There is an overlay here:\n")
(insert "There are " (format "%d" (length overlays))
" overlays here:\n"))
(dolist (overlay overlays)
(insert " From " (format "%d" (overlay-start overlay))
" to " (format "%d" (overlay-end overlay)) "\n")
(describe-property-list (overlay-properties overlay)))
(insert "\n"))
;; Text properties
(when properties
(when (plist-get properties 'invisible)
(insert "\nNote that character has an invisibility property,\n"
" so the character displayed at point in the buffer may\n"
" differ from the character described here.\n"))
(newline)
(insert "There are text properties here:\n")
(describe-property-list properties)))))