Subject: bug#79462: 14.1.0; Set correct TeX-sentinel-function before starting processes.

From: Arash Esbati <[email-masked]>
Date: Wed, 17 Sep 2025 11:38:32 +0200

Al Haji-Ali <[email-masked]> writes:

> This is a follow-up bug-report/patch from:
> https://lists.gnu.org/archive/html/auctex-devel/2025-08/msg00026.html
>
> Previously, preview was setting the TeX-sentinel-function to temporary
> lambda functions inside `preview-start-*` functions which just outputs
> a message. This value is overwritten by functions that call
> `preview-start-*` to a correct sentinel. In most cases, this is
> harmless as the original sentinel is never called. However,
> preview-start-* also has a `sit-for` call which causes timers to be
> processed, and which may call `accept-process-output` causing the
> "wrong" temporary sentinel to be called.
> I faced this issue when developing preview-point (discussed above) and
> I am submitting this patch which simply sets the correct sentinel
> before calling preview-start-*.

Thanks, LGTM.

@Keita: Do you have any comments?  Otherwise I'll install this change.

Best, Arash