]> git.eshelyaron.com Git - emacs.git/commitdiff
(describe-character-set)
authorMiles Bader <miles@gnu.org>
Fri, 2 Nov 2001 05:53:54 +0000 (05:53 +0000)
committerMiles Bader <miles@gnu.org>
Fri, 2 Nov 2001 05:53:54 +0000 (05:53 +0000)
(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.

lisp/ChangeLog
lisp/international/mule-diag.el

index ba35309ebfbed7e1498f10f7ce6b85399bde3993..d1a9b79eb0cc03c113a05212a30c8be7caca309c 100644 (file)
@@ -1,4 +1,20 @@
-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.
index a967844f305ac805ba82118280899c011db3012b..4193515e53f04a00c0e114ff019fd825f2e9dfed 100644 (file)
 
 ;;; 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)