Patches and copyright assignment question
Masayuki Ataka <[email protected]>
| Newsgroups | gmane.emacs.auc-tex |
|---|---|
| Message-ID | <[email protected]> |
Hi, Keita Ikumi, who gave me some reports and suggestions, sent me a patch for the CVS AUCTeX. I already committed his one line patches. But this time, his patch is big, so I'm afraid that he should write a copyright assignment. How do you think, David? Patch: * Add tag to defcustom in tex-jp.el * Some doc fix in tex-jp.el * TeX-macro-global-internal takes some arguments. If there is no need to write copyright assignment, I'll commit below, soon. If need, I will contact him. regards, --- email: [email protected] Name:: Masayuki Ataka // (Japan) --- tex-jp.el.ataka Fri Feb 11 23:24:25 2005 +++ tex-jp.el Sat Feb 12 01:26:28 2005 @@ -53,22 +53,41 @@ ;; use the %(latex) and %(tex) shorthands here because I have not ;; clue whether Omega-related versions exist. --dak '(("jTeX" "%(PDF)jtex %S%(PDFout) \"%(mode)\\input %t\"" - TeX-run-TeX nil (plain-tex-mode)) + TeX-run-TeX nil (plain-tex-mode) :help "Run NTT jTeX") ("jLaTeX" "%(PDF)jlatex %S%(PDFout) \"%(mode)\\input{%t}\"" - TeX-run-LaTeX nil (latex-mode)) + TeX-run-TeX nil (latex-mode) :help "Run NTT jLaTeX") ("pTeX" "%(PDF)ptex %S%(PDFout) \"%(mode)\\input %t\"" - TeX-run-TeX nil (plain-tex-mode)) + TeX-run-TeX nil (plain-tex-mode) :help "Run ASCII pTeX") ("pLaTeX" "%(PDF)platex %S%(PDFout) \"%(mode)\\input{%t}\"" - TeX-run-LaTeX nil (latex-mode)) - ("Mendex" "mendex %s" TeX-run-command nil t) - ("jBibTeX" "jbibtex %s" TeX-run-BibTeX nil t)) - "Additional list of commands to execute in japanese-LaTeX-mode") + TeX-run-TeX nil (latex-mode) :help "Run ASCII pLaTeX") + ("Mendex" "mendex %s" TeX-run-command nil t :help "Create index file with mendex") + ("jBibTeX" "jbibtex %s" TeX-run-BibTeX nil t :help "Run jBibTeX")) + "Additional list of commands to execute in japanese-TeX-mode.") (setq TeX-command-list (append japanese-TeX-command-list '(("-" "" nil nil t)) ;; separator for command menu TeX-command-list)) +(mapcar (lambda (dir) (add-to-list 'TeX-macro-global dir t)) + (TeX-macro-global-internal "platex" '("/ptex/" "/jbibtex/bst/") + '("/usr/share/texmf/ptex/" "/usr/share/texmf/jbibtex/bst/"))) + +;; kpathsea NTT jlatex +(mapcar (lambda (dir) (add-to-list 'TeX-macro-global dir t)) + (TeX-macro-global-internal "jlatex" '("/jtex/" "/jbibtex/bst/") + '("/usr/share/texmf/jtex/" "/usr/share/texmf/jbibtex/bst/"))) + +(setcar (cdr (assoc "tex" TeX-kpathsea-format-alist)) + "${TEXINPUTS.platex}") +;; kpathsea NTT jlatex +;; (setcar (cdr (assoc "tex" TeX-kpathsea-format-alist)) +;; "${TEXINPUTS.jlatex}") +(setcar (cdr (assoc "bib" TeX-kpathsea-format-alist)) + "${BIBINPUTS.jbibtex}") +(setcar (cdr (assoc "bst" TeX-kpathsea-format-alist)) + "${BSTINPUTS.jbibtex}") + ;; Menus (easy-menu-define plain-TeX-mode-command-menu @@ -88,34 +107,33 @@ "%(PDF)platex %S%(PDFout)")) LaTeX-command-style)) -(setcdr (assoc "%l" TeX-expand-list) - (list 'TeX-style-check LaTeX-command-style)) - (defvar japanese-TeX-error-messages t "If non-nil, explain TeX error messages in Japanese.") (when (featurep 'mule) -(defvar TeX-japanese-process-input-coding-system +(defcustom TeX-japanese-process-input-coding-system (if (featurep 'xemacs) - (find-coding-system 'euc-japan) - 'euc-jp) - "TeX-process' coding system with standard input.") + (find-coding-system 'euc-japan) nil) + "TeX-process' coding system with standard input." + :group 'AUCTeX-jp + :type 'coding-system) -(defvar TeX-japanese-process-output-coding-system +(defcustom TeX-japanese-process-output-coding-system (if (featurep 'xemacs) - (find-coding-system 'junet) - 'euc-jp) - "TeX-process' coding system with standard output.")) + (find-coding-system 'junet) nil) + "TeX-process' coding system with standard output." + :group 'AUCTeX-jp + :type 'coding-system)) (defcustom japanese-TeX-command-default "pTeX" - "*The default command for TeX-command in the japanese-TeX mode." + "*The default command for `TeX-command' in the japanese-TeX mode." :group 'AUCTeX-jp :type 'string) (make-variable-buffer-local 'japanese-TeX-command-default) (defcustom japanese-LaTeX-command-default "LaTeX" - "*The default command for TeX-command in the japanese-LaTeX mode." + "*The default command for `TeX-command' in the japanese-LaTeX mode." :group 'AUCTeX-jp :type 'string) (make-variable-buffer-local 'japanese-LaTeX-command-default) @@ -1439,6 +1438,14 @@ (defun TeX-macro-global () "Return directories containing the site's TeX macro and style files." + (TeX-macro-global-internal "latex" '("/tex/" "/bibtex/bst/") + '("/usr/share/texmf/tex/" "/usr/share/texmf/bibtex/bst/"))) + +(defun TeX-macro-global-internal (latex search default) + "Return directories containing the site's TeX macro and style files. +LATEX: latex command +SEARCH: search path under system texmf tree +DEFAULT: fallback path list" (let ((tree-list '("$SYSTEXMF" "$TEXMFLOCAL" "$TEXMFMAIN" "$TEXMFDIST")) path-list path exit-status input-dir-list) (condition-case nil @@ -1449,7 +1456,7 @@ (call-process "kpsewhich" nil (list standard-output nil) nil - "--progname" "latex" + "--progname" latex "--expand-braces" (nth i tree-list))))) (if (zerop exit-status) (progn (add-to-list 'path-list path) @@ -1459,7 +1466,7 @@ (call-process "kpsewhich" nil (list standard-output nil) nil - "--progname" "latex" + "--progname" latex "--expand-path" (nth i tree-list))))) (when (zerop exit-status) (add-to-list 'path-list path))))) (error nil)) @@ -1475,11 +1482,10 @@ (setq item (substring item (match-end 0) (length item)))) (when (string-match "/+$" item) (setq item (substring item 0 (match-beginning 0)))) - (dolist (subdir '("/tex/" "/bibtex/bst/")) + (dolist (subdir search) (when (file-exists-p (file-name-as-directory (concat item subdir))) (add-to-list 'input-dir-list (concat item subdir))))))) - (or input-dir-list - '("/usr/share/texmf/tex/" "/usr/share/texmf/bibtex/bst/")))) + (or input-dir-list default))) (defcustom TeX-macro-global (TeX-macro-global) "Directories containing the site's TeX macro and style files. @@ -2885,7 +2891,6 @@ (defcustom TeX-kpathsea-format-alist '(("tex" "${TEXINPUTS.latex}" TeX-file-extensions) ("eps" "${TEXINPUTS}" LaTeX-includegraphics-extensions) - ("pdf" "${TEXINPUTS}" LaTeX-includegraphics-extensions) ("pdf" "${TEXINPUTS}" LaTeX-includegraphics-extensions) ("png" "${TEXINPUTS}" LaTeX-includegraphics-extensions) ("jpg" "${TEXINPUTS}" LaTeX-includegraphics-extensions)