OPTION_DEFAULT_OFF([native-compilation],[compile with Emacs Lisp native compiler support])
OPTION_DEFAULT_OFF([cygwin32-native-compilation],[use native compilation on 32-bit Cygwin])
OPTION_DEFAULT_ON([xinput2],[don't use version 2 of the X Input Extension for input])
+OPTION_DEFAULT_OFF([small-ja-dic],[generate a small-sized Japanese dictionary])
AC_ARG_WITH([file-notification],[AS_HELP_STRING([--with-file-notification=LIB],
[use a file notification library (LIB one of: yes, inotify, kqueue, gfile, w32, no)])],
Which dumping strategy does Emacs use? ${with_dumping}
Does Emacs have native lisp compiler? ${HAVE_NATIVE_COMP}
Does Emacs use version 2 of the the X Input Extension? ${HAVE_XINPUT2}
+ Should Emacs use a small-sized Japanese dictionary? ${with_small_ja_dic}
"])
if test -n "${EMACSDATA}"; then
AC_SUBST(SUBDIR_MAKEFILES_IN)
+SMALL_JA_DIC=$with_small_ja_dic
+AC_SUBST(SMALL_JA_DIC)
+
dnl You might wonder (I did) why epaths.h is generated by running make,
dnl rather than just letting configure generate it from epaths.in.
dnl One reason is that the various paths are not fully expanded (see above);
EXEEXT = @EXEEXT@
+SMALL_JA_DIC = @SMALL_JA_DIC@
+JA_DIC_NO_REDUCTION_OPTION = --no-reduction
+ifeq ($(SMALL_JA_DIC), yes)
+ JA_DIC_NO_REDUCTION_OPTION =
+endif
+
-include ${top_builddir}/src/verbose.mk
# Prevent any settings in the user environment causing problems.
${leimdir}/ja-dic/ja-dic.el: $(srcdir)/SKK-DIC/SKK-JISYO.L
$(AM_V_GEN)$(RUN_EMACS) -batch -l ja-dic-cnv \
--eval "(setq max-specpdl-size 5000)" \
- -f batch-skkdic-convert -dir "$(leimdir)/ja-dic" "$<"
+ -f batch-skkdic-convert -dir "$(leimdir)/ja-dic" $(JA_DIC_NO_REDUCTION_OPTION) "$<"
${srcdir}/../lisp/language/pinyin.el: ${srcdir}/MISC-DIC/pinyin.map
$(AM_V_GEN)${RUN_EMACS} -l titdic-cnv -f pinyin-convert $< $@
(setq skkdic-okuri-nasi-entries-count (length skkdic-okuri-nasi-entries))
(progress-reporter-done progress))))
-(defun skkdic-convert-okuri-nasi (skkbuf buf)
+(defun skkdic-convert-okuri-nasi (skkbuf buf &optional no-reduction)
(with-current-buffer buf
(insert ";; Setting okuri-nasi entries.\n"
"(skkdic-set-okuri-nasi\n")
(setq count (1+ count))
(progress-reporter-update progress count)
(if (setq candidates
- (skkdic-reduced-candidates skkbuf kana candidates))
+ (if no-reduction
+ candidates
+ (skkdic-reduced-candidates skkbuf kana candidates)))
(progn
(insert "\"" kana)
(while candidates
(progress-reporter-done progress))
(insert ")\n\n")))
-(defun skkdic-convert (filename &optional dirname)
+(defun skkdic-convert (filename &optional dirname no-reduction)
"Generate Emacs Lisp file from Japanese dictionary file FILENAME.
The format of the dictionary file should be the same as SKK dictionaries.
-Saves the output as `ja-dic-filename', in directory DIRNAME (if specified)."
+Saves the output as `ja-dic-filename', in directory DIRNAME (if specified).
+When NO-REDUCTION is t, then not reduce dictionary vocabulary.
+"
(interactive "FSKK dictionary file: ")
(let* ((skkbuf (get-buffer-create " *skkdic-unannotated*"))
(buf (get-buffer-create "*skkdic-work*")))
(skkdic-collect-okuri-nasi)
;; Convert okuri-nasi general entries.
- (skkdic-convert-okuri-nasi skkbuf buf)
+ (skkdic-convert-okuri-nasi skkbuf buf no-reduction)
;; Postfix
(with-current-buffer buf
(message "To convert SKK-JISYO.L into skkdic.el:")
(message " %% emacs -batch -l ja-dic-cnv -f batch-skkdic-convert SKK-JISYO.L")
(message "To convert SKK-JISYO.L into DIR/ja-dic.el:")
- (message " %% emacs -batch -l ja-dic-cnv -f batch-skkdic-convert -dir DIR SKK-JISYO.L"))
- (let (targetdir filename)
+ (message " %% emacs -batch -l ja-dic-cnv -f batch-skkdic-convert -dir DIR SKK-JISYO.L")
+ (message "To convert SKK-JISYO.L into skkdic.el with not reduce dictionary vocabulary:")
+ (message " %% emacs -batch -l ja-dic-cnv -f batch-skkdic-convert --no-reduction SKK-JISYO.L"))
+ (let (targetdir filename no-reduction)
(if (string= (car command-line-args-left) "-dir")
(progn
(setq command-line-args-left (cdr command-line-args-left))
(setq targetdir (expand-file-name (car command-line-args-left)))
(setq command-line-args-left (cdr command-line-args-left))))
+ (if (string= (car command-line-args-left) "--no-reduction")
+ (progn
+ (setq no-reduction t)
+ (setq command-line-args-left (cdr command-line-args-left))))
(setq filename (expand-file-name (car command-line-args-left)))
- (skkdic-convert filename targetdir)))
+ (skkdic-convert filename targetdir no-reduction)))
(kill-emacs 0))