[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 50f0b00: Fix previous code change to `ispell--call-enchant-lsmod'
From: |
Reuben Thomas |
Subject: |
master 50f0b00: Fix previous code change to `ispell--call-enchant-lsmod' |
Date: |
Mon, 2 Nov 2020 16:39:40 -0500 (EST) |
branch: master
commit 50f0b00748bea6d39915a1e2e2cbeca2accb7417
Author: Reuben Thomas <rrt@sc3d.org>
Commit: Reuben Thomas <rrt@sc3d.org>
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.
---
lisp/textmodes/ispell.el | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 1cd17b1..da3c3f4 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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 50f0b00: Fix previous code change to `ispell--call-enchant-lsmod',
Reuben Thomas <=