From f441b81f8174ba75a81f5cdcdac33f9cc9c27a78 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 26 Apr 2008 20:14:30 +0000 Subject: [PATCH] (ispell-insert-word): Revert previous change. --- lisp/ChangeLog | 6 ++++++ lisp/textmodes/ispell.el | 16 +++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 453341a89b4..e9ba1a706e6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2008-04-26 Glenn Morris + + * textmodes/ispell.el (ispell-insert-word): Revert previous change. + + * simple.el (quoted-insert, zap-to-char): Revert previous change. + 2008-04-26 John Paul Wallington * hexl.el (hexl-mode): Stash `eldoc-documentation-function' in diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 17d72c3405e..f1e700a211a 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -1528,6 +1528,16 @@ This allows it to improve the suggestion list based on actual mispellings." (delete-region start (point))) (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 region) "Check spelling of word under or before the cursor. @@ -1637,7 +1647,7 @@ quit spell session exited." ;; Insert first and then delete, ;; to avoid collapsing markers before and after ;; into a single place. - (insert new-word) + (ispell-insert-word new-word) (delete-region (point) end) ;; It is meaningless to preserve the cursor position ;; inside a word that has changed. @@ -3068,7 +3078,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))) @@ -3238,7 +3248,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) -- 2.11.4.GIT