[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/international/titdic-cnv.el
From: |
Dave Love |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/international/titdic-cnv.el |
Date: |
Wed, 24 Jul 2002 18:18:11 -0400 |
Index: emacs/lisp/international/titdic-cnv.el
diff -c emacs/lisp/international/titdic-cnv.el:1.32
emacs/lisp/international/titdic-cnv.el:1.33
*** emacs/lisp/international/titdic-cnv.el:1.32 Mon Apr 8 18:50:57 2002
--- emacs/lisp/international/titdic-cnv.el Wed Jul 24 18:18:11 2002
***************
*** 1,4 ****
! ;;; titdic-cnv.el --- convert cxterm dictionary (TIT format) to Quail package
;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
;; Licensed to the Free Software Foundation.
--- 1,4 ----
! ;;; titdic-cnv.el --- convert cxterm dictionary (TIT format) to Quail package
-*- coding:iso-2022-7bit; -*-
;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
;; Licensed to the Free Software Foundation.
***************
*** 73,79 ****
;; dictionary. The extra docstring in this alist is to add more
;; information.
;; The command describe-input-method shows the automatically generated
! ;; docstring, then an extra docstrings while replacing the form \<VAR>
;; by the value of variable VAR. For instance, the form
;; \<quail-translation-docstring> is replaced by a description about
;; how to select a translation from a list of candidates.
--- 73,79 ----
;; dictionary. The extra docstring in this alist is to add more
;; information.
;; The command describe-input-method shows the automatically generated
! ;; docstring, then an extra docstring while replacing the form \<VAR>
;; by the value of variable VAR. For instance, the form
;; \<quail-translation-docstring> is replaced by a description about
;; how to select a translation from a list of candidates.
***************
*** 84,90 ****
("chinese-ccdospy" "$AKuF4(B"
"Pinyin base input method for Chinese charset GB2312 \(`chinese-gb2312').
! Pinyin is the standared roman transliteration method for Chinese.
For the detail of Pinyin system, see the documentation of the input
method `chinese-py'.
--- 84,90 ----
("chinese-ccdospy" "$AKuF4(B"
"Pinyin base input method for Chinese charset GB2312 \(`chinese-gb2312').
! Pinyin is the standard Roman transliteration method for Chinese.
For the detail of Pinyin system, see the documentation of the input
method `chinese-py'.
***************
*** 92,98 ****
difference is that you type a single key for these Pinyin spelling.
Pinyin: zh en eng ang ch an ao ai ong sh ing yu($A(9(B)
keyseq: a f g h i j k l s u y v
! For expample:
Chinese: $A0!(B $A9{(B $AVP(B $AND(B $A9b(B
$ASq(B $AH+(B
Pinyin: a guo zhong wen guang yu quan
Keyseq: a1 guo4 as1 wf4 guh1 yu..6 qvj6
--- 92,98 ----
difference is that you type a single key for these Pinyin spelling.
Pinyin: zh en eng ang ch an ao ai ong sh ing yu($A(9(B)
keyseq: a f g h i j k l s u y v
! For example:
Chinese: $A0!(B $A9{(B $AVP(B $AND(B $A9b(B
$ASq(B $AH+(B
Pinyin: a guo zhong wen guang yu quan
Keyseq: a1 guo4 as1 wf4 guh1 yu..6 qvj6
***************
*** 267,274 ****
(tit-keyprompt nil))
(princ ";; Quail package `")
! (princ package)
! (princ "' generated by the command `titdic-convert'\n;;\tDate: ")
(princ (current-time-string))
(princ "\n;;\tOriginal TIT dictionary file: ")
(princ (file-name-nondirectory filename))
--- 267,274 ----
(tit-keyprompt nil))
(princ ";; Quail package `")
! (princ package) (princ "' -*- coding:iso-2022-7bit; -*-\n")
! (princ ";; Generated by the command `titdic-convert'\n;;\tDate: ")
(princ (current-time-string))
(princ "\n;;\tOriginal TIT dictionary file: ")
(princ (file-name-nondirectory filename))
***************
*** 465,514 ****
Optional argument DIRNAME if specified is the directory name under which
the generated Quail package is saved."
(interactive "FTIT dictionary file: ")
! (with-temp-file (tit-make-quail-package-file-name filename dirname)
! (set-buffer-file-coding-system 'iso-2022-7bit)
! (let ((standard-output (current-buffer)))
! (with-temp-buffer
! (let ((coding-system-for-read 'no-conversion))
! (insert-file-contents (expand-file-name filename)))
! (set-buffer-multibyte t)
! ;; Decode the buffer contents from the encoding specified by a
! ;; value of the key "ENCODE:".
! (if (not (search-forward "\nBEGIN" nil t))
! (error "TIT dictionary doesn't have body part"))
! (let ((limit (point))
! coding-system slot)
! (goto-char (point-min))
! (if (re-search-forward "^ENCODE:[ \t]*" limit t)
! (progn
! (goto-char (match-end 0))
! (setq tit-encode (tit-read-key-value)))
! (setq tit-encode tit-default-encode))
! (setq slot (assoc tit-encode tit-encode-list))
! (if (not slot)
! (error "Invalid ENCODE: value in TIT dictionary"))
! (setq coding-system (nth 1 slot))
! (message "Decoding with coding system %s..." coding-system)
(goto-char (point-min))
! (decode-coding-region (point-min) (point-max) coding-system))
! ;; Set point the starting position of the body part.
! (goto-char (point-min))
! (if (not (search-forward "\nBEGIN" nil t))
! (error "TIT dictionary can't be decoded correctly"))
!
! ;; Process the header part.
! (forward-line 1)
! (narrow-to-region (point-min) (point))
! (tit-process-header filename)
! (widen)
!
! ;; Process the body part. For speed, we turn off multibyte facility.
! (with-current-buffer standard-output
! (set-buffer-multibyte nil))
! (set-buffer-multibyte nil)
! (tit-process-body)))))
;;;###autoload
(defun batch-titdic-convert (&optional force)
--- 465,515 ----
Optional argument DIRNAME if specified is the directory name under which
the generated Quail package is saved."
(interactive "FTIT dictionary file: ")
! (let ((coding-system-for-write 'iso-2022-7bit))
! (with-temp-file (tit-make-quail-package-file-name filename dirname)
! (set-buffer-file-coding-system 'iso-2022-7bit)
! (let ((standard-output (current-buffer)))
! (with-temp-buffer
! (set-buffer-multibyte nil)
! (let ((coding-system-for-read 'no-conversion))
! (insert-file-contents (expand-file-name filename)))
! ;; Decode the buffer contents from the encoding specified by a
! ;; value of the key "ENCODE:".
! (if (not (search-forward "\nBEGIN" nil t))
! (error "TIT dictionary doesn't have body part"))
! (let ((limit (point))
! coding-system slot)
! (goto-char (point-min))
! (if (re-search-forward "^ENCODE:[ \t]*" limit t)
! (progn
! (goto-char (match-end 0))
! (setq tit-encode (tit-read-key-value)))
! (setq tit-encode tit-default-encode))
! (setq slot (assoc tit-encode tit-encode-list))
! (if (not slot)
! (error "Invalid ENCODE: value in TIT dictionary"))
! (setq coding-system (nth 1 slot))
! (message "Decoding with coding system %s..." coding-system)
! (goto-char (point-min))
! (decode-coding-region (point-min) (point-max) coding-system))
!
! ;; Set point the starting position of the body part.
(goto-char (point-min))
! (if (not (search-forward "\nBEGIN" nil t))
! (error "TIT dictionary can't be decoded correctly"))
! ;; Process the header part.
! (forward-line 1)
! (narrow-to-region (point-min) (point))
! (tit-process-header filename)
! (widen)
!
! ;; Process the body part. For speed, we turn off multibyte facility.
! (with-current-buffer standard-output
! (set-buffer-multibyte nil))
! (set-buffer-multibyte nil)
! (tit-process-body))))))
;;;###autoload
(defun batch-titdic-convert (&optional force)
- [Emacs-diffs] Changes to emacs/lisp/international/titdic-cnv.el,
Dave Love <=