diff options
| author | João Távora | 2017-11-03 19:01:45 +0000 |
|---|---|---|
| committer | João Távora | 2017-11-03 19:06:01 +0000 |
| commit | 4f38bdec743787bb4f00b51696afd3acf5a2e113 (patch) | |
| tree | c204eb0659425ab8c44a277f41d422011c74ef38 | |
| parent | 94b490529a85ea0844f2e1cf0dc7d2284c2ff2f2 (diff) | |
| download | emacs-4f38bdec743787bb4f00b51696afd3acf5a2e113.tar.gz emacs-4f38bdec743787bb4f00b51696afd3acf5a2e113.zip | |
Examine tex-chktex--process in the correct buffer
As in other Flymake backends, the process sentinel might run in
arbitrary buffers where this variable's value doesn't make sense.
For a way to trigger a problem due to this, see discussion starting in
https://lists.gnu.org/archive/html/emacs-devel/2017-10/msg00645.html
* lisp/textmodes/tex-mode.el (tex-chktex): Use
with-current-buffer.
| -rw-r--r-- | lisp/textmodes/tex-mode.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 3da6e4e1124..10ee10243ad 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el | |||
| @@ -3512,7 +3512,8 @@ There might be text before point." | |||
| 3512 | (lambda (process _event) | 3512 | (lambda (process _event) |
| 3513 | (when (eq (process-status process) 'exit) | 3513 | (when (eq (process-status process) 'exit) |
| 3514 | (unwind-protect | 3514 | (unwind-protect |
| 3515 | (when (eq process tex-chktex--process) | 3515 | (when (eq process |
| 3516 | (with-current-buffer source tex-chktex--process)) | ||
| 3516 | (with-current-buffer (process-buffer process) | 3517 | (with-current-buffer (process-buffer process) |
| 3517 | (goto-char (point-min)) | 3518 | (goto-char (point-min)) |
| 3518 | (cl-loop | 3519 | (cl-loop |