From: Reuben Thomas Date: Mon, 2 Nov 2020 21:37:46 +0000 (+0000) Subject: Fix previous code change to `ispell--call-enchant-lsmod' X-Git-Tag: emacs-28.0.90~5276 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=50f0b00748bea6d39915a1e2e2cbeca2accb7417;p=emacs.git 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. --- 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.