diff options
author | Kenichi Handa <handa@m17n.org> | 1997-07-15 08:24:47 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 1997-07-15 08:24:47 +0000 |
commit | 3dd9cdd20f00a73f27f96549d513ba54e7afa80d (patch) | |
tree | a8ebdd6a456610fb5d006924a43efad9d860b55f /lisp/international/titdic-cnv.el | |
parent | da0e9c568cbc18c8b47b78e39e11631fe8c939b9 (diff) | |
download | emacs-3dd9cdd20f00a73f27f96549d513ba54e7afa80d.tar.gz |
(tit-process-body): Ignore vacant entries.
Diffstat (limited to 'lisp/international/titdic-cnv.el')
-rw-r--r-- | lisp/international/titdic-cnv.el | 44 |
1 files changed, 27 insertions, 17 deletions
diff --git a/lisp/international/titdic-cnv.el b/lisp/international/titdic-cnv.el index 6c60d2cbdca..abf3d0ef070 100644 --- a/lisp/international/titdic-cnv.el +++ b/lisp/international/titdic-cnv.el @@ -272,7 +272,9 @@ (insert "(quail-define-rules\n") (while (null (eobp)) (if (or (= (following-char) ?#) (= (following-char) ?\n)) - (insert ";; ") + (progn + (insert ";; ") + (forward-line 1)) (insert "(\"") (setq pos (point)) (skip-chars-forward "^ \t") @@ -303,24 +305,32 @@ (delete-region (match-beginning 1) (match-end 1))) )) - ;; Modify the current line to meet the syntax of Quail package. (goto-char pos) - (if tit-phrase + (if (eolp) + ;; This entry contains no translations. Let's ignore it. (progn - ;; PHRASE1 PHRASE2 ... => ["PHRASE1" "PHRASE2" ...] - (insert "[\"") - (skip-chars-forward "^ \t\n") - (while (not (eolp)) - (insert "\"") - (forward-char 1) - (insert "\"") - (skip-chars-forward "^ \t\n")) - (insert "\"])")) - ;; TRANSLATIONS => "TRANSLATIONS" - (insert "\"") - (end-of-line) - (insert "\")"))) - (forward-line 1)) + (beginning-of-line) + (setq pos (point)) + (forward-line 1) + (delete-region pos (point))) + + ;; Modify the current line to meet the syntax of Quail package. + (if tit-phrase + (progn + ;; PHRASE1 PHRASE2 ... => ["PHRASE1" "PHRASE2" ...] + (insert "[\"") + (skip-chars-forward "^ \t\n") + (while (not (eolp)) + (insert "\"") + (forward-char 1) + (insert "\"") + (skip-chars-forward "^ \t\n")) + (insert "\"])")) + ;; TRANSLATIONS => "TRANSLATIONS" + (insert "\"") + (end-of-line) + (insert "\")")) + (forward-line 1)))) (insert ")\n"))) ;;;###autoload |