Commit 2306a6c7 authored by Colin Walters's avatar Colin Walters
Browse files

(describe-char-after): Order display of text properties by the size of

their value, for clarity.
parent 9969dd6c
......@@ -659,11 +659,21 @@ which font is being used for displaying the character."
"See the variable `reference-point-alist' for "
"the meaning of the rule.\n")))
(if props
(insert "\nText properties\n"))
(while props
(insert (format " %s: %s" (car props) (cadr props)))
(setq props (cddr props)))
(when props
(insert "\nText properties\n"))
;; List the text properties, sorted by the size of the printed
;; representation of their value. This makes it easier to
;; read.
(dolist (elt (sort (let ((ret nil))
(while props
(push (cons (pop props)
(prin1-to-string (pop props)))
(lambda (a b)
(< (length (cdr a))
(length (cdr b))))))
(insert (format " %s: %s\n" (car elt) (cdr elt))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment