;;; titdic-cnv.el --- convert cxterm dictionary (TIT format) to Quail package -*- coding:iso-2022-7bit; -*-
-;; Copyright (C) 1997-1998, 2000-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2000-2016 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
'(("chinese-4corner" "\e$(0(?-F\e(B")
("chinese-array30" "\e$(0#R#O\e(B")
("chinese-ccdospy" "\e$AKuF4\e(B"
- "Pinyin base input method for Chinese charset GB2312 \(`chinese-gb2312').
+ "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
(princ ";; Quail package `")
(princ package)
- (princ (format "' -*- coding:%s -*-\n" coding-system-for-write))
- (princ ";; Generated by the command `titdic-convert'\n;;\tDate: ")
- (princ (current-time-string))
- (princ "\n;;\tOriginal TIT dictionary file: ")
+ (princ "\n")
+ (princ (substitute-command-keys
+ ";; Generated by the command `titdic-convert'\n"))
+ (princ ";;\tOriginal TIT dictionary file: ")
(princ (file-name-nondirectory filename))
- (princ "\n\n;;; Comment:\n\n")
- (princ ";; Byte-compile this file again after any modification.\n\n")
- (princ ";;; Start of the header of original TIT dictionary.\n\n")
+ (princ "\n\n")
(while (not (eobp))
(let ((ch (following-char))
(widen)
;; Process the body part
- (tit-process-body))))))
+ (tit-process-body)
+
+ (princ ";; Local Variables:\n")
+ (princ ";; version-control: never\n")
+ (princ ";; no-update-autoloads: t\n")
+ (princ (format ";; coding: %s\n" coding-system-for-write))
+ (princ ";; End:\n"))))))
;;;###autoload
(defun batch-titdic-convert (&optional force)
(message "Converting %s to quail-package..." file)
(titdic-convert file targetdir))
(setq files (cdr files)))
- (setq command-line-args-left (cdr command-line-args-left)))
- (message "Byte-compile the created files by:")
- (message " %% emacs -batch -f batch-byte-compile XXX.el")))
+ (setq command-line-args-left (cdr command-line-args-left)))))
(kill-emacs 0))
\f
(setq coding-system-for-write
(coding-system-change-eol-conversion coding 'unix))
(with-temp-file (expand-file-name quailfile dirname)
- (insert (format ";; Quail package `%s' -*- coding:%s -*-\n"
- name coding))
- (insert ";; Generated by the command `miscdic-convert'\n")
- (insert ";; Date: " (current-time-string) "\n")
+ (insert (format-message ";; Quail package `%s'\n" name))
+ (insert (format-message
+ ";; Generated by the command `miscdic-convert'\n"))
(insert ";; Source dictionary file: " dicfile "\n")
(insert ";; Copyright notice of the source file\n")
(insert ";;------------------------------------------------------\n")
(coding-system-change-eol-conversion coding 'unix))
(dicbuf (find-file-noselect filename)))
(funcall converter dicbuf name title)
- (kill-buffer dicbuf)))
+ (kill-buffer dicbuf))
+ (insert ";; Local Variables:\n"
+ ";; version-control: never\n"
+ ";; no-update-autoloads: t\n"
+ (format ";; coding: %s\n" coding)
+ ";; End:\n\n"
+ ";;; " quailfile " ends here\n"))
(message "Converting %s to %s...done" dicfile quailfile))
(setq tail (cdr tail)))))
(miscdic-convert filename dir))))
(kill-emacs 0))
+;; Prevent "Local Variables" above confusing Emacs.
+\f
+
;;; titdic-cnv.el ends here