[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 8b6a6bbce4 4/8: Allow programmatic preview abort
From: |
ELPA Syncer |
Subject: |
[elpa] externals/auctex 8b6a6bbce4 4/8: Allow programmatic preview abortion |
Date: |
Mon, 6 May 2024 09:57:31 -0400 (EDT) |
branch: externals/auctex
commit 8b6a6bbce4704ac3b759a5f09ea0844dfd624892
Author: Paul Nelson <ultrono@gmail.com>
Commit: Arash Esbati <arash@gnu.org>
Allow programmatic preview abortion
* preview.el.in (preview-abort-flag): New variable.
(preview-TeX-inline-sentinel): Use it. (bug#70630)
---
preview.el.in | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/preview.el.in b/preview.el.in
index 72568be781..64473e600b 100644
--- a/preview.el.in
+++ b/preview.el.in
@@ -3902,6 +3902,12 @@ If FAST is set, do a fast conversion."
TeX-shell-command-option
command))))
+(defvar-local preview-abort-flag nil
+ "Cause ongoing preview generation to abort.
+If non-nil, then `preview-TeX-inline-sentinel' aborts and resets this
+variable to nil. This is intended to give a way for external packages
+to abort preview generation, more reliably than via process signals.")
+
(defun preview-TeX-inline-sentinel (process _name)
"Sentinel function for preview.
See `TeX-sentinel-function' and `set-process-sentinel'
@@ -3910,7 +3916,12 @@ for definition of PROCESS and NAME."
(let ((status (process-status process)))
(if (memq status '(signal exit))
(delete-process process))
- (when (eq status 'exit)
+ (cond
+ ((with-current-buffer TeX-command-buffer
+ (prog1
+ preview-abort-flag
+ (setq preview-abort-flag nil))))
+ ((eq status 'exit)
(save-excursion
(goto-char (point-max))
(forward-line -1)
@@ -3921,7 +3932,7 @@ for definition of PROCESS and NAME."
(condition-case err
(preview-call-hook 'open)
(error (preview-log-error err "LaTeX" process)))
- (preview-reraise-error process))))
+ (preview-reraise-error process)))))
(defcustom preview-format-extensions '(".fmt" ".efmt")
"Possible extensions for format files.
- [elpa] externals/auctex updated (56b5dab166 -> 5a64a805e5), ELPA Syncer, 2024/05/06
- [elpa] externals/auctex 8b6a6bbce4 4/8: Allow programmatic preview abortion,
ELPA Syncer <=
- [elpa] externals/auctex 63968cc5cf 1/8: * tex.el (TeX-one-master): Consider .ltx as ordinary TeX files., ELPA Syncer, 2024/05/06
- [elpa] externals/auctex 2d0c70114e 3/8: Allow multiple preview preprocessors, ELPA Syncer, 2024/05/06
- [elpa] externals/auctex 06c0df55a4 5/8: Expand default auto-reveal options, ELPA Syncer, 2024/05/06
- [elpa] externals/auctex 8db1e90b6d 2/8: Make auto-reveal customizations easier to extend, ELPA Syncer, 2024/05/06
- [elpa] externals/auctex 5fdc235080 6/8: Generalize some error description regexp, ELPA Syncer, 2024/05/06
- [elpa] externals/auctex 0caa170649 7/8: Fix previews in indirect buffers, ELPA Syncer, 2024/05/06
- [elpa] externals/auctex 5a64a805e5 8/8: Merge remote-tracking branch 'origin/master', ELPA Syncer, 2024/05/06