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
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)
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")
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