From: Lars Ingebrigtsen Date: Tue, 13 Jul 2021 18:13:21 +0000 (+0200) Subject: Make 'tex-validate-buffer' work again X-Git-Tag: emacs-28.0.90~1887 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b68e7a64ae624f79538d618afa8f90ae73c26b33;p=emacs.git 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). --- 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)