diff options
| author | Glenn Morris | 2008-04-26 02:41:13 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-04-26 02:41:13 +0000 |
| commit | 9563e7871e1b038e2d2293d068f7d41b259158c0 (patch) | |
| tree | e8a1c56ecfac27d92d06d3ff384387808469f74a | |
| parent | 307f35017fca93b67b10b13ec0b756b95d51e0b6 (diff) | |
| download | emacs-9563e7871e1b038e2d2293d068f7d41b259158c0.tar.gz emacs-9563e7871e1b038e2d2293d068f7d41b259158c0.zip | |
(ispell-insert-word): Remove, and replace with insert, now that
translation-table-for-input not needed.
| -rw-r--r-- | lisp/textmodes/ispell.el | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index f1e700a211a..17d72c3405e 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -1528,16 +1528,6 @@ This allows it to improve the suggestion list based on actual mispellings." | |||
| 1528 | (delete-region start (point))) | 1528 | (delete-region start (point))) |
| 1529 | (setq more-lines (= 0 (forward-line)))))))))))))) | 1529 | (setq more-lines (= 0 (forward-line)))))))))))))) |
| 1530 | 1530 | ||
| 1531 | |||
| 1532 | ;; Insert WORD while translating Latin characters to the equivalent | ||
| 1533 | ;; characters that is supported by buffer-file-coding-system. | ||
| 1534 | |||
| 1535 | (defun ispell-insert-word (word) | ||
| 1536 | (let ((pos (point))) | ||
| 1537 | (insert word) | ||
| 1538 | (if (char-table-p translation-table-for-input) | ||
| 1539 | (translate-region pos (point) translation-table-for-input)))) | ||
| 1540 | |||
| 1541 | ;;;###autoload | 1531 | ;;;###autoload |
| 1542 | (defun ispell-word (&optional following quietly continue region) | 1532 | (defun ispell-word (&optional following quietly continue region) |
| 1543 | "Check spelling of word under or before the cursor. | 1533 | "Check spelling of word under or before the cursor. |
| @@ -1647,7 +1637,7 @@ quit spell session exited." | |||
| 1647 | ;; Insert first and then delete, | 1637 | ;; Insert first and then delete, |
| 1648 | ;; to avoid collapsing markers before and after | 1638 | ;; to avoid collapsing markers before and after |
| 1649 | ;; into a single place. | 1639 | ;; into a single place. |
| 1650 | (ispell-insert-word new-word) | 1640 | (insert new-word) |
| 1651 | (delete-region (point) end) | 1641 | (delete-region (point) end) |
| 1652 | ;; It is meaningless to preserve the cursor position | 1642 | ;; It is meaningless to preserve the cursor position |
| 1653 | ;; inside a word that has changed. | 1643 | ;; inside a word that has changed. |
| @@ -3078,7 +3068,7 @@ Returns the sum SHIFT due to changes in word replacements." | |||
| 3078 | (delete-region (point) (+ word-len (point))) | 3068 | (delete-region (point) (+ word-len (point))) |
| 3079 | (if (not (listp replace)) | 3069 | (if (not (listp replace)) |
| 3080 | (progn | 3070 | (progn |
| 3081 | (ispell-insert-word replace) ; insert dictionary word | 3071 | (insert replace) ; insert dictionary word |
| 3082 | (ispell-send-replacement (car poss) replace) | 3072 | (ispell-send-replacement (car poss) replace) |
| 3083 | (setq accept-list (cons replace accept-list))) | 3073 | (setq accept-list (cons replace accept-list))) |
| 3084 | (let ((replace-word (car replace))) | 3074 | (let ((replace-word (car replace))) |
| @@ -3248,7 +3238,7 @@ Standard ispell choices are then available." | |||
| 3248 | (setq word (if (atom replacement) replacement (car replacement)) | 3238 | (setq word (if (atom replacement) replacement (car replacement)) |
| 3249 | cursor-location (+ (- (length word) (- end start)) | 3239 | cursor-location (+ (- (length word) (- end start)) |
| 3250 | cursor-location)) | 3240 | cursor-location)) |
| 3251 | (ispell-insert-word word) | 3241 | (insert word) |
| 3252 | (if (not (atom replacement)) ; recheck spelling of replacement. | 3242 | (if (not (atom replacement)) ; recheck spelling of replacement. |
| 3253 | (progn | 3243 | (progn |
| 3254 | (goto-char cursor-location) | 3244 | (goto-char cursor-location) |