[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] [elpa] externals/auctex e032df90e7 05/60: Fix simultaneit
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] [elpa] externals/auctex e032df90e7 05/60: Fix simultaneity |
Date: |
Fri, 8 Apr 2022 11:52:45 -0400 (EDT) |
branch: externals/auctex
commit e032df90e792ef9b85be3e8e3528c947ecdb5b6a
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>
Fix simultaneity
* tex-buf.el (TeX-command): Keep the value of
`TeX-current-process-region-p' as buffer-local value of
`TeX--this-process-region-flag' in process buffer.
(TeX-command-sentinel): Call sentinel where
`TeX-current-process-region-p' has its own value when the process
started.
(TeX-current-process-region-p): Move `defvar' before its first usage.
(TeX--this-process-region-flag): New variable.
---
tex-buf.el | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/tex-buf.el b/tex-buf.el
index eeff2fc06c..f5a2d22eb7 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -285,7 +285,6 @@ at bottom if LINE is nil."
;; far down (i.e. further down than their first use), so we have to pre-declare
;; them here to explain it to the compiler.
;; We should move those vars's definitions earlier instead!
-(defvar TeX-current-process-region-p)
(defvar TeX-save-query)
(defvar TeX-parse-function)
(defvar TeX-sentinel-function)
@@ -487,6 +486,11 @@ Do you want to select one of these engines? "
:group 'TeX-command
:type 'integer)
+(defvar TeX-current-process-region-p nil
+ "Non-nil means that the last TeX command is on a region.")
+(defvar-local TeX--this-process-region-flag nil
+ "Per process value of `TeX-current-process-region-p'.")
+
(defun TeX-command (name file-fn &optional override-confirm)
"Run command NAME on the file returned by calling FILE-FN.
@@ -556,7 +560,9 @@ remember to add /Library/TeX/texbin/ to your PATH"
;; Now start the process
(let ((file (funcall file-fn)))
(TeX-process-set-variable file 'TeX-command-next TeX-command-Show)
- (funcall hook name command file))))
+ (funcall hook name command file)
+ (TeX-process-set-variable file 'TeX--this-process-region-flag
+ TeX-current-process-region-p))))
(defun TeX-command-expand (command &optional list)
"Expand COMMAND for `TeX-active-master' as described in LIST.
@@ -1453,8 +1459,8 @@ Insert MSG with some additional information."
(TeX-command-mode-line process)
(setq TeX-command-next TeX-command-Show)
(goto-char (point-min))
- (apply TeX-sentinel-function process name nil)
-
+ (let ((TeX-current-process-region-p
TeX--this-process-region-flag))
+ (funcall TeX-sentinel-function process name))
;; If buffer and mode line will show that the process
;; is dead, we can delete it now. Otherwise it
@@ -2028,9 +2034,6 @@ command."
;;; Active Process
-(defvar TeX-current-process-region-p nil
- "Non-nil means that the last TeX command is on a region.")
-
(defun TeX-active-process ()
"Return the active process for the current buffer."
(TeX-process (TeX-active-master)))
- [AUCTeX-diffs] [elpa] externals/auctex f9356664c8 23/60: Update documentation, (continued)
- [AUCTeX-diffs] [elpa] externals/auctex f9356664c8 23/60: Update documentation, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 78cf12b33c 18/60: ; * doc/auctex.texi: Adjust the year in @copying., Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex c731038844 11/60: Improve regexp matching new environments, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 259ffc34c4 12/60: Use DEFAULT argument of `TeX-read-string' in styles, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 0ce906cfc7 32/60: Improve indentation of conditionals, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex b7d45e19c6 22/60: Discard obsolete hook, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 2b11084455 30/60: ; * style/l3doc.el (LaTeX-env-l3doc-function): Delete unused var., Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 238dad67f9 04/60: Introduce DEFAULT argument in `TeX-arg-length', Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 7b0cbbb465 38/60: Document feature of []-induced indent, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 4b1c7015ae 45/60: Move contents of tex-buf.el into tex.el, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex e032df90e7 05/60: Fix simultaneity,
Tassilo Horn <=
- [AUCTeX-diffs] [elpa] externals/auctex a078fda16b 06/60: ; * doc/auctex.texi (Starting a Command): Delete obosolete comment., Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex b1a0d5df74 36/60: ; * style/algpseudocode.el: Fix position of TeX-dialect., Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 1bc2630275 20/60: Don't change syntax of ^^A comments in doctex mode (bug#35140), Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex fa8842c626 26/60: Recognize macrocode*? environments in doctex-mode, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 45aff50ff3 48/60: Support \mathcolor in style/x?color.el, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 5d2829aed4 49/60: Remove old defadvices (patch by Stefan Monnier), Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 5cf46ff8e2 52/60: Improve parsing of re-definitions, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 03ed9004cd 60/60: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex c050335dd8 21/60: ; Fix typo, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 69b78fcc26 54/60: Don't change indentation when defining a conditional, Tassilo Horn, 2022/04/08