aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2005-12-28 01:55:16 +0000
committerJuri Linkov2005-12-28 01:55:16 +0000
commit2fd54bf88cfdb2e87e5644f42f7448c88ca01cda (patch)
tree29c6d36870da93609c36d5a220b54ad6fc235515
parent0d9fb2890685781f6dcff693f69127dfc15bf05c (diff)
downloademacs-2fd54bf88cfdb2e87e5644f42f7448c88ca01cda.tar.gz
emacs-2fd54bf88cfdb2e87e5644f42f7448c88ca01cda.zip
(describe-text-sexp): Use square brackets for
button [Show] to distinguish it from the property value `show'. (describe-property-list): Use `insert-text-button' with `help-face' type instead of putting face in quotes, because button is not created automatically for a list of faces. (describe-text-properties-1): Put button-type value in quotes to distinguish from plain text "button". (describe-char): Display code point values in hex. Don't use `symbol-name' for `current-input-method' because it is a string. Use `insert-text-button' with `help-face' type instead of putting hardcoded face in quotes, because button is not created automatically.
-rw-r--r--lisp/descr-text.el22
1 files changed, 13 insertions, 9 deletions
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 705d582500e..550268ac1d9 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -60,7 +60,7 @@
60 (t t)) 60 (t t))
61 (insert pp) 61 (insert pp)
62 (insert-text-button 62 (insert-text-button
63 "show" 'action `(lambda (&rest ignore) 63 "[Show]" 'action `(lambda (&rest ignore)
64 (with-output-to-temp-buffer 64 (with-output-to-temp-buffer
65 "*Pp Eval Output*" 65 "*Pp Eval Output*"
66 (princ ',pp))) 66 (princ ',pp)))
@@ -90,7 +90,9 @@ into help buttons that call `describe-text-category' or
90 (describe-text-category ',value)) 90 (describe-text-category ',value))
91 'help-echo "mouse-2, RET: describe this category")) 91 'help-echo "mouse-2, RET: describe this category"))
92 ((memq key '(face font-lock-face mouse-face)) 92 ((memq key '(face font-lock-face mouse-face))
93 (insert (concat "`" (format "%S" value) "'"))) 93 (insert-text-button
94 (format "%S" value)
95 'type 'help-face 'help-args (list value)))
94 ((widgetp value) 96 ((widgetp value)
95 (describe-text-widget value)) 97 (describe-text-widget value))
96 (t 98 (t
@@ -161,8 +163,8 @@ otherwise."
161 ;; Buttons 163 ;; Buttons
162 (when (and button (not (widgetp wid-button))) 164 (when (and button (not (widgetp wid-button)))
163 (newline) 165 (newline)
164 (insert "Here is a " (format "%S" button-type) 166 (insert "Here is a `" (format "%S" button-type)
165 " button labeled `" button-label "'.\n\n")) 167 "' button labeled `" button-label "'.\n\n"))
166 ;; Overlays 168 ;; Overlays
167 (when overlays 169 (when overlays
168 (newline) 170 (newline)
@@ -462,8 +464,8 @@ as well as widgets, buttons, overlays, and text properties."
462 ,(let ((split (split-char char))) 464 ,(let ((split (split-char char)))
463 `(insert-text-button 465 `(insert-text-button
464 ,(if (= (charset-dimension charset) 1) 466 ,(if (= (charset-dimension charset) 1)
465 (format "%d" (nth 1 split)) 467 (format "#x%02X" (nth 1 split))
466 (format "%d %d" (nth 1 split) 468 (format "#x%02X #x%02X" (nth 1 split)
467 (nth 2 split))) 469 (nth 2 split)))
468 'action (lambda (&rest ignore) 470 'action (lambda (&rest ignore)
469 (list-charset-chars ',charset) 471 (list-charset-chars ',charset)
@@ -505,7 +507,7 @@ as well as widgets, buttons, overlays, and text properties."
505 key-list " or ") 507 key-list " or ")
506 "with" 508 "with"
507 `(insert-text-button 509 `(insert-text-button
508 ,(symbol-name current-input-method) 510 ,current-input-method
509 'type 'help-input-method 511 'type 'help-input-method
510 'help-args '(,current-input-method)))))) 512 'help-args '(,current-input-method))))))
511 ("buffer code" 513 ("buffer code"
@@ -576,7 +578,9 @@ as well as widgets, buttons, overlays, and text properties."
576 ((and (< char 32) (not (memq char '(9 10)))) 578 ((and (< char 32) (not (memq char '(9 10))))
577 'escape-glyph))))) 579 'escape-glyph)))))
578 (if face (list (list "hardcoded face" 580 (if face (list (list "hardcoded face"
579 (concat "`" (symbol-name face) "'"))))) 581 `(insert-text-button
582 ,(symbol-name face)
583 'type 'help-face 'help-args '(,face))))))
580 ,@(let ((unicodedata (and unicode 584 ,@(let ((unicodedata (and unicode
581 (describe-char-unicode-data unicode)))) 585 (describe-char-unicode-data unicode))))
582 (if unicodedata 586 (if unicodedata
@@ -687,7 +691,7 @@ as well as widgets, buttons, overlays, and text properties."
687 "the meaning of the rule.\n")) 691 "the meaning of the rule.\n"))
688 692
689 (if text-props-desc (insert text-props-desc)) 693 (if text-props-desc (insert text-props-desc))
690 (setq help-xref-stack-item (list 'help-insert-string (buffer-string))) 694 (setq help-xref-stack-item (list 'help-insert-string (buffer-string)))
691 (toggle-read-only 1) 695 (toggle-read-only 1)
692 (print-help-return-message))))) 696 (print-help-return-message)))))
693 697