diff options
| author | Stefan Monnier | 2024-02-14 17:18:50 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2024-02-14 17:18:50 -0500 |
| commit | fbef8ff2a4106ff7f0f3d026071fb8096280cc61 (patch) | |
| tree | 91a71bc641adc9fa835bf331a8813d053a55a9cc | |
| parent | 3a93e301ddc913758abe05c876aa3016e8b23af8 (diff) | |
| download | emacs-fbef8ff2a4106ff7f0f3d026071fb8096280cc61.tar.gz emacs-fbef8ff2a4106ff7f0f3d026071fb8096280cc61.zip | |
titdic-cnv.el: Bring all definitions under the `tit-` namespace
Add a `tit-` or `tit--` prefix where necessary. Adjust all callers.
I kept the old names via obsolete aliases for now, although it's probably not
worth the trouble.
* lisp/international/titdic-cnv.el: Bring all definitions under the
`tit-` namespace.
(tit-quail-cxterm-package-ext-info): Rename var from
`quail-cxterm-package-ext-info`. Adjust value to new names.
(tit-dic-convert): Rename from `titdic-convert`.
(batch-tit-dic-convert): Rename from `batch-titdic-convert`.
(tit-quail-misc-package-ext-info): Rename var from
`quail-misc-package-ext-info`. Adjust value to new names.
(tit--tsang-quick-converter): Rename from `tsang-quick-converter`.
(tit--tsang-b5-converter): Rename from `tsang-b5-converter`.
(tit--quick-b5-converter): Rename from `quick-b5-converter`.
(tit--tsang-cns-converter): Rename from `tsang-cns-converter`.
(tit--quick-cns-converter): Rename from `quick-cns-converter`.
(tit--py-converter): Rename from `py-converter`.
(tit--ziranma-converter): Rename from `ziranma-converter`.
(tit--ctlau-converter): Rename from `ctlau-converter`.
(tit--ctlau-gb-converter): Rename from `ctlau-gb-converter`.
(tit--ctlau-b5-converter): Rename from `ctlau-b5-converter`.
(tit-miscdic-convert): Rename from `miscdic-convert`.
(batch-tit-miscdic-convert): Rename from `batch-miscdic-convert`.
(tit-pinyin-convert): Rename from `pinyin-convert`.
* leim/Makefile.in (${leimdir}/quail/%.el, misc_convert)
(${srcdir}/../lisp/language/pinyin.el): Use the new names.
| -rw-r--r-- | etc/NEWS | 5 | ||||
| -rw-r--r-- | leim/Makefile.in | 6 | ||||
| -rw-r--r-- | lisp/international/titdic-cnv.el | 119 |
3 files changed, 79 insertions, 51 deletions
| @@ -431,6 +431,11 @@ respectively, in addition to the existing translations 'C-x 8 / e' and | |||
| 431 | * Changes in Specialized Modes and Packages in Emacs 30.1 | 431 | * Changes in Specialized Modes and Packages in Emacs 30.1 |
| 432 | 432 | ||
| 433 | --- | 433 | --- |
| 434 | ** Titdic-cnv | ||
| 435 | Most of the variables and functions in the file have been renamed to | ||
| 436 | make sure they all use a 'tit-' namespace prefix. | ||
| 437 | |||
| 438 | --- | ||
| 434 | ** Trace | 439 | ** Trace |
| 435 | In batch mode, tracing now sends the trace to stdout. | 440 | In batch mode, tracing now sends the trace to stdout. |
| 436 | 441 | ||
diff --git a/leim/Makefile.in b/leim/Makefile.in index f7a23178919..bc1eeb5e634 100644 --- a/leim/Makefile.in +++ b/leim/Makefile.in | |||
| @@ -101,11 +101,11 @@ ${leimdir}/quail ${leimdir}/ja-dic: | |||
| 101 | ## All of TIT_GB and TIT_BIG5. | 101 | ## All of TIT_GB and TIT_BIG5. |
| 102 | ${leimdir}/quail/%.el: ${srcdir}/CXTERM-DIC/%.tit | 102 | ${leimdir}/quail/%.el: ${srcdir}/CXTERM-DIC/%.tit |
| 103 | $(AM_V_GEN)${RUN_EMACS} -l titdic-cnv \ | 103 | $(AM_V_GEN)${RUN_EMACS} -l titdic-cnv \ |
| 104 | -f batch-titdic-convert -dir ${leimdir}/quail $< | 104 | -f batch-tit-dic-convert -dir ${leimdir}/quail $< |
| 105 | 105 | ||
| 106 | 106 | ||
| 107 | misc_convert = $(AM_V_GEN)${RUN_EMACS} \ | 107 | misc_convert = $(AM_V_GEN)${RUN_EMACS} \ |
| 108 | -l titdic-cnv -f batch-miscdic-convert -dir ${leimdir}/quail | 108 | -l titdic-cnv -f batch-tit-miscdic-convert -dir ${leimdir}/quail |
| 109 | 109 | ||
| 110 | ## CTLau.el, CTLau-b5.el. | 110 | ## CTLau.el, CTLau-b5.el. |
| 111 | ${leimdir}/quail/CT%.el: ${srcdir}/MISC-DIC/CT%.html | 111 | ${leimdir}/quail/CT%.el: ${srcdir}/MISC-DIC/CT%.html |
| @@ -148,7 +148,7 @@ ${leimdir}/ja-dic/ja-dic.el: $(srcdir)/SKK-DIC/SKK-JISYO.L small-ja-dic-option | |||
| 148 | -f batch-skkdic-convert -dir "$(leimdir)/ja-dic" $(JA_DIC_NO_REDUCTION_OPTION) "$<" | 148 | -f batch-skkdic-convert -dir "$(leimdir)/ja-dic" $(JA_DIC_NO_REDUCTION_OPTION) "$<" |
| 149 | 149 | ||
| 150 | ${srcdir}/../lisp/language/pinyin.el: ${srcdir}/MISC-DIC/pinyin.map | 150 | ${srcdir}/../lisp/language/pinyin.el: ${srcdir}/MISC-DIC/pinyin.map |
| 151 | $(AM_V_GEN)${RUN_EMACS} -l titdic-cnv -f pinyin-convert $< $@ | 151 | $(AM_V_GEN)${RUN_EMACS} -l titdic-cnv -f tit-pinyin-convert $< $@ |
| 152 | 152 | ||
| 153 | 153 | ||
| 154 | .PHONY: bootstrap-clean distclean maintainer-clean gen-clean | 154 | .PHONY: bootstrap-clean distclean maintainer-clean gen-clean |
diff --git a/lisp/international/titdic-cnv.el b/lisp/international/titdic-cnv.el index c4706e061e3..42584f6548c 100644 --- a/lisp/international/titdic-cnv.el +++ b/lisp/international/titdic-cnv.el | |||
| @@ -31,12 +31,12 @@ | |||
| 31 | ;; Convert cxterm dictionary (of TIT format) to quail-package. | 31 | ;; Convert cxterm dictionary (of TIT format) to quail-package. |
| 32 | ;; | 32 | ;; |
| 33 | ;; Usage (within Emacs): | 33 | ;; Usage (within Emacs): |
| 34 | ;; M-x titdic-convert<CR>CXTERM-DICTIONARY-NAME<CR> | 34 | ;; M-x tit-dic-convert<CR>CXTERM-DICTIONARY-NAME<CR> |
| 35 | ;; Usage (from shell): | 35 | ;; Usage (from shell): |
| 36 | ;; % emacs -batch -l titdic-cnv -f batch-titdic-convert\ | 36 | ;; % emacs -batch -l titdic-cnv -f batch-tit-dic-convert\ |
| 37 | ;; [-dir DIR] [DIR | FILE] ... | 37 | ;; [-dir DIR] [DIR | FILE] ... |
| 38 | ;; | 38 | ;; |
| 39 | ;; When you run titdic-convert within Emacs, you have a chance to | 39 | ;; When you run `tit-dic-convert' within Emacs, you have a chance to |
| 40 | ;; modify arguments of `quail-define-package' before saving the | 40 | ;; modify arguments of `quail-define-package' before saving the |
| 41 | ;; converted file. For instance, you are likely to modify TITLE, | 41 | ;; converted file. For instance, you are likely to modify TITLE, |
| 42 | ;; DOCSTRING, and KEY-BINDINGS. | 42 | ;; DOCSTRING, and KEY-BINDINGS. |
| @@ -90,7 +90,8 @@ | |||
| 90 | ;; \<quail-translation-docstring> is replaced by a description about | 90 | ;; \<quail-translation-docstring> is replaced by a description about |
| 91 | ;; how to select a translation from a list of candidates. | 91 | ;; how to select a translation from a list of candidates. |
| 92 | 92 | ||
| 93 | (defvar quail-cxterm-package-ext-info | 93 | (define-obsolete-variable-alias 'quail-cxterm-package-ext-info 'tit-quail-cxterm-package-ext-info "30.1") |
| 94 | (defvar tit-quail-cxterm-package-ext-info | ||
| 94 | '(("chinese-4corner" "四角") | 95 | '(("chinese-4corner" "四角") |
| 95 | ("chinese-array30" "30") | 96 | ("chinese-array30" "30") |
| 96 | ("chinese-ccdospy" "缩拼" | 97 | ("chinese-ccdospy" "缩拼" |
| @@ -277,7 +278,7 @@ SPC, 6, 3, 4, or 7 specifying a tone (SPC:陰平, 6:陽平, 3:上聲, 4:去聲, | |||
| 277 | (tit-moveleft ",<") | 278 | (tit-moveleft ",<") |
| 278 | (tit-keyprompt nil)) | 279 | (tit-keyprompt nil)) |
| 279 | 280 | ||
| 280 | (generate-lisp-file-heading filename 'titdic-convert :code nil) | 281 | (generate-lisp-file-heading filename 'tit-dic-convert :code nil) |
| 281 | (princ ";; Quail package `") | 282 | (princ ";; Quail package `") |
| 282 | (princ package) | 283 | (princ package) |
| 283 | (princ "\n") | 284 | (princ "\n") |
| @@ -354,7 +355,7 @@ SPC, 6, 3, 4, or 7 specifying a tone (SPC:陰平, 6:陽平, 3:上聲, 4:去聲, | |||
| 354 | 355 | ||
| 355 | (princ "(quail-define-package ") | 356 | (princ "(quail-define-package ") |
| 356 | ;; Args NAME, LANGUAGE, TITLE | 357 | ;; Args NAME, LANGUAGE, TITLE |
| 357 | (let ((title (nth 1 (assoc package quail-cxterm-package-ext-info)))) | 358 | (let ((title (nth 1 (assoc package tit-quail-cxterm-package-ext-info)))) |
| 358 | (princ "\"") | 359 | (princ "\"") |
| 359 | (princ package) | 360 | (princ package) |
| 360 | (princ "\" \"") | 361 | (princ "\" \"") |
| @@ -383,7 +384,7 @@ SPC, 6, 3, 4, or 7 specifying a tone (SPC:陰平, 6:陽平, 3:上聲, 4:去聲, | |||
| 383 | (let ((doc (concat tit-prompt "\n")) | 384 | (let ((doc (concat tit-prompt "\n")) |
| 384 | (comments (if tit-comments | 385 | (comments (if tit-comments |
| 385 | (mapconcat #'identity (nreverse tit-comments) "\n"))) | 386 | (mapconcat #'identity (nreverse tit-comments) "\n"))) |
| 386 | (doc-ext (nth 2 (assoc package quail-cxterm-package-ext-info)))) | 387 | (doc-ext (nth 2 (assoc package tit-quail-cxterm-package-ext-info)))) |
| 387 | (if comments | 388 | (if comments |
| 388 | (setq doc (concat doc "\n" comments "\n"))) | 389 | (setq doc (concat doc "\n" comments "\n"))) |
| 389 | (if doc-ext | 390 | (if doc-ext |
| @@ -476,6 +477,9 @@ SPC, 6, 3, 4, or 7 specifying a tone (SPC:陰平, 6:陽平, 3:上聲, 4:去聲, | |||
| 476 | 477 | ||
| 477 | ;;;###autoload | 478 | ;;;###autoload |
| 478 | (defun titdic-convert (filename &optional dirname) | 479 | (defun titdic-convert (filename &optional dirname) |
| 480 | (declare (obsolete tit-dic-convert "30.1")) | ||
| 481 | (tit-dic-convert filename dirname)) | ||
| 482 | (defun tit-dic-convert (filename &optional dirname) | ||
| 479 | "Convert a TIT dictionary of FILENAME into a Quail package. | 483 | "Convert a TIT dictionary of FILENAME into a Quail package. |
| 480 | Optional argument DIRNAME if specified is the directory name under which | 484 | Optional argument DIRNAME if specified is the directory name under which |
| 481 | the generated Quail package is saved." | 485 | the generated Quail package is saved." |
| @@ -531,21 +535,24 @@ the generated Quail package is saved." | |||
| 531 | 535 | ||
| 532 | ;;;###autoload | 536 | ;;;###autoload |
| 533 | (defun batch-titdic-convert (&optional force) | 537 | (defun batch-titdic-convert (&optional force) |
| 534 | "Run `titdic-convert' on the files remaining on the command line. | 538 | (declare (obsolete batch-tit-dic-convert "30.1")) |
| 539 | (batch-tit-dic-convert force)) | ||
| 540 | (defun batch-tit-dic-convert (&optional force) | ||
| 541 | "Run `tit-dic-convert' on the files remaining on the command line. | ||
| 535 | Use this from the command line, with `-batch'; | 542 | Use this from the command line, with `-batch'; |
| 536 | it won't work in an interactive Emacs. | 543 | it won't work in an interactive Emacs. |
| 537 | For example, invoke \"emacs -batch -f batch-titdic-convert XXX.tit\" to | 544 | For example, invoke \"emacs -batch -f batch-tit-dic-convert XXX.tit\" to |
| 538 | generate Quail package file \"xxx.el\" from TIT dictionary file \"XXX.tit\". | 545 | generate Quail package file \"xxx.el\" from TIT dictionary file \"XXX.tit\". |
| 539 | To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"." | 546 | To get complete usage, invoke \"emacs -batch -f batch-tit-dic-convert -h\"." |
| 540 | (defvar command-line-args-left) ; Avoid compiler warning. | 547 | (defvar command-line-args-left) ; Avoid compiler warning. |
| 541 | (if (not noninteractive) | 548 | (if (not noninteractive) |
| 542 | (error "`batch-titdic-convert' should be used only with -batch")) | 549 | (error "`batch-tit-dic-convert' should be used only with -batch")) |
| 543 | (if (string= (car command-line-args-left) "-h") | 550 | (if (string= (car command-line-args-left) "-h") |
| 544 | (progn | 551 | (progn |
| 545 | (message "To convert XXX.tit and YYY.tit into xxx.el and yyy.el:") | 552 | (message "To convert XXX.tit and YYY.tit into xxx.el and yyy.el:") |
| 546 | (message " %% emacs -batch -l titdic-cnv -f batch-titdic-convert XXX.tit YYY.tit") | 553 | (message " %% emacs -batch -l titdic-cnv -f batch-tit-dic-convert XXX.tit YYY.tit") |
| 547 | (message "To convert XXX.tit into DIR/xxx.el:") | 554 | (message "To convert XXX.tit into DIR/xxx.el:") |
| 548 | (message " %% emacs -batch -l titdic-cnv -f batch-titdic-convert -dir DIR XXX.tit")) | 555 | (message " %% emacs -batch -l titdic-cnv -f batch-tit-dic-convert -dir DIR XXX.tit")) |
| 549 | (let (targetdir filename files file) | 556 | (let (targetdir filename files file) |
| 550 | (if (string= (car command-line-args-left) "-dir") | 557 | (if (string= (car command-line-args-left) "-dir") |
| 551 | (progn | 558 | (progn |
| @@ -564,7 +571,7 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"." | |||
| 564 | (when (or force | 571 | (when (or force |
| 565 | (file-newer-than-file-p | 572 | (file-newer-than-file-p |
| 566 | file (tit-make-quail-package-file-name file targetdir))) | 573 | file (tit-make-quail-package-file-name file targetdir))) |
| 567 | (titdic-convert file targetdir)) | 574 | (tit-dic-convert file targetdir)) |
| 568 | (setq files (cdr files))) | 575 | (setq files (cdr files))) |
| 569 | (setq command-line-args-left (cdr command-line-args-left))))) | 576 | (setq command-line-args-left (cdr command-line-args-left))))) |
| 570 | (kill-emacs 0)) | 577 | (kill-emacs 0)) |
| @@ -583,10 +590,11 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"." | |||
| 583 | ;; COPYRIGHT-NOTICE ;; Copyright notice of the source dictionary. | 590 | ;; COPYRIGHT-NOTICE ;; Copyright notice of the source dictionary. |
| 584 | ;; ) | 591 | ;; ) |
| 585 | 592 | ||
| 586 | (defvar quail-misc-package-ext-info | 593 | (define-obsolete-variable-alias 'quail-misc-package-ext-info 'tit-quail-misc-package-ext-info "30.1") |
| 594 | (defvar tit-quail-misc-package-ext-info | ||
| 587 | '(("chinese-b5-tsangchi" "倉B" | 595 | '(("chinese-b5-tsangchi" "倉B" |
| 588 | "cangjie-table.b5" big5 "tsang-b5.el" | 596 | "cangjie-table.b5" big5 "tsang-b5.el" |
| 589 | tsang-b5-converter | 597 | tit--tsang-b5-converter |
| 590 | "\ | 598 | "\ |
| 591 | ;; # Copyright 2001 Christian Wittern <wittern@iis.sinica.edu.tw> | 599 | ;; # Copyright 2001 Christian Wittern <wittern@iis.sinica.edu.tw> |
| 592 | ;; # | 600 | ;; # |
| @@ -596,7 +604,7 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"." | |||
| 596 | 604 | ||
| 597 | ("chinese-b5-quick" "簡B" | 605 | ("chinese-b5-quick" "簡B" |
| 598 | "cangjie-table.b5" big5 "quick-b5.el" | 606 | "cangjie-table.b5" big5 "quick-b5.el" |
| 599 | quick-b5-converter | 607 | tit--quick-b5-converter |
| 600 | "\ | 608 | "\ |
| 601 | ;; # Copyright 2001 Christian Wittern <wittern@iis.sinica.edu.tw> | 609 | ;; # Copyright 2001 Christian Wittern <wittern@iis.sinica.edu.tw> |
| 602 | ;; # | 610 | ;; # |
| @@ -606,7 +614,7 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"." | |||
| 606 | 614 | ||
| 607 | ("chinese-cns-tsangchi" "倉C" | 615 | ("chinese-cns-tsangchi" "倉C" |
| 608 | "cangjie-table.cns" iso-2022-cn-ext "tsang-cns.el" | 616 | "cangjie-table.cns" iso-2022-cn-ext "tsang-cns.el" |
| 609 | tsang-cns-converter | 617 | tit--tsang-cns-converter |
| 610 | "\ | 618 | "\ |
| 611 | ;; # Copyright 2001 Christian Wittern <wittern@iis.sinica.edu.tw> | 619 | ;; # Copyright 2001 Christian Wittern <wittern@iis.sinica.edu.tw> |
| 612 | ;; # | 620 | ;; # |
| @@ -616,7 +624,7 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"." | |||
| 616 | 624 | ||
| 617 | ("chinese-cns-quick" "簡C" | 625 | ("chinese-cns-quick" "簡C" |
| 618 | "cangjie-table.cns" iso-2022-cn-ext "quick-cns.el" | 626 | "cangjie-table.cns" iso-2022-cn-ext "quick-cns.el" |
| 619 | quick-cns-converter | 627 | tit--quick-cns-converter |
| 620 | "\ | 628 | "\ |
| 621 | ;; # Copyright 2001 Christian Wittern <wittern@iis.sinica.edu.tw> | 629 | ;; # Copyright 2001 Christian Wittern <wittern@iis.sinica.edu.tw> |
| 622 | ;; # | 630 | ;; # |
| @@ -626,7 +634,7 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"." | |||
| 626 | 634 | ||
| 627 | ("chinese-py" "拼G" | 635 | ("chinese-py" "拼G" |
| 628 | "pinyin.map" cn-gb-2312 "PY.el" | 636 | "pinyin.map" cn-gb-2312 "PY.el" |
| 629 | py-converter | 637 | tit--py-converter |
| 630 | "\ | 638 | "\ |
| 631 | ;; \"pinyin.map\" is included in a free package called CCE. It is | 639 | ;; \"pinyin.map\" is included in a free package called CCE. It is |
| 632 | ;; available at: [link needs updating -- SK 2021-09-27] | 640 | ;; available at: [link needs updating -- SK 2021-09-27] |
| @@ -654,7 +662,7 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"." | |||
| 654 | 662 | ||
| 655 | ("chinese-ziranma" "自然" | 663 | ("chinese-ziranma" "自然" |
| 656 | "ziranma.cin" cn-gb-2312 "ZIRANMA.el" | 664 | "ziranma.cin" cn-gb-2312 "ZIRANMA.el" |
| 657 | ziranma-converter | 665 | tit--ziranma-converter |
| 658 | "\ | 666 | "\ |
| 659 | ;; \"ziranma.cin\" is included in a free package called CCE. It is | 667 | ;; \"ziranma.cin\" is included in a free package called CCE. It is |
| 660 | ;; available at: [link needs updating -- SK 2021-09-27] | 668 | ;; available at: [link needs updating -- SK 2021-09-27] |
| @@ -682,7 +690,7 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"." | |||
| 682 | 690 | ||
| 683 | ("chinese-ctlau" "刘粤" | 691 | ("chinese-ctlau" "刘粤" |
| 684 | "CTLau.html" cn-gb-2312 "CTLau.el" | 692 | "CTLau.html" cn-gb-2312 "CTLau.el" |
| 685 | ctlau-gb-converter | 693 | tit--ctlau-gb-converter |
| 686 | "\ | 694 | "\ |
| 687 | ;; \"CTLau.html\" is available at: | 695 | ;; \"CTLau.html\" is available at: |
| 688 | ;; | 696 | ;; |
| @@ -707,7 +715,7 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"." | |||
| 707 | 715 | ||
| 708 | ("chinese-ctlaub" "劉粵" | 716 | ("chinese-ctlaub" "劉粵" |
| 709 | "CTLau-b5.html" big5 "CTLau-b5.el" | 717 | "CTLau-b5.html" big5 "CTLau-b5.el" |
| 710 | ctlau-b5-converter | 718 | tit--ctlau-b5-converter |
| 711 | "\ | 719 | "\ |
| 712 | ;; \"CTLau-b5.html\" is available at: | 720 | ;; \"CTLau-b5.html\" is available at: |
| 713 | ;; | 721 | ;; |
| @@ -740,7 +748,8 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"." | |||
| 740 | ;; input method is for inputting Big5 characters. Otherwise the input | 748 | ;; input method is for inputting Big5 characters. Otherwise the input |
| 741 | ;; method is for inputting CNS characters. | 749 | ;; method is for inputting CNS characters. |
| 742 | 750 | ||
| 743 | (defun tsang-quick-converter (dicbuf tsang-p big5-p) | 751 | (define-obsolete-function-alias 'tsang-quick-converter #'tit--tsang-quick-converter "30.1") |
| 752 | (defun tit--tsang-quick-converter (dicbuf tsang-p big5-p) | ||
| 744 | (let ((fulltitle (if tsang-p "倉頡" "簡易")) | 753 | (let ((fulltitle (if tsang-p "倉頡" "簡易")) |
| 745 | dic) | 754 | dic) |
| 746 | (goto-char (point-max)) | 755 | (goto-char (point-max)) |
| @@ -822,23 +831,28 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"." | |||
| 822 | (if big5-p (nth 1 elt) (nth 2 elt)))))) | 831 | (if big5-p (nth 1 elt) (nth 2 elt)))))) |
| 823 | (insert ")\n"))) | 832 | (insert ")\n"))) |
| 824 | 833 | ||
| 825 | (defun tsang-b5-converter (dicbuf) | 834 | (define-obsolete-function-alias 'tsang-b5-converter #'tit--tsang-b5-converter "30.1") |
| 826 | (tsang-quick-converter dicbuf t t)) | 835 | (defun tit--tsang-b5-converter (dicbuf) |
| 836 | (tit--tsang-quick-converter dicbuf t t)) | ||
| 827 | 837 | ||
| 828 | (defun quick-b5-converter (dicbuf) | 838 | (define-obsolete-function-alias 'quick-b5-converter #'tit--quick-b5-converter "30.1") |
| 829 | (tsang-quick-converter dicbuf nil t)) | 839 | (defun tit--quick-b5-converter (dicbuf) |
| 840 | (tit--tsang-quick-converter dicbuf nil t)) | ||
| 830 | 841 | ||
| 831 | (defun tsang-cns-converter (dicbuf) | 842 | (define-obsolete-function-alias 'tsang-cns-converter #'tit--tsang-cns-converter "30.1") |
| 832 | (tsang-quick-converter dicbuf t nil)) | 843 | (defun tit--tsang-cns-converter (dicbuf) |
| 844 | (tit--tsang-quick-converter dicbuf t nil)) | ||
| 833 | 845 | ||
| 834 | (defun quick-cns-converter (dicbuf) | 846 | (define-obsolete-function-alias 'quick-cns-converter #'tit--quick-cns-converter "30.1") |
| 835 | (tsang-quick-converter dicbuf nil nil)) | 847 | (defun tit--quick-cns-converter (dicbuf) |
| 848 | (tit--tsang-quick-converter dicbuf nil nil)) | ||
| 836 | 849 | ||
| 837 | ;; Generate a code of a Quail package in the current buffer from | 850 | ;; Generate a code of a Quail package in the current buffer from |
| 838 | ;; Pinyin dictionary in the buffer DICBUF. The input method name of | 851 | ;; Pinyin dictionary in the buffer DICBUF. The input method name of |
| 839 | ;; the Quail package is NAME, and the title string is TITLE. | 852 | ;; the Quail package is NAME, and the title string is TITLE. |
| 840 | 853 | ||
| 841 | (defun py-converter (dicbuf) | 854 | (define-obsolete-function-alias 'py-converter #'tit--py-converter "30.1") |
| 855 | (defun tit--py-converter (dicbuf) | ||
| 842 | (goto-char (point-max)) | 856 | (goto-char (point-max)) |
| 843 | (insert (format "%S\n" "汉字输入∷拼音∷ | 857 | (insert (format "%S\n" "汉字输入∷拼音∷ |
| 844 | 858 | ||
| @@ -913,7 +927,8 @@ method `chinese-tonepy' with which you must specify tones by digits | |||
| 913 | ;; Ziranma dictionary in the buffer DICBUF. The input method name of | 927 | ;; Ziranma dictionary in the buffer DICBUF. The input method name of |
| 914 | ;; the Quail package is NAME, and the title string is TITLE. | 928 | ;; the Quail package is NAME, and the title string is TITLE. |
| 915 | 929 | ||
| 916 | (defun ziranma-converter (dicbuf) | 930 | (define-obsolete-function-alias 'ziranma-converter #'tit--ziranma-converter "30.1") |
| 931 | (defun tit--ziranma-converter (dicbuf) | ||
| 917 | (let (dic) | 932 | (let (dic) |
| 918 | (with-current-buffer dicbuf | 933 | (with-current-buffer dicbuf |
| 919 | (goto-char (point-min)) | 934 | (goto-char (point-min)) |
| @@ -1022,7 +1037,8 @@ To input symbols and punctuation, type `/' followed by one of `a' to | |||
| 1022 | ;; method name of the Quail package is NAME, and the title string is | 1037 | ;; method name of the Quail package is NAME, and the title string is |
| 1023 | ;; TITLE. DESCRIPTION is the string shown by describe-input-method. | 1038 | ;; TITLE. DESCRIPTION is the string shown by describe-input-method. |
| 1024 | 1039 | ||
| 1025 | (defun ctlau-converter (dicbuf description) | 1040 | (define-obsolete-function-alias 'ctlau-converter #'tit--ctlau-converter "30.1") |
| 1041 | (defun tit--ctlau-converter (dicbuf description) | ||
| 1026 | (goto-char (point-max)) | 1042 | (goto-char (point-max)) |
| 1027 | (insert (format "%S\n" description)) | 1043 | (insert (format "%S\n" description)) |
| 1028 | (insert " '((\"\C-?\" . quail-delete-last-char) | 1044 | (insert " '((\"\C-?\" . quail-delete-last-char) |
| @@ -1071,8 +1087,9 @@ To input symbols and punctuation, type `/' followed by one of `a' to | |||
| 1071 | (forward-line 1))) | 1087 | (forward-line 1))) |
| 1072 | (insert ")\n")) | 1088 | (insert ")\n")) |
| 1073 | 1089 | ||
| 1074 | (defun ctlau-gb-converter (dicbuf) | 1090 | (define-obsolete-function-alias 'ctlau-gb-converter #'tit--ctlau-gb-converter "30.1") |
| 1075 | (ctlau-converter dicbuf | 1091 | (defun tit--ctlau-gb-converter (dicbuf) |
| 1092 | (tit--ctlau-converter dicbuf | ||
| 1076 | "汉字输入∷刘锡祥式粤音∷ | 1093 | "汉字输入∷刘锡祥式粤音∷ |
| 1077 | 1094 | ||
| 1078 | 刘锡祥式粤语注音方案 | 1095 | 刘锡祥式粤语注音方案 |
| @@ -1085,8 +1102,9 @@ To input symbols and punctuation, type `/' followed by one of `a' to | |||
| 1085 | Some infrequent GB characters are accessed by typing \\, followed by | 1102 | Some infrequent GB characters are accessed by typing \\, followed by |
| 1086 | the Cantonese romanization of the respective radical (部首).")) | 1103 | the Cantonese romanization of the respective radical (部首).")) |
| 1087 | 1104 | ||
| 1088 | (defun ctlau-b5-converter (dicbuf) | 1105 | (define-obsolete-function-alias 'ctlau-b5-converter #'tit--ctlau-b5-converter "30.1") |
| 1089 | (ctlau-converter dicbuf | 1106 | (defun tit--ctlau-b5-converter (dicbuf) |
| 1107 | (tit--ctlau-converter dicbuf | ||
| 1090 | "漢字輸入:劉錫祥式粵音: | 1108 | "漢字輸入:劉錫祥式粵音: |
| 1091 | 1109 | ||
| 1092 | 劉錫祥式粵語注音方案 | 1110 | 劉錫祥式粵語注音方案 |
| @@ -1101,14 +1119,15 @@ To input symbols and punctuation, type `/' followed by one of `a' to | |||
| 1101 | 1119 | ||
| 1102 | (declare-function dos-8+3-filename "dos-fns.el" (filename)) | 1120 | (declare-function dos-8+3-filename "dos-fns.el" (filename)) |
| 1103 | 1121 | ||
| 1104 | (defun miscdic-convert (filename &optional dirname) | 1122 | (define-obsolete-function-alias 'miscdic-convert #'tit-miscdic-convert "30.1") |
| 1123 | (defun tit-miscdic-convert (filename &optional dirname) | ||
| 1105 | "Convert a dictionary file FILENAME into a Quail package. | 1124 | "Convert a dictionary file FILENAME into a Quail package. |
| 1106 | Optional argument DIRNAME if specified is the directory name under which | 1125 | Optional argument DIRNAME if specified is the directory name under which |
| 1107 | the generated Quail package is saved." | 1126 | the generated Quail package is saved." |
| 1108 | (interactive "FInput method dictionary file: ") | 1127 | (interactive "FInput method dictionary file: ") |
| 1109 | (or (file-readable-p filename) | 1128 | (or (file-readable-p filename) |
| 1110 | (error "%s does not exist" filename)) | 1129 | (error "%s does not exist" filename)) |
| 1111 | (let ((tail quail-misc-package-ext-info) | 1130 | (let ((tail tit-quail-misc-package-ext-info) |
| 1112 | coding-system-for-write | 1131 | coding-system-for-write |
| 1113 | slot | 1132 | slot |
| 1114 | name title dicfile coding quailfile converter copyright) | 1133 | name title dicfile coding quailfile converter copyright) |
| @@ -1137,7 +1156,7 @@ the generated Quail package is saved." | |||
| 1137 | ;; Explicitly set eol format to `unix'. | 1156 | ;; Explicitly set eol format to `unix'. |
| 1138 | (setq coding-system-for-write 'utf-8-unix) | 1157 | (setq coding-system-for-write 'utf-8-unix) |
| 1139 | (with-temp-file (expand-file-name quailfile dirname) | 1158 | (with-temp-file (expand-file-name quailfile dirname) |
| 1140 | (generate-lisp-file-heading quailfile 'miscdic-convert) | 1159 | (generate-lisp-file-heading quailfile 'tit-miscdic-convert) |
| 1141 | (insert (format-message ";; Quail package `%s'\n" name)) | 1160 | (insert (format-message ";; Quail package `%s'\n" name)) |
| 1142 | (insert ";; Source dictionary file: " dicfile "\n") | 1161 | (insert ";; Source dictionary file: " dicfile "\n") |
| 1143 | (insert ";; Copyright notice of the source file\n") | 1162 | (insert ";; Copyright notice of the source file\n") |
| @@ -1164,15 +1183,17 @@ the generated Quail package is saved." | |||
| 1164 | quailfile :inhibit-provide t :compile t :coding nil))) | 1183 | quailfile :inhibit-provide t :compile t :coding nil))) |
| 1165 | (setq tail (cdr tail))))) | 1184 | (setq tail (cdr tail))))) |
| 1166 | 1185 | ||
| 1167 | (defun batch-miscdic-convert () | 1186 | ;; Used in `Makefile.in'. |
| 1168 | "Run `miscdic-convert' on the files remaining on the command line. | 1187 | (define-obsolete-function-alias 'batch-miscdic-convert #'batch-tit-miscdic-convert "30.1") |
| 1188 | (defun batch-tit-miscdic-convert () | ||
| 1189 | "Run `tit-miscdic-convert' on the files remaining on the command line. | ||
| 1169 | Use this from the command line, with `-batch'; | 1190 | Use this from the command line, with `-batch'; |
| 1170 | it won't work in an interactive Emacs. | 1191 | it won't work in an interactive Emacs. |
| 1171 | If there's an argument \"-dir\", the next argument specifies a directory | 1192 | If there's an argument \"-dir\", the next argument specifies a directory |
| 1172 | to store generated Quail packages." | 1193 | to store generated Quail packages." |
| 1173 | (defvar command-line-args-left) ; Avoid compiler warning. | 1194 | (defvar command-line-args-left) ; Avoid compiler warning. |
| 1174 | (if (not noninteractive) | 1195 | (if (not noninteractive) |
| 1175 | (error "`batch-miscdic-convert' should be used only with -batch")) | 1196 | (error "`batch-tit-miscdic-convert' should be used only with -batch")) |
| 1176 | (let ((dir default-directory) | 1197 | (let ((dir default-directory) |
| 1177 | filename) | 1198 | filename) |
| 1178 | (while command-line-args-left | 1199 | (while command-line-args-left |
| @@ -1186,11 +1207,13 @@ to store generated Quail packages." | |||
| 1186 | (if (file-directory-p filename) | 1207 | (if (file-directory-p filename) |
| 1187 | (dolist (file (directory-files filename t nil t)) | 1208 | (dolist (file (directory-files filename t nil t)) |
| 1188 | (or (file-directory-p file) | 1209 | (or (file-directory-p file) |
| 1189 | (miscdic-convert file dir))) | 1210 | (tit-miscdic-convert file dir))) |
| 1190 | (miscdic-convert filename dir)))) | 1211 | (tit-miscdic-convert filename dir)))) |
| 1191 | (kill-emacs 0)) | 1212 | (kill-emacs 0)) |
| 1192 | 1213 | ||
| 1193 | (defun pinyin-convert () | 1214 | ;; Used in `Makefile.in'. |
| 1215 | (define-obsolete-function-alias 'pinyin-convert #'tit-pinyin-convert "30.1") | ||
| 1216 | (defun tit-pinyin-convert () | ||
| 1194 | "Convert text file pinyin.map into an elisp library. | 1217 | "Convert text file pinyin.map into an elisp library. |
| 1195 | The library is named pinyin.el, and contains the constant | 1218 | The library is named pinyin.el, and contains the constant |
| 1196 | `pinyin-character-map'." | 1219 | `pinyin-character-map'." |