Mercurial > emacs
changeset 60530:32fd45514893
(ispell-insert-word): New function.
(ispell-word): Use ispell-insert-word to isnert a new word.
(ispell-process-line): Likewise
(ispell-complete-word): Likewise.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 09 Mar 2005 00:35:00 +0000 |
parents | 4358de407410 |
children | ad828b7dfd47 |
files | lisp/textmodes/ispell.el |
diffstat | 1 files changed, 11 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/textmodes/ispell.el Wed Mar 09 00:29:14 2005 +0000 +++ b/lisp/textmodes/ispell.el Wed Mar 09 00:35:00 2005 +0000 @@ -1406,6 +1406,14 @@ (setq more-lines (= 0 (forward-line)))))))))))))) +;; Insert WORD while translating Latin characters to the equivalent +;; characters that is supported by buffer-file-coding-system. + +(defun ispell-insert-word (word) + (let ((pos (point))) + (insert word) + (if (char-table-p translation-table-for-input) + (translate-region pos (point) translation-table-for-input)))) ;;;###autoload (defun ispell-word (&optional following quietly continue) @@ -1504,7 +1512,7 @@ (progn (delete-region start end) (setq start (point)) - (insert new-word) + (ispell-insert-word new-word) (setq end (point)))) (if (not (atom replace)) ;recheck spelling of replacement (progn @@ -2883,7 +2891,7 @@ (delete-region (point) (+ word-len (point))) (if (not (listp replace)) (progn - (insert replace) ; insert dictionary word + (ispell-insert-word replace) ; insert dictionary word (ispell-send-replacement (car poss) replace) (setq accept-list (cons replace accept-list))) (let ((replace-word (car replace))) @@ -3052,7 +3060,7 @@ (setq word (if (atom replacement) replacement (car replacement)) cursor-location (+ (- (length word) (- end start)) cursor-location)) - (insert word) + (ispell-insert-word word) (if (not (atom replacement)) ; recheck spelling of replacement. (progn (goto-char cursor-location)