aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2009-08-29 14:48:10 +0000
committerStefan Monnier2009-08-29 14:48:10 +0000
commit0c3cc4dde115b83b9f3cb1f815ddd12404aee649 (patch)
tree0d44695650901c2bd678dae9940af73bf2b08aa8
parent3e344045c545c640b88df0ccdf2c36d66d0502af (diff)
downloademacs-0c3cc4dde115b83b9f3cb1f815ddd12404aee649.tar.gz
emacs-0c3cc4dde115b83b9f3cb1f815ddd12404aee649.zip
(ispell-accept-output, ispell-command-loop): Use with-current-buffer.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/textmodes/ispell.el14
2 files changed, 8 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 528538545de..f2743ad1ee8 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12009-08-29 Stefan Monnier <monnier@iro.umontreal.ca> 12009-08-29 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * textmodes/ispell.el (ispell-accept-output, ispell-command-loop):
4 Use with-current-buffer.
5
3 * emacs-lisp/bytecomp.el (byte-compile-const-symbol-p): 6 * emacs-lisp/bytecomp.el (byte-compile-const-symbol-p):
4 Recognize immutable variables like most-positive-fixnum. 7 Recognize immutable variables like most-positive-fixnum.
5 (byte-compile-setq-default): Check and warn if trying to assign 8 (byte-compile-setq-default): Check and warn if trying to assign
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index d8e89eb4b9d..c5beda5554a 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -1522,13 +1522,11 @@ pass it the output of the last ispell invocation."
1522 ispell-output) 1522 ispell-output)
1523 (if (not (bufferp buf)) 1523 (if (not (bufferp buf))
1524 (setq ispell-filter nil) 1524 (setq ispell-filter nil)
1525 (save-excursion 1525 (with-current-buffer buf
1526 (set-buffer buf)
1527 (setq ispell-output (buffer-substring-no-properties 1526 (setq ispell-output (buffer-substring-no-properties
1528 (point-min) (point-max)))) 1527 (point-min) (point-max))))
1529 (ispell-filter t ispell-output) 1528 (ispell-filter t ispell-output)
1530 (save-excursion 1529 (with-current-buffer buf
1531 (set-buffer buf)
1532 (erase-buffer))))))) 1530 (erase-buffer)))))))
1533 1531
1534(defun ispell-send-replacement (misspelled replacement) 1532(defun ispell-send-replacement (misspelled replacement)
@@ -1871,8 +1869,7 @@ Global `ispell-quit' set to start location to continue spell session."
1871 char num result textwin dedicated-win) 1869 char num result textwin dedicated-win)
1872 1870
1873 ;; setup the *Choices* buffer with valid data. 1871 ;; setup the *Choices* buffer with valid data.
1874 (save-excursion 1872 (with-current-buffer (get-buffer-create ispell-choices-buffer)
1875 (set-buffer (get-buffer-create ispell-choices-buffer))
1876 (setq mode-line-format 1873 (setq mode-line-format
1877 (concat "-- %b -- word: " word 1874 (concat "-- %b -- word: " word
1878 " -- dict: " (or ispell-current-dictionary "default") 1875 " -- dict: " (or ispell-current-dictionary "default")
@@ -2038,9 +2035,8 @@ Global `ispell-quit' set to start location to continue spell session."
2038 word))) 2035 word)))
2039 (if new-word 2036 (if new-word
2040 (progn 2037 (progn
2041 (save-excursion 2038 (with-current-buffer (get-buffer-create
2042 (set-buffer (get-buffer-create 2039 ispell-choices-buffer)
2043 ispell-choices-buffer))
2044 (erase-buffer) 2040 (erase-buffer)
2045 (setq count ?0 2041 (setq count ?0
2046 skipped 0 2042 skipped 0