From a6f543711071bfab8a7dbf6eb5c9974a1fba802e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 16 Jun 2026 09:57:48 -0400 Subject: [PATCH] (comint--intersect-regions): Fix bug#81243 * lisp/comint.el (comint--intersect-regions): Fix syntax-propertization. --- lisp/comint.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/comint.el b/lisp/comint.el index 95e117d999a..e5418f4ee67 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -4234,7 +4234,9 @@ function called, or nil, if no function was called (if BEG = END)." (eq is-output (eq (get-text-property (1+ end2) 'field) 'output))) (setq end2 (field-end end2))) - ;; Narrow to the whole field surrounding the region + ;; Narrow to the whole field surrounding the region. + ;; `syntax-propertize' can't widen so avoid the need to (bug#81243). + (syntax-propertize beg2) (narrow-to-region beg2 end2)) (setq return-end (list (funcall fun beg1 (marker-position end1)))))