From 0764ed3749c97bc7c18dab9dc63c6e395d348cb4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Agust=C3=ADn=20Mart=C3=ADn?= Date: Mon, 5 Jan 2009 17:45:53 +0000 Subject: [PATCH] textmodes/ispell.el (ispell-check-version): Use (with-temp-buffer) --- lisp/ChangeLog | 6 +++++- lisp/textmodes/ispell.el | 14 ++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6bdc92cf23d..626d38963c9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,10 @@ +2009-01-05 Agustín Martín + + * textmodes/ispell.el (ispell-check-version): Use (with-temp-buffer) + 2009-01-05 Richard M Stallman - * mail/sendmail.el (mail-bury): Treat pmail-mode like rmail-mode. + * mail/sendmail.el (mail-bury): Treat pmail-mode like rmail-mode. 2009-01-05 Martin Rudalics diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 50aa643b585..23a75369b38 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -744,18 +744,14 @@ Otherwise returns the library directory name, if that is defined." ;; all versions, since versions earlier than 3.0.09 didn't identify ;; themselves on startup. (interactive "p") - (let ((case-fold-search-val case-fold-search) - ;; avoid bugs when syntax of `.' changes in various default modes + (let (;; avoid bugs when syntax of `.' changes in various default modes (default-major-mode 'fundamental-mode) (default-directory (or (and (boundp 'temporary-file-directory) temporary-file-directory) default-directory)) result status ispell-program-version) - (save-excursion - (let ((buf (get-buffer " *ispell-tmp*"))) - (if buf (kill-buffer buf))) - (set-buffer (get-buffer-create " *ispell-tmp*")) - (erase-buffer) + + (with-temp-buffer (setq status (ispell-call-process ispell-program-name nil t nil ;; aspell doesn't accept the -vv switch. @@ -825,9 +821,7 @@ Otherwise returns the library directory name, if that is defined." (setq ispell-really-aspell nil))) (ispell-really-hunspell (or (ispell-check-minver hunspell8-minver ispell-really-hunspell) - (setq ispell-really-hunspell nil))))) - - (kill-buffer (current-buffer))) + (setq ispell-really-hunspell nil)))))) result)) (defun ispell-call-process (&rest args) -- 2.39.2