diff options
| author | Miles Bader | 2001-11-02 05:53:54 +0000 |
|---|---|---|
| committer | Miles Bader | 2001-11-02 05:53:54 +0000 |
| commit | e8cdeaca91e55c126a2d47cceb9d60478cb1fb46 (patch) | |
| tree | 9c97d7bde59538cebb6c04e8dc9363d0a3fbbd7c | |
| parent | 6e88156740e011ff60214113fc8d1bab8ccc71d6 (diff) | |
| download | emacs-e8cdeaca91e55c126a2d47cceb9d60478cb1fb46.tar.gz emacs-e8cdeaca91e55c126a2d47cceb9d60478cb1fb46.zip | |
(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.
| -rw-r--r-- | lisp/ChangeLog | 18 | ||||
| -rw-r--r-- | lisp/international/mule-diag.el | 40 |
2 files changed, 37 insertions, 21 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ba35309ebfb..d1a9b79eb0c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,4 +1,20 @@ | |||
| 1 | 2001-11-01 Stefan Monnier <monnier@cs.yale.edu> | 1 | 2001-11-02 Miles Bader <miles@gnu.org> |
| 2 | |||
| 3 | * help-mode.el (help-xref): New button type. | ||
| 4 | (help-function, help-variable, help-face, help-coding-system) | ||
| 5 | (help-input-method, help-character-set, help-type, help-symbol) | ||
| 6 | (help-back, help-info, help-customize-variable, help-customize-face) | ||
| 7 | (help-function-def, help-variable-def): Use it as a supertype. | ||
| 8 | Remove `action' property. | ||
| 9 | |||
| 10 | * international/mule-diag.el (describe-character-set) | ||
| 11 | (describe-coding-system): Pass correct args to `help-xref-button'. | ||
| 12 | (sort-listed-character-sets): New button type. | ||
| 13 | (list-character-sets): Use it. | ||
| 14 | (list-charset-chars): New button type. | ||
| 15 | (list-character-sets-1): Use it. | ||
| 16 | |||
| 17 | 2001-11-01 Stefan Monnier <monnier@rum.cs.yale.edu> | ||
| 2 | 18 | ||
| 3 | * indent.el (tab-always-indent, indent-for-tab-command): | 19 | * indent.el (tab-always-indent, indent-for-tab-command): |
| 4 | Remove redundant `never' setting. | 20 | 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 @@ | |||
| 47 | 47 | ||
| 48 | ;;; CHARSET | 48 | ;;; CHARSET |
| 49 | 49 | ||
| 50 | (define-button-type 'sort-listed-character-sets | ||
| 51 | 'help-echo (purecopy "mouse-2, RET: sort on this column") | ||
| 52 | 'face 'bold | ||
| 53 | 'action #'(lambda (button) | ||
| 54 | (sort-listed-character-sets (button-get button 'sort-key)))) | ||
| 55 | |||
| 56 | (define-button-type 'list-charset-chars | ||
| 57 | :supertype 'help-xref | ||
| 58 | 'help-function #'list-charset-chars | ||
| 59 | 'help-echo "mouse-2, RET: show table of characters for this character set") | ||
| 60 | |||
| 61 | |||
| 50 | ;;;###autoload | 62 | ;;;###autoload |
| 51 | (defun list-character-sets (arg) | 63 | (defun list-character-sets (arg) |
| 52 | "Display a list of all character sets. | 64 | "Display a list of all character sets. |
| @@ -88,20 +100,13 @@ but still shows the full information." | |||
| 88 | ("CHARSET-NAME" . name) "\t\t\t" | 100 | ("CHARSET-NAME" . name) "\t\t\t" |
| 89 | ("MULTIBYTE-FORM" . id) "\t" | 101 | ("MULTIBYTE-FORM" . id) "\t" |
| 90 | ("D CH FINAL-CHAR" . iso-spec))) | 102 | ("D CH FINAL-CHAR" . iso-spec))) |
| 91 | (help-highlight-face 'region) | ||
| 92 | (help-echo | ||
| 93 | (substitute-command-keys | ||
| 94 | (concat (if (display-mouse-p) "\\[help-follow-mouse], ") | ||
| 95 | "\\[help-follow]: sort on this column"))) | ||
| 96 | pos) | 103 | pos) |
| 97 | (while columns | 104 | (while columns |
| 98 | (if (stringp (car columns)) | 105 | (if (stringp (car columns)) |
| 99 | (insert (car columns)) | 106 | (insert (car columns)) |
| 100 | (insert (car (car columns))) | 107 | (insert-text-button (car (car columns)) |
| 101 | (search-backward (car (car columns))) | 108 | :type 'sort-listed-character-sets |
| 102 | (help-xref-button 0 'sort-listed-character-sets | 109 | 'sort-key (cdr (car columns))) |
| 103 | (cdr (car columns)) | ||
| 104 | help-echo) | ||
| 105 | (goto-char (point-max))) | 110 | (goto-char (point-max))) |
| 106 | (setq columns (cdr columns))) | 111 | (setq columns (cdr columns))) |
| 107 | (insert "\n")) | 112 | (insert "\n")) |
| @@ -151,10 +156,6 @@ but still shows the full information." | |||
| 151 | (or sort-key | 156 | (or sort-key |
| 152 | (setq sort-key 'id)) | 157 | (setq sort-key 'id)) |
| 153 | (let ((tail (charset-list)) | 158 | (let ((tail (charset-list)) |
| 154 | (help-echo | ||
| 155 | (substitute-command-keys | ||
| 156 | (concat (if (display-mouse-p) "\\[help-follow-mouse], ") | ||
| 157 | "\\[help-follow]: show table of this character set"))) | ||
| 158 | charset-info-list elt charset info sort-func) | 159 | charset-info-list elt charset info sort-func) |
| 159 | (while tail | 160 | (while tail |
| 160 | (setq charset (car tail) tail (cdr tail) | 161 | (setq charset (car tail) tail (cdr tail) |
| @@ -199,9 +200,9 @@ but still shows the full information." | |||
| 199 | charset-info-list (cdr charset-info-list)) | 200 | charset-info-list (cdr charset-info-list)) |
| 200 | (insert (format "%03d(%02X)" (car elt) (car elt))) ; ID-NUM | 201 | (insert (format "%03d(%02X)" (car elt) (car elt))) ; ID-NUM |
| 201 | (indent-to 8) | 202 | (indent-to 8) |
| 202 | (insert (symbol-name (nth 1 elt))) ; CHARSET-NAME | 203 | (insert-text-button (symbol-name (nth 1 elt)) |
| 203 | (search-backward (symbol-name (nth 1 elt))) | 204 | :type 'list-charset-chars |
| 204 | (help-xref-button 0 'list-charset-chars (nth 1 elt) help-echo) | 205 | 'help-args (list (nth 1 elt))) |
| 205 | (goto-char (point-max)) | 206 | (goto-char (point-max)) |
| 206 | (insert "\t") | 207 | (insert "\t") |
| 207 | (indent-to 40) | 208 | (indent-to 40) |
| @@ -508,8 +509,7 @@ detailed meanings of these arguments." | |||
| 508 | (when coding | 509 | (when coding |
| 509 | (insert (format "preferred coding system: %s\n" coding)) | 510 | (insert (format "preferred coding system: %s\n" coding)) |
| 510 | (search-backward (symbol-name coding)) | 511 | (search-backward (symbol-name coding)) |
| 511 | (help-xref-button 0 #'describe-coding-system coding | 512 | (help-xref-button 0 'help-coding-system coding))) |
| 512 | "mouse-2, RET: describe this coding system"))) | ||
| 513 | (help-setup-xref (list #'describe-character-set charset) | 513 | (help-setup-xref (list #'describe-character-set charset) |
| 514 | (interactive-p)) | 514 | (interactive-p)) |
| 515 | )))) | 515 | )))) |
| @@ -744,7 +744,7 @@ eight-bit-control and eight-bit-graphic.\n") | |||
| 744 | (while charsets | 744 | (while charsets |
| 745 | (insert " " (symbol-name (car charsets))) | 745 | (insert " " (symbol-name (car charsets))) |
| 746 | (search-backward (symbol-name (car charsets))) | 746 | (search-backward (symbol-name (car charsets))) |
| 747 | (help-xref-button 0 #'describe-character-set (car charsets)) | 747 | (help-xref-button 0 'help-character-set (car charsets)) |
| 748 | (goto-char (point-max)) | 748 | (goto-char (point-max)) |
| 749 | (setq charsets (cdr charsets)))))) | 749 | (setq charsets (cdr charsets)))))) |
| 750 | (help-setup-xref (list #'describe-coding-system coding-system) | 750 | (help-setup-xref (list #'describe-coding-system coding-system) |