1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
(set-language-environment "Japanese")
(set-default-coding-systems 'euc-jp)
(defconst wl-ja-info "wl-ja.info")
(defconst wl-ja-texi "wl-ja.texi")
(defconst wl-en-info "wl.info")
(defconst wl-en-texi "wl.texi")
(defvar wl-info-lang '("ja" "en")
"The language of info file (\"ja\" or \"en\").")
(defvar wl-cs-local 'junet)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Texinfo stuff
(defun wl-texinfo-format-file (lang)
(let ((infofile (symbol-value (intern (format "wl-%s-info" lang))))
(texifile (symbol-value (intern (format "wl-%s-texi" lang)))))
(or (file-newer-than-file-p (expand-file-name infofile "doc")
(expand-file-name texifile "doc"))
(let (obuf beg)
;; Support old texinfmt.el
(require 'ptexinfmt (expand-file-name "ptexinfmt.el" "utils"))
(find-file (expand-file-name texifile "doc"))
(setq obuf (current-buffer))
;; We can't know file names if splitted.
(texinfo-format-buffer t)
;; Emacs20.2's default is 'raw-text-unix.
(and (fboundp 'set-buffer-file-coding-system)
(set-buffer-file-coding-system wl-cs-local))
(save-buffer)
(kill-buffer (current-buffer)) ;; info
(kill-buffer obuf)) ;; texi
)))
(defun wl-texinfo-format ()
(cond ((listp wl-info-lang)
(mapcar 'wl-texinfo-format-file wl-info-lang))
((stringp wl-info-lang)
(wl-texinfo-format-file wl-info-lang))))
|