[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 95c3acff496eaaebed1cf
From: |
Ikumi Keita |
Subject: |
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 95c3acff496eaaebed1cf38bf0bdaa8a034d46d4 |
Date: |
Thu, 6 May 2021 09:01:02 -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 95c3acff496eaaebed1cf38bf0bdaa8a034d46d4 (commit)
via dc425b75de29143ec2a1991b1befab58aaf38157 (commit)
from 431375f4d84117e0dc64b83e2356eebda6be9a97 (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 95c3acff496eaaebed1cf38bf0bdaa8a034d46d4
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Date: Thu May 6 21:54:26 2021 +0900
Ensure rawness of data to compute MD5
* tex-buf.el (TeX-run-TeX): Use `insert-file-contents-literally'
instead of `insert-file-contents' in order to avoild possible wrong
MD5 value due to unnecessary encoding conversion.
;(TeX-sentinel-function, TeX-sentinel-default-function): Fix typo.
diff --git a/tex-buf.el b/tex-buf.el
index e465290..1aca504 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1185,7 +1185,7 @@ run of `TeX-run-format', use
(while (setq element (assoc idx-file LaTeX-idx-md5-alist))
(setq LaTeX-idx-md5-alist (delq element LaTeX-idx-md5-alist))))
(with-temp-buffer
- (insert-file-contents idx-file)
+ (insert-file-contents-literally idx-file)
(push (cons idx-file (md5 (current-buffer))) LaTeX-idx-md5-alist))))
;; can we assume that TeX-sentinel-function will not be changed
@@ -1465,7 +1465,7 @@ reasons. Use `TeX-run-function' instead."
(defvar TeX-sentinel-function (lambda (_process _name) nil)
- "Hook to cleanup TeX command buffer after temination of PROCESS.
+ "Hook to cleanup TeX command buffer after termination of PROCESS.
NAME is the name of the process.")
(make-variable-buffer-local 'TeX-sentinel-function)
@@ -1473,7 +1473,7 @@ NAME is the name of the process.")
(defvar TeX-sentinel-default-function (lambda (_process _name) nil)
"Default for `TeX-sentinel-function'. To be set in major mode.
-Hook to cleanup TeX command buffer after temination of PROCESS.
+Hook to cleanup TeX command buffer after termination of PROCESS.
NAME is the name of the process.")
(make-variable-buffer-local 'TeX-sentinel-default-function)
commit dc425b75de29143ec2a1991b1befab58aaf38157
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Date: Thu May 6 21:27:31 2021 +0900
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.
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
-----------------------------------------------------------------------
Summary of changes:
tex-buf.el | 59 +++++++++++++++++++++++++++++++----------------------------
1 file changed, 31 insertions(+), 28 deletions(-)
hooks/post-receive
--
GNU AUCTeX
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 95c3acff496eaaebed1cf38bf0bdaa8a034d46d4,
Ikumi Keita <=