auctex-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 90a2c29548ebf57f06ddb


From: Ikumi Keita
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 90a2c29548ebf57f06ddb44898e2f5ed3527ff85
Date: Fri, 18 Aug 2017 09:26:28 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  90a2c29548ebf57f06ddb44898e2f5ed3527ff85 (commit)
       via  ff0754463f2e5b916c0c05d10660313680eafb58 (commit)
      from  b43ec94b22aa8d240ad78d632ea141db85cee837 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 90a2c29548ebf57f06ddb44898e2f5ed3527ff85
Author: Ikumi Keita <address@hidden>
Date:   Fri Aug 18 22:25:05 2017 +0900

    Use #' to quote function names
    
    * tex-jp.el (japanese-plain-tex-mode-initialization,
    add-hook, japanese-latex-mode-initialization,
    japanese-TeX-reset-mode-name, TeX-insert-punctuation):
    Use #' to quote function names.

diff --git a/tex-jp.el b/tex-jp.el
index b1663db..81125ae 100644
--- a/tex-jp.el
+++ b/tex-jp.el
@@ -532,10 +532,10 @@ Set `japanese-TeX-mode' to t, and enter 
`TeX-plain-tex-mode'."
     ;; in `japanese-latex-mode-initialization'.
     (when enable-local-variables
       (setq major-mode 'japanese-plain-tex-mode)
-      (add-hook 'hack-local-variables-hook 'japanese-TeX-reset-mode-name
+      (add-hook 'hack-local-variables-hook #'japanese-TeX-reset-mode-name
                nil t))))
 
-(add-hook 'plain-TeX-mode-hook 'japanese-plain-tex-mode-initialization)
+(add-hook 'plain-TeX-mode-hook #'japanese-plain-tex-mode-initialization)
 
 ;;;###autoload
 (defun japanese-latex-mode ()
@@ -584,10 +584,10 @@ Set `japanese-TeX-mode' to t, and enter `TeX-latex-mode'."
     ;; `hack-local-variables' is done.
     (when enable-local-variables
       (setq major-mode 'japanese-latex-mode)
-      (add-hook 'hack-local-variables-hook 'japanese-TeX-reset-mode-name
+      (add-hook 'hack-local-variables-hook #'japanese-TeX-reset-mode-name
                nil t))))
 
-(add-hook 'LaTeX-mode-hook 'japanese-latex-mode-initialization)
+(add-hook 'LaTeX-mode-hook #'japanese-latex-mode-initialization)
 
 ;; This function is useful only within `hack-local-variables-hook'.
 (defun japanese-TeX-reset-mode-name ()
@@ -595,7 +595,7 @@ Set `japanese-TeX-mode' to t, and enter `TeX-latex-mode'."
         (setq major-mode 'latex-mode))
        ((eq major-mode 'japanese-plain-tex-mode)
         (setq major-mode 'plain-tex-mode)))
-  (remove-hook 'hack-local-variables-hook 'japanese-TeX-reset-mode-name t))
+  (remove-hook 'hack-local-variables-hook #'japanese-TeX-reset-mode-name t))
 
 ;; Make `hack-dir-local-variables' to regard `latex-mode' as parent
 ;; of `japanese-latex-mode', and `plain-tex-mode' as parent of
@@ -640,7 +640,7 @@ overwrite the value already set locally."
   (expand-abbrev)
   (if (TeX-looking-at-backward "\\\\/\\(}+\\)" 50)
       (replace-match "\\1" t))
-  (call-interactively 'japanese-TeX-self-insert-command))
+  (call-interactively #'japanese-TeX-self-insert-command))
 
 ;;; Error Messages
 

commit ff0754463f2e5b916c0c05d10660313680eafb58
Author: Ikumi Keita <address@hidden>
Date:   Fri Aug 18 22:04:49 2017 +0900

    Delay setting Japanese TeX engine in `japanese-latex-mode'
    
    * tex-jp.el (japanese-latex-mode-initialization): The part which
    guesses and sets `TeX-engine' using `TeX-match-style' is factored out
    and put in `TeX-update-style-hook'.  `TeX-match-style' eventually
    triggers `TeX-update-style', which isn't appropriate in
    `LaTeX-mode-hook'.
    (japanese-LaTeX-guess-engine): New function.

diff --git a/tex-jp.el b/tex-jp.el
index 09909ba..b1663db 100644
--- a/tex-jp.el
+++ b/tex-jp.el
@@ -526,7 +526,6 @@ Set `japanese-TeX-mode' to t, and enter 
`TeX-plain-tex-mode'."
 (defun japanese-plain-tex-mode-initialization ()
   "Japanese plain-TeX specific initializations."
   (when japanese-TeX-mode
-;    (setq TeX-command-default japanese-TeX-command-default)
     (TeX-engine-set japanese-TeX-engine-default)
 
     ;; For the intent of the following lines, see the comments below
@@ -549,21 +548,16 @@ Set `japanese-TeX-mode' to t, and enter `TeX-latex-mode'."
 (defun japanese-latex-mode-initialization ()
   "Japanese LaTeX specific initializations."
   (when japanese-TeX-mode
-;    (setq TeX-command-default japanese-LaTeX-command-default)
-    (TeX-engine-set
-     (cond
-      ((TeX-match-style "\\`u[jt]\\(article\\|report\\|book\\)\\'")
-       'uptex)
-      ((TeX-match-style "\\`[jt]s?\\(article\\|report\\|book\\)\\'")
-       (if (LaTeX-match-class-option "\\`uplatex\\'")
-          'uptex 'ptex))
-      ((TeX-match-style "\\`j-\\(article\\|report\\|book\\)\\'")
-       'jtex)
-      (t japanese-TeX-engine-default)))
+    ;; `TeX-match-style' $B$r;H$&$N$O(B `TeX-update-style' 
$B$N8e$KCY$i$;$k!#(B
+    ;; $B$3$NCJ3,$G;H$&$H!"$=$NCf$G8F$V(B `TeX-style-list' $B$NCf$G(B
+    ;; `TeX-update-style' $B$,8F$P$l$F$7$^$$!"(Blocal variable 
$BEy$N=`Hw$,(B
+    ;; address@hidden,$G(B style hook $B$,<B9T$5$l$FITE,$J7k2L$K$J$k$3$H$,(B
+    ;; $B$"$k!#$^$?!"(B`TeX-update-style' $B$O8e$+$i(B `find-file-hook' 
$BCf$G$b(B
+    ;; $B$&0lEY8F$P$l$k$N$G!"(B`TeX-parse-self' $B$,(B t address@hidden(B 
parse $B=hM}$bL5BL(B
+    ;; $B$K(B 2 $B2s9T$o$l$F$7$^$&!#(B
+    (add-hook 'TeX-update-style-hook
+             #'japanese-LaTeX-guess-engine nil t)
     (setq LaTeX-default-style japanese-LaTeX-default-style)
-;    (setq TeX-command-BibTeX
-;        (if (and (eq TeX-engine 'ptex) (executable-find "pbibtex"))
-;            "pBibTeX" "jBibTeX"))
 
     (when (and (fboundp 'font-latex-add-keywords)
               (eq TeX-install-font-lock 'font-latex-setup))
@@ -609,6 +603,25 @@ Set `japanese-TeX-mode' to t, and enter `TeX-latex-mode'."
 (put 'japanese-plain-tex-mode 'derived-mode-parent 'plain-tex-mode)
 (put 'japanese-latex-mode 'derived-mode-parent 'latex-mode)
 
+(defun japanese-LaTeX-guess-engine ()
+  "Guess Japanese TeX engine and set it to `TeX-engine'.
+Document class and its option is considered in the guess.  Do not
+overwrite the value already set locally."
+  ;; `TeX-engine' may be set by the file local variable or by the menu
+  ;; Command->TeXing Options manually.  Don't override the user
+  ;; preference set in such ways.
+  (unless (local-variable-p 'TeX-engine (current-buffer))
+    (TeX-engine-set
+     (cond
+      ((TeX-match-style "\\`u[jt]\\(?:article\\|report\\|book\\)\\'")
+       'uptex)
+      ((TeX-match-style "\\`[jt]s?\\(?:article\\|report\\|book\\)\\'")
+       (if (LaTeX-match-class-option "\\`uplatex\\'")
+          'uptex 'ptex))
+      ((TeX-match-style "\\`j-\\(?:article\\|report\\|book\\)\\'")
+       'jtex)
+      (t japanese-TeX-engine-default)))))
+
 ;;; Support for various self-insert-command
 
 (fset 'japanese-TeX-self-insert-command

-----------------------------------------------------------------------

Summary of changes:
 tex-jp.el | 55 ++++++++++++++++++++++++++++++++++---------------------
 1 file changed, 34 insertions(+), 21 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

[Prev in Thread] Current Thread [Next in Thread]