aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2008-04-26 20:14:30 +0000
committerGlenn Morris2008-04-26 20:14:30 +0000
commitf441b81f8174ba75a81f5cdcdac33f9cc9c27a78 (patch)
tree01bde29563f292666cd19d3080617ead95dd9259
parent9b59816e2322394464c66ed494d148401d1852f4 (diff)
downloademacs-f441b81f8174ba75a81f5cdcdac33f9cc9c27a78.tar.gz
emacs-f441b81f8174ba75a81f5cdcdac33f9cc9c27a78.zip
(ispell-insert-word): Revert previous change.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/textmodes/ispell.el16
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 @@
12008-04-26 Glenn Morris <rgm@gnu.org>
2
3 * textmodes/ispell.el (ispell-insert-word): Revert previous change.
4
5 * simple.el (quoted-insert, zap-to-char): Revert previous change.
6
12008-04-26 John Paul Wallington <jpw@pobox.com> 72008-04-26 John Paul Wallington <jpw@pobox.com>
2 8
3 * hexl.el (hexl-mode): Stash `eldoc-documentation-function' in 9 * 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."
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
1531;;;###autoload 1541;;;###autoload
1532(defun ispell-word (&optional following quietly continue region) 1542(defun ispell-word (&optional following quietly continue region)
1533 "Check spelling of word under or before the cursor. 1543 "Check spelling of word under or before the cursor.
@@ -1637,7 +1647,7 @@ quit spell session exited."
1637 ;; Insert first and then delete, 1647 ;; Insert first and then delete,
1638 ;; to avoid collapsing markers before and after 1648 ;; to avoid collapsing markers before and after
1639 ;; into a single place. 1649 ;; into a single place.
1640 (insert new-word) 1650 (ispell-insert-word new-word)
1641 (delete-region (point) end) 1651 (delete-region (point) end)
1642 ;; It is meaningless to preserve the cursor position 1652 ;; It is meaningless to preserve the cursor position
1643 ;; inside a word that has changed. 1653 ;; inside a word that has changed.
@@ -3068,7 +3078,7 @@ Returns the sum SHIFT due to changes in word replacements."
3068 (delete-region (point) (+ word-len (point))) 3078 (delete-region (point) (+ word-len (point)))
3069 (if (not (listp replace)) 3079 (if (not (listp replace))
3070 (progn 3080 (progn
3071 (insert replace) ; insert dictionary word 3081 (ispell-insert-word replace) ; insert dictionary word
3072 (ispell-send-replacement (car poss) replace) 3082 (ispell-send-replacement (car poss) replace)
3073 (setq accept-list (cons replace accept-list))) 3083 (setq accept-list (cons replace accept-list)))
3074 (let ((replace-word (car replace))) 3084 (let ((replace-word (car replace)))
@@ -3238,7 +3248,7 @@ Standard ispell choices are then available."
3238 (setq word (if (atom replacement) replacement (car replacement)) 3248 (setq word (if (atom replacement) replacement (car replacement))
3239 cursor-location (+ (- (length word) (- end start)) 3249 cursor-location (+ (- (length word) (- end start))
3240 cursor-location)) 3250 cursor-location))
3241 (insert word) 3251 (ispell-insert-word word)
3242 (if (not (atom replacement)) ; recheck spelling of replacement. 3252 (if (not (atom replacement)) ; recheck spelling of replacement.
3243 (progn 3253 (progn
3244 (goto-char cursor-location) 3254 (goto-char cursor-location)