Skip to content

Commit

Permalink
Make 'tex-validate-buffer' work again
Browse files Browse the repository at this point in the history
* lisp/textmodes/tex-mode.el (tex-validate-buffer): The *Occur*
buffer is read-only, so inhibit that before inserting things into
it (bug#19326).
  • Loading branch information
larsmagne committed Jul 13, 2021
1 parent 1e96b97 commit b68e7a6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lisp/textmodes/tex-mode.el
Expand Up @@ -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))
Expand All @@ -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)
Expand Down

0 comments on commit b68e7a6

Please sign in to comment.