[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex dc425b7 05/34: Make `TeX-run-format' self-contai
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex dc425b7 05/34: Make `TeX-run-format' self-contained (bug#48144) |
Date: |
Sun, 6 Jun 2021 11:40:01 -0400 (EDT) |
branch: externals/auctex
commit dc425b75de29143ec2a1991b1befab58aaf38157
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>
Make `TeX-run-format' self-contained (bug#48144)
* tex-buf.el (TeX-run-format, TeX-run-TeX): Move initialization of
`TeX-error-report-switches' from `TeX-run-TeX' to `TeX-run-format'.
This makes `TeX-TeX-sentinel', set to `TeX-sentinel-function', work
without error when `TeX-run-format' is called outside of
`TeX-run-TeX'.
(TeX-error-report-switches, TeX-error-report-has-errors-p): Define
them before `TeX-run-format' to prevent compiler warning.
---
tex-buf.el | 53 ++++++++++++++++++++++++++++-------------------------
1 file changed, 28 insertions(+), 25 deletions(-)
diff --git a/tex-buf.el b/tex-buf.el
index 114ceac..e465290 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1124,42 +1124,28 @@ Return the new process."
lst nil)
(setq lst (cdr lst))))))
-(defun TeX-run-format (name command file)
- "Create a process for NAME using COMMAND to format FILE with TeX."
- (TeX-run-set-command name command)
- (let ((buffer (TeX-process-buffer-name file))
- (process (TeX-run-command name command file)))
- ;; Hook to TeX debugger.
- (with-current-buffer buffer
- (TeX-parse-reset)
- (setq TeX-parse-function #'TeX-parse-TeX)
- (setq TeX-sentinel-function #'TeX-TeX-sentinel)
- (if TeX-process-asynchronous
- (progn
- ;; Updating the mode line.
- (setq TeX-current-page "[0]")
- (TeX-format-mode-line process)
- (set-process-filter process #'TeX-format-filter)))
- process)))
-
(defvar TeX-error-report-switches nil
"Reports presence of errors after `TeX-run-TeX'.
+Actually, `TeX-run-format' sets it.
To test whether the current buffer has a compile error from last
-run of `TeX-run-TeX', use
+run of `TeX-run-format', use
(TeX-error-report-has-errors-p)")
(defun TeX-error-report-has-errors-p ()
"Return non-nil if current buffer has compile errors from last TeX run."
(plist-get TeX-error-report-switches (intern (TeX-master-file))))
-(defun TeX-run-TeX (name command file)
+(defun TeX-run-format (name command file)
"Create a process for NAME using COMMAND to format FILE with TeX."
-
- ;; Save information in TeX-error-report-switches
- ;; Initialize error to nil (no error) for current master.
- ;; Presence of error is reported inside `TeX-TeX-sentinel-check'
+ (TeX-run-set-command name command)
(let ((current-master (TeX-master-file))
- (idx-file nil) (element nil))
+ (buffer (TeX-process-buffer-name file))
+ (process (TeX-run-command name command file)))
+
+ ;; Save information in TeX-error-report-switches
+ ;; Initialize error to nil (no error) for current master.
+ ;; Presence of error is reported inside `TeX-TeX-sentinel-check'
+
;; the current master file is saved because error routines are
;; parsed in other buffers;
(setq TeX-error-report-switches
@@ -1170,6 +1156,23 @@ run of `TeX-run-TeX', use
(plist-put TeX-error-report-switches
(intern current-master) nil))
+ ;; Hook to TeX debugger.
+ (with-current-buffer buffer
+ (TeX-parse-reset)
+ (setq TeX-parse-function #'TeX-parse-TeX)
+ (setq TeX-sentinel-function #'TeX-TeX-sentinel)
+ (if TeX-process-asynchronous
+ (progn
+ ;; Updating the mode line.
+ (setq TeX-current-page "[0]")
+ (TeX-format-mode-line process)
+ (set-process-filter process #'TeX-format-filter)))
+ process)))
+
+(defun TeX-run-TeX (name command file)
+ "Create a process for NAME using COMMAND to format FILE with TeX."
+
+ (let ((idx-file nil) (element nil))
;; Store md5 hash of the index file before running LaTeX.
(and (memq major-mode '(doctex-mode latex-mode))
(prog1 (file-exists-p
- [elpa] externals/auctex updated (3e163e5 -> 6c32b97), Tassilo Horn, 2021/06/06
- [elpa] externals/auctex bff3d85 01/34: ; Delete unnecessary escaping of characters, Tassilo Horn, 2021/06/06
- [elpa] externals/auctex 1193619 02/34: ; Silence the compiler, Tassilo Horn, 2021/06/06
- [elpa] externals/auctex 431375f 04/34: Support new kernel macro \footref, Tassilo Horn, 2021/06/06
- [elpa] externals/auctex dc425b7 05/34: Make `TeX-run-format' self-contained (bug#48144),
Tassilo Horn <=
- [elpa] externals/auctex 9f7bddc 07/34: ; * style/thmtools.el (LaTeX-thmtools-env-label): Fix quote., Tassilo Horn, 2021/06/06
- [elpa] externals/auctex b852059 10/34: ; Improve previous commit, Tassilo Horn, 2021/06/06
- [elpa] externals/auctex 7ff3323 03/34: Add support for (Brazilian) Portuguese, Tassilo Horn, 2021/06/06
- [elpa] externals/auctex 95c3acf 06/34: Ensure rawness of data to compute MD5, Tassilo Horn, 2021/06/06
- [elpa] externals/auctex 70907dd 09/34: Skip inline math $ inside comments (bug#48365), Tassilo Horn, 2021/06/06
- [elpa] externals/auctex 2959334 11/34: ; Improve previous commit again, Tassilo Horn, 2021/06/06
- [elpa] externals/auctex 6050e27 12/34: Add new variable `TeX-normal-mode-reset-list', Tassilo Horn, 2021/06/06
- [elpa] externals/auctex a6121fb 13/34: Fix fontification when $ is unclosed in buffer, Tassilo Horn, 2021/06/06
- [elpa] externals/auctex 3c8e583 08/34: Introduce new variable `LaTeX-global-package-files', Tassilo Horn, 2021/06/06
- [elpa] externals/auctex 605cfc2 14/34: Add new test, Tassilo Horn, 2021/06/06