diff options
author | Kenichi Handa <handa@m17n.org> | 2005-03-09 00:36:22 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2005-03-09 00:36:22 +0000 |
commit | ca8d88cd7d73b571b1146c0d34d6fa6d35ba02ba (patch) | |
tree | 91646b5e994dbc4f0889626d9ec36384710d0e3e | |
parent | 91199264e3bbe734bfc6cf87ed8be6cd8dbc84c6 (diff) | |
download | emacs-ca8d88cd7d73b571b1146c0d34d6fa6d35ba02ba.tar.gz emacs-ca8d88cd7d73b571b1146c0d34d6fa6d35ba02ba.tar.bz2 emacs-ca8d88cd7d73b571b1146c0d34d6fa6d35ba02ba.zip |
(ispell-insert-word): New function.
(ispell-word): Use ispell-insert-word to isnert a new word.
(ispell-process-line): Likewise
(ispell-complete-word): Likewise.
-rw-r--r-- | lisp/ChangeLog | 7 | ||||
-rw-r--r-- | lisp/textmodes/ispell.el | 14 |
2 files changed, 18 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b6c12f436f3..34e01b40854 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2005-03-09 Kenichi Handa <handa@m17n.org> + + * textmodes/ispell.el (ispell-insert-word): New function. + (ispell-word): Use ispell-insert-word to isnert a new word. + (ispell-process-line): Likewise + (ispell-complete-word): Likewise. + 2005-03-09 Glenn Morris <gmorris@ast.cam.ac.uk> * calendar/calendar.el (redraw-calendar): Preserve point. diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 2a84d584634..38f69bd2250 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -1406,6 +1406,14 @@ This allows it to improve the suggestion list based on actual mispellings." (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 @@ quit spell session exited." (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 @@ Returns the sum shift due to changes in word replacements." (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 @@ Standard ispell choices are then available." (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) |