/[emacs]/emacs/lisp/international/mule-diag.el
ViewVC logotype

Diff of /emacs/lisp/international/mule-diag.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.66 by rms, Fri Dec 28 03:01:30 2001 UTC revision 1.67 by pj, Mon Feb 11 06:09:16 2002 UTC
# Line 2  Line 2 
2    
3  ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.  ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
4  ;; Licensed to the Free Software Foundation.  ;; Licensed to the Free Software Foundation.
5  ;; Copyright (C) 2001 Free Software Foundation, Inc.  ;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
6    
7  ;; Keywords: multilingual, charset, coding system, fontset, diagnosis, i18n  ;; Keywords: multilingual, charset, coding system, fontset, diagnosis, i18n
8    
# Line 66  Line 66 
66  (defun list-character-sets (arg)  (defun list-character-sets (arg)
67    "Display a list of all character sets.    "Display a list of all character sets.
68    
69  The ID-NUM column contains a charset identification number  The ID-NUM column contains a charset identification number for
70    for internal Emacs use.  internal Emacs use.
71    
72  The MULTIBYTE-FORM column contains a format of multibyte sequence  The MULTIBYTE-FORM column contains the format of the buffer and string
73    of characters in the charset for buffer and string  multibyte sequence of characters in the charset using one to four
74    by one to four hexadecimal digits.  hexadecimal digits.
75    `xx' stands for any byte in the range 0..127.    `xx' stands for any byte in the range 0..127.
76    `XX' stands for any byte in the range 160..255.    `XX' stands for any byte in the range 160..255.
77    
78  The D column contains a dimension of this character set.  The D column contains the dimension of this character set.  The CH
79  The CH column contains a number of characters in a block of this character set.  column contains the number of characters in a block of this character
80  The FINAL-CHAR column contains an ISO-2022's <final-char> to use for  set.  The FINAL-CHAR column contains an ISO-2022 <final-char> to use
81    designating this character set in ISO-2022-based coding systems.  for designating this character set in ISO-2022-based coding systems.
82    
83  With prefix arg, the output format gets more cryptic,  With prefix arg, the output format gets more cryptic,
84  but still shows the full information."  but still shows the full information."
# Line 119  but still shows the full information." Line 119  but still shows the full information."
119          ;; Insert body sorted by charset IDs.          ;; Insert body sorted by charset IDs.
120          (list-character-sets-1 'id)))))          (list-character-sets-1 'id)))))
121    
   
 ;; Sort character set list by SORT-KEY.  
   
122  (defun sort-listed-character-sets (sort-key)  (defun sort-listed-character-sets (sort-key)
123    (if sort-key    (if sort-key
124        (save-excursion        (save-excursion
# Line 252  but still shows the full information." Line 249  but still shows the full information."
249                       (charset-description charset))))))                       (charset-description charset))))))
250    
251  (defvar non-iso-charset-alist  (defvar non-iso-charset-alist
252    `((viscii    `((mac-roman
253         nil
254         mac-roman-decoder
255         ((0 255)))
256        (viscii
257       (ascii vietnamese-viscii-lower vietnamese-viscii-upper)       (ascii vietnamese-viscii-lower vietnamese-viscii-upper)
258       viet-viscii-nonascii-translation-table       viet-viscii-nonascii-translation-table
259       ((0 255)))       ((0 255)))
# Line 274  but still shows the full information." Line 275  but still shows the full information."
275       decode-sjis-char       decode-sjis-char
276       ((32 127 ?\xA1 ?\xDF)       ((32 127 ?\xA1 ?\xDF)
277        ((?\x81 ?\x9F ?\xE0 ?\xEF) . (?\x40 ?\x7E ?\x80 ?\xFC)))))        ((?\x81 ?\x9F ?\xE0 ?\xEF) . (?\x40 ?\x7E ?\x80 ?\xFC)))))
278    "Alist of non-ISO charset names vs the corresponding information.    "Alist of charset names vs the corresponding information.
279    This is mis-named for historical reasons.  The charsets are actually
280  Non-ISO charsets are what Emacs can read (or write) by mapping to (or  non-built-in ones.  They correspond to Emacs coding systems, not Emacs
281  from) some Emacs' charsets that correspond to ISO charsets.  charsets, i.e. what Emacs can read (or write) by mapping to (or
282    from) Emacs internal charsets that typically correspond to a limited
283    set of ISO charsets.
284    
285  Each element has the following format:  Each element has the following format:
286    (NON-ISO-CHARSET CHARSET-LIST TRANSLATION-METHOD [ CODE-RANGE ])    (CHARSET CHARSET-LIST TRANSLATION-METHOD [ CODE-RANGE ])
287    
288  NON-ISO-CHARSET is a name (symbol) of the non-ISO charset.  CHARSET is the name (symbol) of the charset.
289    
290  CHARSET-LIST is a list of Emacs' charsets into which characters of  CHARSET-LIST is a list of Emacs charsets into which characters of
291  NON-ISO-CHARSET are mapped.  CHARSET are mapped.
292    
293  TRANSLATION-METHOD is a translation table (symbol) to translate a  TRANSLATION-METHOD is a translation table (symbol) to translate a
294  character code of NON-ISO-CHARSET to the corresponding Emacs character  character code of CHARSET to the corresponding Emacs character
295  code.  It can also be a function to call with one argument, a  code.  It can also be a function to call with one argument, a
296  character code in NON-ISO-CHARSET.  character code in CHARSET.
297    
298  CODE-RANGE specifies the valid code ranges of NON-ISO-CHARSET.  CODE-RANGE specifies the valid code ranges of CHARSET.
299  It is a list of RANGEs, where each RANGE is of the form:  It is a list of RANGEs, where each RANGE is of the form:
300    (FROM1 TO1 FROM2 TO2 ...)    (FROM1 TO1 FROM2 TO2 ...)
301  or  or
# Line 303  The second form is used for 2-byte codes Line 306  The second form is used for 2-byte codes
306  of the first byte, and the cdr part is the ranges of the second byte.")  of the first byte, and the cdr part is the ranges of the second byte.")
307    
308    
 ;; Decode a character that has code CODE in CODEPAGE.  Value is a  
 ;; string of decoded character.  
   
309  (defun decode-codepage-char (codepage code)  (defun decode-codepage-char (codepage code)
310    ;; Each CODEPAGE corresponds to a coding system cpCODEPAGE.    "Decode a character that has code CODE in CODEPAGE.
311    Return a decoded character string.  Each CODEPAGE corresponds to a
312    coding system cpCODEPAGE."
313    (let ((coding-system (intern (format "cp%d" codepage))))    (let ((coding-system (intern (format "cp%d" codepage))))
314      (or (coding-system-p coding-system)      (or (coding-system-p coding-system)
315          (codepage-setup codepage))          (codepage-setup codepage))
# Line 324  of the first byte, and the cdr part is t Line 326  of the first byte, and the cdr part is t
326      ;; Now ELT is (CODEPAGE . CHARSET), where CODEPAGE is a string      ;; Now ELT is (CODEPAGE . CHARSET), where CODEPAGE is a string
327      ;; (e.g. "850"), CHARSET is a charset that characters in CODEPAGE      ;; (e.g. "850"), CHARSET is a charset that characters in CODEPAGE
328      ;; are mapped to.      ;; are mapped to.
329      (setq non-iso-charset-alist      (unless (assq (intern (concat "cp" (car elt))) non-iso-charset-alist)
330            (cons (list (intern (concat "cp" (car elt)))        (setq non-iso-charset-alist
331                        (list 'ascii (cdr elt))              (cons (list (intern (concat "cp" (car elt)))
332                        `(lambda (code)                          (list 'ascii (cdr elt))
333                           (decode-codepage-char ,(string-to-int (car elt))                          `(lambda (code)
334                                                 code))                             (decode-codepage-char ,(string-to-int (car elt))
335                        (list (list 0 255)))                                                   code))
336                  non-iso-charset-alist))))                          (list (list 0 255)))
337                      non-iso-charset-alist)))))
338    
339    
340  ;; A variable to hold charset input history.  ;; A variable to hold charset input history.
# Line 341  of the first byte, and the cdr part is t Line 344  of the first byte, and the cdr part is t
344  ;;;###autoload  ;;;###autoload
345  (defun read-charset (prompt &optional default-value initial-input)  (defun read-charset (prompt &optional default-value initial-input)
346    "Read a character set from the minibuffer, prompting with string PROMPT.    "Read a character set from the minibuffer, prompting with string PROMPT.
347  It reads an Emacs' character set listed in the variable `charset-list'  It must be an Emacs character set listed in the variable `charset-list'
348  or a non-ISO character set listed in the variable  or a non-ISO character set listed in the variable
349  `non-iso-charset-alist'.  `non-iso-charset-alist'.
350    
# Line 395  detailed meanings of these arguments." Line 398  detailed meanings of these arguments."
398                 (or (< ch 32) (and (>= ch 127) (<= ch 255))))                 (or (< ch 32) (and (>= ch 127) (<= ch 255))))
399            ;; Don't insert a control code.            ;; Don't insert a control code.
400            (setq ch 32))            (setq ch 32))
401          (unless ch (setq ch 32))
402          (if (eq ch ?\t)
403              ;; Make it visible.
404              (setq ch (propertize "\t" 'display "^I")))
405          ;; This doesn't DTRT.  Maybe it's better to insert "^J" and not
406          ;; worry about the buffer contents not being correct.
407    ;;;       (if (eq ch ?\n)
408    ;;;     (setq ch (propertize "\n" 'display "^J")))
409        (indent-to (+ (* (% i 16) 3) 6))        (indent-to (+ (* (% i 16) 3) 6))
410        (insert ch)        (insert ch)
411        (setq i (1+ i))))        (setq i (1+ i))))
412    (insert "\n"))    (insert "\n"))
413    
   
 ;; List all characters in ISO charset CHARSET.  
   
414  (defun list-iso-charset-chars (charset)  (defun list-iso-charset-chars (charset)
415    (let ((dim (charset-dimension charset))    (let ((dim (charset-dimension charset))
416          (chars (charset-chars charset))          (chars (charset-chars charset))
417          (plane (charset-iso-graphic-plane charset))          (plane (charset-iso-graphic-plane charset))
418          min max)          min max)
419      (insert (format "Characters in the charset %s.\n" charset))      (insert (format "Characters in the coded character set %s.\n" charset))
420    
421      (cond ((eq charset 'eight-bit-control)      (cond ((eq charset 'eight-bit-control)
422             (setq min 128 max 159))             (setq min 128 max 159))
# Line 428  detailed meanings of these arguments." Line 436  detailed meanings of these arguments."
436            (list-block-of-chars charset i min max)            (list-block-of-chars charset i min max)
437            (setq i (1+ i)))))))            (setq i (1+ i)))))))
438    
   
 ;; List all characters in non-ISO charset CHARSET.  
   
439  (defun list-non-iso-charset-chars (charset)  (defun list-non-iso-charset-chars (charset)
440      "List all characters in non-built-in coded character set CHARSET."
441    (let* ((slot (assq charset non-iso-charset-alist))    (let* ((slot (assq charset non-iso-charset-alist))
442           (charsets (nth 1 slot))           (charsets (nth 1 slot))
443           (translate-method (nth 2 slot))           (translate-method (nth 2 slot))
444           (ranges (nth 3 slot))           (ranges (nth 3 slot))
445           range)           range)
446      (or slot      (or slot
447          (error "Unknown external charset: %s" charset))          (error "Unknown character set: %s" charset))
448      (insert (format "Characters in non-ISO charset %s.\n" charset))      (insert (format "Characters in the coded character set %s.\n" charset))
449      (insert "They are mapped to: "      (if charsets
450              (mapconcat #'symbol-name charsets ", ")          (insert "They are mapped to: "
451              "\n")                  (mapconcat #'symbol-name charsets ", ")
452                    "\n"))
453      (while ranges      (while ranges
454        (setq range (car ranges) ranges (cdr ranges))        (setq range (pop ranges))
455        (if (integerp (car range))        (if (integerp (car range))
456            ;; The form of RANGES is (FROM1 TO1 FROM2 TO2 ...).            ;; The form of RANGES is (FROM1 TO1 FROM2 TO2 ...).
457            (while range            (if (and (not (functionp translate-method))
458              (list-block-of-chars translate-method                     (< (car (last range)) 256))
459                                   0 (car range) (nth 1 range))                ;; Do it all in one block to avoid the listing being
460              (setq range (nthcdr 2 range)))                ;; broken up at gaps in the range.  Don't do that for
461                  ;; function translate-method, since not all codes in
462                  ;; that range may be valid.
463                  (list-block-of-chars translate-method
464                                       0 (car range) (car (last range)))
465                (while range
466                  (list-block-of-chars translate-method
467                                       0 (car range) (nth 1 range))
468                  (setq range (nthcdr 2 range))))
469          ;; The form of RANGES is ((FROM1-1 TO1-1 ...) . (FROM2-1 TO2-1 ...)).          ;; The form of RANGES is ((FROM1-1 TO1-1 ...) . (FROM2-1 TO2-1 ...)).
470          (let ((row-range (car range))          (let ((row-range (car range))
471                row row-max                row row-max
# Line 469  detailed meanings of these arguments." Line 484  detailed meanings of these arguments."
484    
485  ;;;###autoload  ;;;###autoload
486  (defun list-charset-chars (charset)  (defun list-charset-chars (charset)
487    "Display a list of characters in the specified character set."    "Display a list of characters in the specified character set.
488    This can list both Emacs `official' (ISO standard) charsets and the
489    characters encoded by various Emacs coding systems which correspond to
490    PC `codepages' and other coded character sets.  See `non-iso-charset-alist'."
491    (interactive (list (read-charset "Character set: ")))    (interactive (list (read-charset "Character set: ")))
492    (with-output-to-temp-buffer "*Help*"    (with-output-to-temp-buffer "*Help*"
493      (with-current-buffer standard-output      (with-current-buffer standard-output
494          (setq indent-tabs-mode nil)
495        (set-buffer-multibyte t)        (set-buffer-multibyte t)
496        (cond ((charsetp charset)        (cond ((charsetp charset)
497               (list-iso-charset-chars charset))               (list-iso-charset-chars charset))
498              ((assq charset non-iso-charset-alist)              ((assq charset non-iso-charset-alist)
499               (list-non-iso-charset-chars charset))               (list-non-iso-charset-chars charset))
500              (t              (t
501               (error "Invalid charset %s" charset))))))               (error "Invalid character set %s" charset))))))
502    
503    
504  ;;;###autoload  ;;;###autoload
505  (defun describe-character-set (charset)  (defun describe-character-set (charset)
506    "Display information about character set CHARSET."    "Display information about built-in character set CHARSET."
507    (interactive (list (let ((non-iso-charset-alist nil))    (interactive (list (let ((non-iso-charset-alist nil))
508                         (read-charset "Charset: "))))                         (read-charset "Charset: "))))
509    (or (charsetp charset)    (or (charsetp charset)
# Line 496  detailed meanings of these arguments." Line 515  detailed meanings of these arguments."
515          (insert "Character set: " (symbol-name charset)          (insert "Character set: " (symbol-name charset)
516                  (format " (ID:%d)\n\n" (aref info 0)))                  (format " (ID:%d)\n\n" (aref info 0)))
517          (insert (aref info 13) "\n\n")  ; description          (insert (aref info 13) "\n\n")  ; description
518          (insert "number of contained characters: "          (insert "Number of contained characters: "
519                  (if (= (aref info 2) 1)                  (if (= (aref info 2) 1)
520                      (format "%d\n" (aref info 3))                      (format "%d\n" (aref info 3))
521                    (format "%dx%d\n" (aref info 3) (aref info 3))))                    (format "%dx%d\n" (aref info 3) (aref info 3))))
522          (insert "the final char of ISO2022's designation sequence: ")          (insert "Final char of ISO2022 designation sequence: ")
523          (if (>= (aref info 8) 0)          (if (>= (aref info 8) 0)
524              (insert (format "`%c'\n" (aref info 8)))              (insert (format "`%c'\n" (aref info 8)))
525            (insert "not assigned\n"))            (insert "not assigned\n"))
526          (insert (format "width (how many columns on screen): %d\n"          (insert (format "Width (how many columns on screen): %d\n"
527                          (aref info 4)))                          (aref info 4)))
528          (insert (format "internal multibyte sequence: %s\n"          (insert (format "Internal multibyte sequence: %s\n"
529                          (charset-multibyte-form-string charset)))                          (charset-multibyte-form-string charset)))
530          (let ((coding (plist-get (aref info 14) 'preferred-coding-system)))          (let ((coding (plist-get (aref info 14) 'preferred-coding-system)))
531            (when coding            (when coding
532              (insert (format "preferred coding system: %s\n" coding))              (insert (format "Preferred coding system: %s\n" coding))
533              (search-backward (symbol-name coding))              (search-backward (symbol-name coding))
534              (help-xref-button 0 'help-coding-system coding)))))))              (help-xref-button 0 'help-coding-system coding)))))))
535    
# Line 557  which font is being used for displaying Line 576  which font is being used for displaying
576                        (format "%d" (nth 1 split))                        (format "%d" (nth 1 split))
577                      (format "%d %d" (nth 1 split) (nth 2 split)))))                      (format "%d %d" (nth 1 split) (nth 2 split)))))
578                ("syntax"                ("syntax"
579                 ,(let ((syntax (aref (syntax-table) char)))                 ,(let* ((old-table (syntax-table))
580                    (with-temp-buffer                         (table (get-char-property (point) 'syntax-table)))
581                      (internal-describe-syntax-value syntax)                    (if (consp table)
582                      (buffer-string))))                        (nth 1 (assq (car table)
583                                       (mapcar #'cdr syntax-code-table)))
584                        (unwind-protect
585                            (progn
586                              (if (syntax-table-p table)
587                                  (set-syntax-table table))
588                              (nth 2 (assq (char-syntax char) syntax-code-table)))
589                          (set-syntax-table old-table)))))
590                ("category"                ("category"
591                 ,@(let ((category-set (char-category-set char)))                 ,@(let ((category-set (char-category-set char)))
592                     (if (not category-set)                     (if (not category-set)
# Line 568  which font is being used for displaying Line 594  which font is being used for displaying
594                       (mapcar #'(lambda (x) (format "%c:%s  "                       (mapcar #'(lambda (x) (format "%c:%s  "
595                                                     x (category-docstring x)))                                                     x (category-docstring x)))
596                               (category-set-mnemonics category-set)))))                               (category-set-mnemonics category-set)))))
597                  ,@(let ((props (aref char-code-property-table char))
598                          ps)
599                      (when props
600                        (while props
601                          (push (format "%s:" (pop props)) ps)
602                          (push (format "%s;" (pop props)) ps))
603                        (list (cons "Properties" (nreverse ps)))))
604                ("buffer code"                ("buffer code"
605                 ,(encoded-string-description                 ,(encoded-string-description
606                   (string-as-unibyte (char-to-string char)) nil))                   (string-as-unibyte (char-to-string char)) nil))
# Line 579  which font is being used for displaying Line 612  which font is being used for displaying
612                               (format "(encoded by coding system %S)" coding))                               (format "(encoded by coding system %S)" coding))
613                       (list "not encodable by coding system"                       (list "not encodable by coding system"
614                             (symbol-name coding)))))                             (symbol-name coding)))))
615                  ,@(if (or (memq 'mule-utf-8
616                              (find-coding-systems-region (point) (1+ (point))))
617                            (get-char-property (point) 'untranslated-utf-8))
618                        (let ((uc (or (get-char-property (point)
619                                                         'untranslated-utf-8)
620                                      (encode-char (char-after) 'ucs))))
621                          (if uc
622                              (list (list "Unicode"
623                                          (format "%04X" uc))))))
624                ,(if (display-graphic-p (selected-frame))                ,(if (display-graphic-p (selected-frame))
625                     (list "font" (or (internal-char-font (point))                     (list "font" (or (internal-char-font (point))
626                                      "-- none --"))                                      "-- none --"))
# Line 620  which font is being used for displaying Line 662  which font is being used for displaying
662                                 (nth 2 composition)                                 (nth 2 composition)
663                                 " ")                                 " ")
664                      ").\n"                      ").\n"
665                      "See the variable `reference-point-alist' for the meaning of the rule.\n")))                      "See the variable `reference-point-alist' for "
666                        "the meaning of the rule.\n")))
667          (if props          (if props
668              (insert "\nText properties\n"))              (insert "\nText properties\n"))
669          (while props          (while props
# Line 768  eight-bit-control and eight-bit-graphic. Line 811  eight-bit-control and eight-bit-graphic.
811    
812  The format is \"F[..],K[..],T[..],P>[..],P<[..], default F[..],P<[..],P<[..]\",  The format is \"F[..],K[..],T[..],P>[..],P<[..], default F[..],P<[..],P<[..]\",
813  where mnemonics of the following coding systems come in this order  where mnemonics of the following coding systems come in this order
814  at the place of `..':  in place of `..':
815    `buffer-file-coding-system' (of the current buffer)    `buffer-file-coding-system' (of the current buffer)
816    eol-type of `buffer-file-coding-system' (of the current buffer)    eol-type of `buffer-file-coding-system' (of the current buffer)
817    Value returned by `keyboard-coding-system'    Value returned by `keyboard-coding-system'
# Line 857  at the place of `..': Line 900  at the place of `..':
900    
901      (with-current-buffer standard-output      (with-current-buffer standard-output
902    
903        (princ "\nPriority order for recognizing coding systems when reading files:\n")        (princ "
904    Priority order for recognizing coding systems when reading files:\n")
905        (let ((l coding-category-list)        (let ((l coding-category-list)
906              (i 1)              (i 1)
907              (coding-list nil)              (coding-list nil)
# Line 898  at the place of `..': Line 942  at the place of `..':
942            (if codings            (if codings
943                (let ((max-col (frame-width))                (let ((max-col (frame-width))
944                      pos)                      pos)
945                  (princ (format "  The followings are decoded correctly but recognized as %s:\n   " coding-system))                  (princ (format "\
946      The following are decoded correctly but recognized as %s:\n   "
947                                   coding-system))
948                  (while codings                  (while codings
949                    (setq pos (point))                    (setq pos (point))
950                    (insert (format " %s" (car codings)))                    (insert (format " %s" (car codings)))
# Line 1094  but still contains full information abou Line 1140  but still contains full information abou
1140        (with-output-to-temp-buffer "*Help*"        (with-output-to-temp-buffer "*Help*"
1141          (describe-font-internal font-info 'verbose)))))          (describe-font-internal font-info 'verbose)))))
1142    
 ;; Print information of FONTSET.  If optional arg PRINT-FONTS is  
 ;; non-nil, print also names of all opened fonts for FONTSET.  This  
 ;; function actually INSERT such information in the current buffer.  
1143  (defun print-fontset (fontset &optional print-fonts)  (defun print-fontset (fontset &optional print-fonts)
1144      "Print information about FONTSET.
1145    If optional arg PRINT-FONTS is non-nil, also print names of all opened
1146    fonts for FONTSET.  This function actually inserts the information in
1147    the current buffer."
1148    (let ((tail (aref (fontset-info fontset) 2))    (let ((tail (aref (fontset-info fontset) 2))
1149          elt chars font-spec opened prev-charset charset from to)          elt chars font-spec opened prev-charset charset from to)
1150      (beginning-of-line)      (beginning-of-line)
# Line 1163  but still contains full information abou Line 1210  but still contains full information abou
1210    
1211  ;;;###autoload  ;;;###autoload
1212  (defun describe-fontset (fontset)  (defun describe-fontset (fontset)
1213    "Display information of FONTSET.    "Display information about FONTSET.
1214  This shows which font is used for which character(s)."  This shows which font is used for which character(s)."
1215    (interactive    (interactive
1216     (if (not (and window-system (fboundp 'fontset-list)))     (if (not (and window-system (fboundp 'fontset-list)))
# Line 1189  This shows which font is used for which Line 1236  This shows which font is used for which
1236  (defun list-fontsets (arg)  (defun list-fontsets (arg)
1237    "Display a list of all fontsets.    "Display a list of all fontsets.
1238  This shows the name, size, and style of each fontset.  This shows the name, size, and style of each fontset.
1239  With prefix arg, it also list the fonts contained in each fontset;  With prefix arg, also list the fonts contained in each fontset;
1240  see the function `describe-fontset' for the format of the list."  see the function `describe-fontset' for the format of the list."
1241    (interactive "P")    (interactive "P")
1242    (if (not (and window-system (fboundp 'fontset-list)))    (if (not (and window-system (fboundp 'fontset-list)))
# Line 1214  see the function `describe-fontset' for Line 1261  see the function `describe-fontset' for
1261    "Display information about all input methods."    "Display information about all input methods."
1262    (interactive)    (interactive)
1263    (with-output-to-temp-buffer "*Help*"    (with-output-to-temp-buffer "*Help*"
1264      (list-input-methods-1)))      (list-input-methods-1)
1265        (with-current-buffer standard-output
1266          (save-excursion
1267            (goto-char (point-min))
1268            (while (re-search-forward
1269                    "^  \\([^ ]+\\) (`.*' in mode line)$" nil t)
1270              (help-xref-button 1 #'describe-input-method
1271                                    (match-string 1)
1272                                    "mouse-2: describe this method")))
1273          (help-setup-xref '(list-input-methods) (interactive-p)))))
1274    
1275  (defun list-input-methods-1 ()  (defun list-input-methods-1 ()
1276    (if (not input-method-alist)    (if (not input-method-alist)
1277        (progn        (progn
1278          (princ "          (princ "
1279  No input method is available, perhaps because you have not yet  No input method is available, perhaps because you have not yet
1280  installed LEIM (Libraries of Emacs Input Method).  installed LEIM (Libraries of Emacs Input Methods).
1281    
1282  LEIM is available from the same ftp directory as Emacs.  For instance,  LEIM is available from the same ftp directory as Emacs.  For instance,
1283  if there exists an archive file `emacs-M.N.tar.gz', there should also  if there exists an archive file `emacs-M.N.tar.gz', there should also
# Line 1344  system which uses fontsets)." Line 1400  system which uses fontsets)."
1400              (setq fontsets (cdr fontsets)))))              (setq fontsets (cdr fontsets)))))
1401        (print-help-return-message))))        (print-help-return-message))))
1402    
   
 ;;; DUMP DATA FILE  
   
 ;;;###autoload  
 (defun dump-charsets ()  
   "Dump information about all charsets into the file `CHARSETS'.  
 The file is saved in the directory `data-directory'."  
   (let ((file (expand-file-name "CHARSETS" data-directory))  
         buf)  
     (or (file-writable-p file)  
         (error "Can't write to file %s" file))  
     (setq buf (find-file-noselect file))  
     (save-window-excursion  
       (with-current-buffer buf  
         (setq buffer-read-only nil)  
         (erase-buffer)  
         (list-character-sets-2)  
         (insert-buffer-substring "*Help*")  
         (let (make-backup-files  
               coding-system-for-write)  
           (save-buffer))))  
     (kill-buffer buf))  
   (if noninteractive  
       (kill-emacs)))  
   
 ;;;###autoload  
 (defun dump-codings ()  
   "Dump information about all coding systems into the file `CODINGS'.  
 The file is saved in the directory `data-directory'."  
   (let ((file (expand-file-name "CODINGS" data-directory))  
         buf)  
     (or (file-writable-p file)  
         (error "Can't write to file %s" file))  
     (setq buf (find-file-noselect file))  
     (save-window-excursion  
       (with-current-buffer buf  
         (setq buffer-read-only nil)  
         (erase-buffer)  
         (list-coding-systems t)  
         (insert-buffer-substring "*Help*")  
         (list-coding-categories)  
         (insert-buffer-substring "*Help*")  
         (let (make-backup-files  
               coding-system-for-write)  
           (save-buffer))))  
     (kill-buffer buf))  
   (if noninteractive  
       (kill-emacs)))  
   
1403  ;;; mule-diag.el ends here  ;;; mule-diag.el ends here

Legend:
Removed from v.1.66  
changed lines
  Added in v.1.67

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26