From b68e7a64ae624f79538d618afa8f90ae73c26b33 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 13 Jul 2021 20:13:21 +0200 Subject: [PATCH] Make 'tex-validate-buffer' work again * lisp/textmodes/tex-mode.el (tex-validate-buffer): The *Occur* buffer is read-only, so inhibit that before inserting things into it (bug#19326). --- lisp/textmodes/tex-mode.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 8b8108cb97b..ababd775d5f 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -1427,7 +1427,9 @@ on the line for the invalidity you want to see." (forward-line 1) (setq num-matches (1+ num-matches)) (insert-buffer-substring buffer start end) - (let (text-beg (text-end (point-marker))) + (let ((text-end (point-marker)) + (inhibit-read-only t) + text-beg) (forward-char (- start end)) (setq text-beg (point-marker)) (insert (format "%3d: " linenum)) @@ -1439,7 +1441,8 @@ on the line for the invalidity you want to see." (put-text-property text-beg (- text-end 1) 'occur-target tem)))))))) (with-current-buffer standard-output - (let ((no-matches (zerop num-matches))) + (let ((no-matches (zerop num-matches)) + (inhibit-read-only t)) (if no-matches (insert "None!\n")) (if (called-interactively-p 'interactive) -- 2.39.2