[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master b68e7a6: Make 'tex-validate-buffer' work again

From: Lars Ingebrigtsen
Subject: master b68e7a6: Make 'tex-validate-buffer' work again
Date: Tue, 13 Jul 2021 14:13:31 -0400 (EDT)

branch: master
commit b68e7a64ae624f79538d618afa8f90ae73c26b33
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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 8b8108c..ababd77 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)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]