]> git.eshelyaron.com Git - emacs.git/commitdiff
(ispell-accept-output, ispell-command-loop): Use with-current-buffer.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 29 Aug 2009 14:48:10 +0000 (14:48 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 29 Aug 2009 14:48:10 +0000 (14:48 +0000)
lisp/ChangeLog
lisp/textmodes/ispell.el

index 528538545de5bee2aaefa5fc8032ac7f4f3b7105..f2743ad1ee881017b7927aa4eced399b201807af 100644 (file)
@@ -1,5 +1,8 @@
 2009-08-29  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * textmodes/ispell.el (ispell-accept-output, ispell-command-loop):
+       Use with-current-buffer.
+
        * emacs-lisp/bytecomp.el (byte-compile-const-symbol-p):
        Recognize immutable variables like most-positive-fixnum.
        (byte-compile-setq-default): Check and warn if trying to assign
index d8e89eb4b9dfcaafac3f6ee5836ac0f15cb969e1..c5beda5554a3b4514780f976ee35dd941dd78512 100644 (file)
@@ -1522,13 +1522,11 @@ pass it the output of the last ispell invocation."
            ispell-output)
        (if (not (bufferp buf))
            (setq ispell-filter nil)
-         (save-excursion
-           (set-buffer buf)
+         (with-current-buffer buf
            (setq ispell-output (buffer-substring-no-properties
                                 (point-min) (point-max))))
          (ispell-filter t ispell-output)
-         (save-excursion
-           (set-buffer buf)
+         (with-current-buffer buf
            (erase-buffer)))))))
 
 (defun ispell-send-replacement (misspelled replacement)
@@ -1871,8 +1869,7 @@ Global `ispell-quit' set to start location to continue spell session."
        char num result textwin dedicated-win)
 
     ;; setup the *Choices* buffer with valid data.
-    (save-excursion
-      (set-buffer (get-buffer-create ispell-choices-buffer))
+    (with-current-buffer (get-buffer-create ispell-choices-buffer)
       (setq mode-line-format
            (concat "--  %b  --  word: " word
                    "  --  dict: " (or ispell-current-dictionary "default")
@@ -2038,9 +2035,8 @@ Global `ispell-quit' set to start location to continue spell session."
                                     word)))
                      (if new-word
                          (progn
-                           (save-excursion
-                             (set-buffer (get-buffer-create
-                                          ispell-choices-buffer))
+                           (with-current-buffer (get-buffer-create
+                                                  ispell-choices-buffer)
                              (erase-buffer)
                              (setq count ?0
                                    skipped 0