From: Miles Bader Date: Fri, 2 Nov 2001 05:53:54 +0000 (+0000) Subject: (describe-character-set) X-Git-Tag: ttn-vms-21-2-B4~18893 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e8cdeaca91e55c126a2d47cceb9d60478cb1fb46;p=emacs.git (describe-character-set) (describe-coding-system): Pass correct args to `help-xref-button'. (sort-listed-character-sets): New button type. (list-character-sets): Use it. (list-charset-chars): New button type. (list-character-sets-1): Use it. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ba35309ebfb..d1a9b79eb0c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,4 +1,20 @@ -2001-11-01 Stefan Monnier +2001-11-02 Miles Bader + + * help-mode.el (help-xref): New button type. + (help-function, help-variable, help-face, help-coding-system) + (help-input-method, help-character-set, help-type, help-symbol) + (help-back, help-info, help-customize-variable, help-customize-face) + (help-function-def, help-variable-def): Use it as a supertype. + Remove `action' property. + + * international/mule-diag.el (describe-character-set) + (describe-coding-system): Pass correct args to `help-xref-button'. + (sort-listed-character-sets): New button type. + (list-character-sets): Use it. + (list-charset-chars): New button type. + (list-character-sets-1): Use it. + +2001-11-01 Stefan Monnier * indent.el (tab-always-indent, indent-for-tab-command): Remove redundant `never' setting. diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el index a967844f305..4193515e53f 100644 --- a/lisp/international/mule-diag.el +++ b/lisp/international/mule-diag.el @@ -47,6 +47,18 @@ ;;; CHARSET +(define-button-type 'sort-listed-character-sets + 'help-echo (purecopy "mouse-2, RET: sort on this column") + 'face 'bold + 'action #'(lambda (button) + (sort-listed-character-sets (button-get button 'sort-key)))) + +(define-button-type 'list-charset-chars + :supertype 'help-xref + 'help-function #'list-charset-chars + 'help-echo "mouse-2, RET: show table of characters for this character set") + + ;;;###autoload (defun list-character-sets (arg) "Display a list of all character sets. @@ -88,20 +100,13 @@ but still shows the full information." ("CHARSET-NAME" . name) "\t\t\t" ("MULTIBYTE-FORM" . id) "\t" ("D CH FINAL-CHAR" . iso-spec))) - (help-highlight-face 'region) - (help-echo - (substitute-command-keys - (concat (if (display-mouse-p) "\\[help-follow-mouse], ") - "\\[help-follow]: sort on this column"))) pos) (while columns (if (stringp (car columns)) (insert (car columns)) - (insert (car (car columns))) - (search-backward (car (car columns))) - (help-xref-button 0 'sort-listed-character-sets - (cdr (car columns)) - help-echo) + (insert-text-button (car (car columns)) + :type 'sort-listed-character-sets + 'sort-key (cdr (car columns))) (goto-char (point-max))) (setq columns (cdr columns))) (insert "\n")) @@ -151,10 +156,6 @@ but still shows the full information." (or sort-key (setq sort-key 'id)) (let ((tail (charset-list)) - (help-echo - (substitute-command-keys - (concat (if (display-mouse-p) "\\[help-follow-mouse], ") - "\\[help-follow]: show table of this character set"))) charset-info-list elt charset info sort-func) (while tail (setq charset (car tail) tail (cdr tail) @@ -199,9 +200,9 @@ but still shows the full information." charset-info-list (cdr charset-info-list)) (insert (format "%03d(%02X)" (car elt) (car elt))) ; ID-NUM (indent-to 8) - (insert (symbol-name (nth 1 elt))) ; CHARSET-NAME - (search-backward (symbol-name (nth 1 elt))) - (help-xref-button 0 'list-charset-chars (nth 1 elt) help-echo) + (insert-text-button (symbol-name (nth 1 elt)) + :type 'list-charset-chars + 'help-args (list (nth 1 elt))) (goto-char (point-max)) (insert "\t") (indent-to 40) @@ -508,8 +509,7 @@ detailed meanings of these arguments." (when coding (insert (format "preferred coding system: %s\n" coding)) (search-backward (symbol-name coding)) - (help-xref-button 0 #'describe-coding-system coding - "mouse-2, RET: describe this coding system"))) + (help-xref-button 0 'help-coding-system coding))) (help-setup-xref (list #'describe-character-set charset) (interactive-p)) )))) @@ -744,7 +744,7 @@ eight-bit-control and eight-bit-graphic.\n") (while charsets (insert " " (symbol-name (car charsets))) (search-backward (symbol-name (car charsets))) - (help-xref-button 0 #'describe-character-set (car charsets)) + (help-xref-button 0 'help-character-set (car charsets)) (goto-char (point-max)) (setq charsets (cdr charsets)))))) (help-setup-xref (list #'describe-coding-system coding-system)