diff options
author | Reuben Thomas <rrt@sc3d.org> | 2020-11-02 21:37:46 +0000 |
---|---|---|
committer | Reuben Thomas <rrt@sc3d.org> | 2020-11-02 21:37:46 +0000 |
commit | 50f0b00748bea6d39915a1e2e2cbeca2accb7417 (patch) | |
tree | ca6e6545e12f155db156369fd2fa31b69d462eab /lisp/textmodes/ispell.el | |
parent | a2bddd77108c622cd88eb2d0468d9236bf8f33a5 (diff) | |
download | emacs-50f0b00748bea6d39915a1e2e2cbeca2accb7417.tar.gz |
Fix previous code change to `ispell--call-enchant-lsmod'
* lisp/textmodes/ispell.el (ispell--call-enchant-lsmod): Restore the
use of with-current-buffer, to avoid enchant-lsmod’s output being
dumped into the current buffer.
Diffstat (limited to 'lisp/textmodes/ispell.el')
-rw-r--r-- | lisp/textmodes/ispell.el | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 1cd17b11ca8..da3c3f4d6fa 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -1215,14 +1215,15 @@ Internal use.") (defun ispell--call-enchant-lsmod (&rest args) "Call enchant-lsmod with ARGS and return the output as string." - (with-output-to-string - (apply #'ispell-call-process - (replace-regexp-in-string "enchant\\(-[0-9]\\)?\\'" - "enchant-lsmod\\1" - ispell-program-name) - ;; We discard stderr here because enchant-lsmod can emit - ;; unrelated warnings that will confuse us. - nil '(t nil) nil args))) + (with-current-buffer standard-output + (with-output-to-string + (apply #'ispell-call-process + (replace-regexp-in-string "enchant\\(-[0-9]\\)?\\'" + "enchant-lsmod\\1" + ispell-program-name) + ;; We discard stderr here because enchant-lsmod can emit + ;; unrelated warnings that will confuse us. + nil '(t nil) nil args)))) (defun ispell--get-extra-word-characters (&optional lang) "Get the extra word characters for LANG as a character class. |