]> code.delx.au - gnu-emacs/blobdiff - lisp/international/ja-dic-cnv.el
Cosmetic change to kinsoku-eol. (tiny change)
[gnu-emacs] / lisp / international / ja-dic-cnv.el
index 13b0ac8b6ad3e005c04423081b524aa3b2b5e6fb..cc2d1262b5cf1b2bbc20fa93e563a5f41e3cf19d 100644 (file)
@@ -1,5 +1,7 @@
 ;;; ja-dic-cnv.el --- convert a Japanese dictionary (SKK-JISYO.L) to Emacs Lisp
 
+;; Copyright (C) 2001-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)
                (cons (cons kana candidates) skkdic-okuri-nasi-entries)
                skkdic-okuri-nasi-entries-count
                (1+ skkdic-okuri-nasi-entries-count))
-         (setq ratio (floor (/ (* (point) 100.0) (point-max))))
-         (if (/= ratio prev-ratio)
+         (setq ratio (floor (* (point) 100.0) (point-max)))
+         (if (/= (/ prev-ratio 10) (/ ratio 10))
              (progn
-               (message "collected %2d%% %s ..." ratio kana)
+               (message "collected %2d%% ..." ratio)
                (setq prev-ratio ratio)))
          (while candidates
            (let ((entry (lookup-nested-alist (car candidates)
       (while l
        (let ((kana (car (car l)))
              (candidates (cdr (car l))))
-         (setq ratio (/ (* count 1000) skkdic-okuri-nasi-entries-count)
+         (setq ratio (floor (* count 100.0) skkdic-okuri-nasi-entries-count)
                count (1+ count))
-         (if (/= prev-ratio (/ ratio 10))
+         (if (/= (/ prev-ratio 10) (/ ratio 10))
              (progn
-               (message "processed %2d%% %s ..." (/ ratio 10) kana)
-               (setq prev-ratio (/ ratio 10))))
+               (message "processed %2d%% ..." ratio)
+               (setq prev-ratio ratio)))
          (if (setq candidates
                    (skkdic-reduced-candidates skkbuf kana candidates))
              (progn
@@ -342,15 +344,12 @@ The name of generated file is specified by the variable `ja-dic-filename'."
     (with-current-buffer buf
       (erase-buffer)
       (buffer-disable-undo)
-      (insert ";;; ja-dic.el --- dictionary for Japanese input method"
-             " -*-coding: utf-8; -*-\n"
+      (insert ";;; ja-dic.el --- dictionary for Japanese input method\n"
              ";;\tGenerated by the command `skkdic-convert'\n"
              ";;\tOriginal SKK dictionary file: "
              (file-relative-name (expand-file-name filename) dirname)
              "\n\n"
              ";; This file is part of GNU Emacs.\n\n"
-             ";;; Commentary:\n\n"
-             ";; Do byte-compile this file again after any modification.\n\n"
              ";;; Start of the header of the original SKK dictionary.\n\n")
       (set-buffer skkbuf)
       (goto-char 1)
@@ -398,7 +397,13 @@ The name of generated file is specified by the variable `ja-dic-filename'."
        ;; Postfix
        (with-current-buffer buf
          (goto-char (point-max))
-         (insert ";;\n(provide 'ja-dic)\n\n;;; ja-dic.el ends here\n")))
+         (insert ";;\n(provide 'ja-dic)\n\n"
+                 ";; Local Variables:\n"
+                 ";; version-control: never\n"
+                 ";; no-update-autoloads: t\n"
+                 ";; coding: utf-8\n"
+                 ";; End:\n\n"
+                 ";;; ja-dic.el ends here\n")))
 
       ;; Save the working buffer.
       (set-buffer buf)
@@ -433,12 +438,7 @@ To get complete usage, invoke:
            (setq targetdir (expand-file-name (car command-line-args-left)))
            (setq command-line-args-left (cdr command-line-args-left))))
       (setq filename (expand-file-name (car command-line-args-left)))
-      (message "Converting %s to %s ..." filename ja-dic-filename)
-      (message "It takes around 10 minutes even on Sun SS20.")
-      (skkdic-convert filename targetdir)
-      (message "Do byte-compile the created file by:")
-      (message "  %% emacs -batch -f batch-byte-compile %s" ja-dic-filename)
-      ))
+      (skkdic-convert filename targetdir)))
   (kill-emacs 0))