# HG changeset patch # User Stefan Monnier # Date 1251557290 0 # Node ID e8247765661ab1e69c55c73faf6212b658751d20 # Parent ac32d8c1536f5fcf93de7b9ac52c5ce8ef37b3ec (ispell-accept-output, ispell-command-loop): Use with-current-buffer. diff -r ac32d8c1536f -r e8247765661a lisp/ChangeLog --- a/lisp/ChangeLog Sat Aug 29 14:46:56 2009 +0000 +++ b/lisp/ChangeLog Sat Aug 29 14:48:10 2009 +0000 @@ -1,5 +1,8 @@ 2009-08-29 Stefan Monnier + * 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 diff -r ac32d8c1536f -r e8247765661a lisp/textmodes/ispell.el --- a/lisp/textmodes/ispell.el Sat Aug 29 14:46:56 2009 +0000 +++ b/lisp/textmodes/ispell.el Sat Aug 29 14:48:10 2009 +0000 @@ -1522,13 +1522,11 @@ 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 @@ 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 @@ 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