Mercurial > emacs
changeset 100920:cd88b4306232
textmodes/ispell.el (ispell-check-version): Use (with-temp-buffer)
author | Agustin Martin <agustin.martin@hispalinux.es> |
---|---|
date | Mon, 05 Jan 2009 17:45:53 +0000 |
parents | 7a103a2ee2ec |
children | ae6c8a6fe386 |
files | lisp/ChangeLog lisp/textmodes/ispell.el |
diffstat | 2 files changed, 9 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Mon Jan 05 16:06:19 2009 +0000 +++ b/lisp/ChangeLog Mon Jan 05 17:45:53 2009 +0000 @@ -1,6 +1,10 @@ +2009-01-05 Agustín Martín <agustin.martin@hispalinux.es> + + * textmodes/ispell.el (ispell-check-version): Use (with-temp-buffer) + 2009-01-05 Richard M Stallman <rms@gnu.org> - * 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 <rudalics@gmx.at>
--- a/lisp/textmodes/ispell.el Mon Jan 05 16:06:19 2009 +0000 +++ b/lisp/textmodes/ispell.el Mon Jan 05 17:45:53 2009 +0000 @@ -744,18 +744,14 @@ ;; 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 @@ (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)