diff options
| author | Lars Ingebrigtsen | 2021-07-13 20:13:21 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-07-13 20:13:26 +0200 |
| commit | b68e7a64ae624f79538d618afa8f90ae73c26b33 (patch) | |
| tree | 370235b357a635ab07028a2b21f28f88d8b28195 | |
| parent | 1e96b97e3c4aa9cf119a7158ae77cf8c2d6c116d (diff) | |
| download | emacs-b68e7a64ae624f79538d618afa8f90ae73c26b33.tar.gz emacs-b68e7a64ae624f79538d618afa8f90ae73c26b33.zip | |
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).
| -rw-r--r-- | lisp/textmodes/tex-mode.el | 7 |
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." | |||
| 1427 | (forward-line 1) | 1427 | (forward-line 1) |
| 1428 | (setq num-matches (1+ num-matches)) | 1428 | (setq num-matches (1+ num-matches)) |
| 1429 | (insert-buffer-substring buffer start end) | 1429 | (insert-buffer-substring buffer start end) |
| 1430 | (let (text-beg (text-end (point-marker))) | 1430 | (let ((text-end (point-marker)) |
| 1431 | (inhibit-read-only t) | ||
| 1432 | text-beg) | ||
| 1431 | (forward-char (- start end)) | 1433 | (forward-char (- start end)) |
| 1432 | (setq text-beg (point-marker)) | 1434 | (setq text-beg (point-marker)) |
| 1433 | (insert (format "%3d: " linenum)) | 1435 | (insert (format "%3d: " linenum)) |
| @@ -1439,7 +1441,8 @@ on the line for the invalidity you want to see." | |||
| 1439 | (put-text-property text-beg (- text-end 1) | 1441 | (put-text-property text-beg (- text-end 1) |
| 1440 | 'occur-target tem)))))))) | 1442 | 'occur-target tem)))))))) |
| 1441 | (with-current-buffer standard-output | 1443 | (with-current-buffer standard-output |
| 1442 | (let ((no-matches (zerop num-matches))) | 1444 | (let ((no-matches (zerop num-matches)) |
| 1445 | (inhibit-read-only t)) | ||
| 1443 | (if no-matches | 1446 | (if no-matches |
| 1444 | (insert "None!\n")) | 1447 | (insert "None!\n")) |
| 1445 | (if (called-interactively-p 'interactive) | 1448 | (if (called-interactively-p 'interactive) |