summaryrefslogtreecommitdiff
path: root/lisp/textmodes/tex-mode.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2021-07-13 20:13:21 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2021-07-13 20:13:26 +0200
commitb68e7a64ae624f79538d618afa8f90ae73c26b33 (patch)
tree370235b357a635ab07028a2b21f28f88d8b28195 /lisp/textmodes/tex-mode.el
parent1e96b97e3c4aa9cf119a7158ae77cf8c2d6c116d (diff)
downloademacs-b68e7a64ae624f79538d618afa8f90ae73c26b33.tar.gz
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).
Diffstat (limited to 'lisp/textmodes/tex-mode.el')
-rw-r--r--lisp/textmodes/tex-mode.el7
1 files 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)