]> git.eshelyaron.com Git - emacs.git/commitdiff
Make 'tex-validate-buffer' work again
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 13 Jul 2021 18:13:21 +0000 (20:13 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 13 Jul 2021 18:13:26 +0000 (20:13 +0200)
* 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

index 8b8108cb97b8b90dc00450b171911ba29d29d262..ababd775d5f115ce326e07b78e6f0a08de6341d0 100644 (file)
@@ -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)