-2001-11-01 Stefan Monnier <monnier@cs.yale.edu>
+2001-11-02 Miles Bader <miles@gnu.org>
+
+ * 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 <monnier@rum.cs.yale.edu>
* indent.el (tab-always-indent, indent-for-tab-command):
Remove redundant `never' setting.
;;; 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.
("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"))
(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)
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)
(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))
))))
(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)