Standard ispell choices are then available."
;; FIXME: completion-at-point-function.
(interactive "P")
- (let ((cursor-location (point))
- (case-fold-search-val case-fold-search)
+ (let ((case-fold-search-val case-fold-search)
(word (ispell-get-word nil "\\*")) ; force "previous-word" processing.
start end possibilities replacement)
(setq start (car (cdr word))
(ispell-add-per-file-word-list word))
(replacement ; REPLACEMENT WORD
(delete-region start end)
- (setq word (if (atom replacement) replacement (car replacement))
- cursor-location (+ (- (length word) (- end start))
- cursor-location))
- (insert word)
- (if (not (atom replacement)) ; recheck spelling of replacement.
- (progn
- (goto-char cursor-location)
- (ispell-word nil t)))))
+ (insert (if (atom replacement) replacement (car replacement)))
+ (unless (atom replacement) ; recheck spelling of replacement.
+ (ispell-word nil t))))
(if (get-buffer ispell-choices-buffer)
(kill-buffer ispell-choices-buffer))))
- (ispell-pdict-save ispell-silently-savep)
- (goto-char cursor-location)))
+ (ispell-pdict-save ispell-silently-savep)))
;;;###autoload