




















| author | Stefan Monnier <monnier@iro.umontreal.ca> | 2026-07-10 09:53:42 +0200 |
|---|---|---|
| committer | Arash Esbati <arash@gnu.org> | 2026-07-10 09:53:42 +0200 |
| commit | b7efe049d4f732083bb12a71879b2c21a863e88b (patch) | |
| tree | e2caabecc886c1f1561f32d1ec360cdb2ee2588a | |
| parent | 7c4d522678e855444c30cdefc68e51bbcd69bb50 (diff) | |
Fix 'syntax-propertize because of narrowing!' errorexternals/auctex
* texmathp.el (texmathp-match-macro): Syntax-propertize before narrowing. (Emacs bug#81035)
| -rw-r--r-- | texmathp.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/texmathp.el b/texmathp.el
index b900ecd845d..7dd443a0150 100644
--- a/texmathp.el
+++ b/texmathp.el
@@ -1,6 +1,6 @@
;;; texmathp.el -- Code to check if point is inside LaTeX math environment -*- lexical-binding: t; -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2026 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@strw.LeidenUniv.nl>
;; Maintainer: auctex-devel@gnu.org
@@ -395,6 +395,9 @@ Limit searches to BOUND. The return value is like (\"\\macro\" . (point))."
(save-restriction
(save-excursion
(set-syntax-table texmathp-syntax-table)
+ ;; `syntax-propertize' can't widen so make sure it won't
+ ;; need to (Emacs bug#81035).
+ (syntax-propertize (max 1 bound))
(narrow-to-region (max 1 bound) (point))
;; Move back out of the current parenthesis
(while (condition-case nil (progn (up-list -1) t) (error nil))
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。