# HG changeset patch # User Juri Linkov # Date 1085345968 0 # Node ID da7a694d20974e6089e2f1e260f7a942fd244f77 # Parent a1d8c94b66c0372188a1c6f140b110056556b6de (describe-property-list): Add [show] button for `syntax-table' property with action to pp to a separate buffer. (describe-char): Replace search-forward by re-search-forward with whitespace regexp after "character:" to not fail in too narrow windows. diff -r a1d8c94b66c0 -r da7a694d2097 lisp/descr-text.el --- a/lisp/descr-text.el Sun May 23 20:57:50 2004 +0000 +++ b/lisp/descr-text.el Sun May 23 20:59:28 2004 +0000 @@ -111,7 +111,8 @@ (setq key (pop properties) val (pop properties) len 0) - (unless (or (memq key '(category face font-lock-face)) + (unless (or (memq key '(category face font-lock-face + syntax-table)) (widgetp val)) (setq val (pp-to-string val) len (length val))) @@ -134,7 +135,15 @@ :notify `(lambda (&rest ignore) (describe-face ',value)) (format "%S" value))) - ((widgetp value) + ((eq key 'syntax-table) + (widget-create 'push-button + :tag "show" + :action (lambda (widget &optional event) + (with-output-to-temp-buffer + "*Pp Eval Output*" + (pp (widget-get widget :value)))) + value)) + ((widgetp value) (describe-text-widget value)) (t (widget-insert value)))) @@ -476,7 +485,7 @@ (encode-char char 'ucs)))) (setq item-list `(("character" - ,(format "%s (0%o, %d, 0x%x%s)" + ,(format "%s (0%o, %d, 0x%x%s)" (apply 'propertize (if (not multibyte-p) (single-key-description char) (if (< char 128) @@ -598,7 +607,7 @@ (save-excursion (goto-char (point-min)) - (search-forward "character: ") + (re-search-forward "character:[ \t\n]+") (setq pos (point))) (if overlays (mapc #'(lambda (props)