diff options
author | Juri Linkov <juri@jurta.org> | 2004-05-23 20:59:28 +0000 |
---|---|---|
committer | Juri Linkov <juri@jurta.org> | 2004-05-23 20:59:28 +0000 |
commit | aa79d067ac1890c0a4146ee981f741111e580adb (patch) | |
tree | b83ed83416337a809e095f8a6ba07bddbeed2f3d /lisp/descr-text.el | |
parent | 9d0e681edb0495ff84496801a64ba0c9482ed6dc (diff) | |
download | emacs-aa79d067ac1890c0a4146ee981f741111e580adb.tar.gz |
(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.
Diffstat (limited to 'lisp/descr-text.el')
-rw-r--r-- | lisp/descr-text.el | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/lisp/descr-text.el b/lisp/descr-text.el index 75ce294dad6..c4758a081ce 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el @@ -111,7 +111,8 @@ into widget buttons that call `describe-text-category' or (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 @@ into widget buttons that call `describe-text-category' or :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 @@ as well as widgets, buttons, overlays, and text properties." (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 @@ as well as widgets, buttons, overlays, and text properties." (save-excursion (goto-char (point-min)) - (search-forward "character: ") + (re-search-forward "character:[ \t\n]+") (setq pos (point))) (if overlays (mapc #'(lambda (props) |