/[emacs]/emacs/lisp/textmodes/ispell.el
ViewVC logotype

Diff of /emacs/lisp/textmodes/ispell.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.158 by rms, Sun Feb 27 10:37:13 2005 UTC revision 1.159 by handa, Wed Mar 9 00:35:00 2005 UTC
# Line 1406  This allows it to improve the suggestion Line 1406  This allows it to improve the suggestion
1406                            (setq more-lines (= 0 (forward-line))))))))))))))                            (setq more-lines (= 0 (forward-line))))))))))))))
1407    
1408    
1409    ;; Insert WORD while translating Latin characters to the equivalent
1410    ;; characters that is supported by buffer-file-coding-system.
1411    
1412    (defun ispell-insert-word (word)
1413      (let ((pos (point)))
1414        (insert word)
1415        (if (char-table-p translation-table-for-input)
1416            (translate-region pos (point) translation-table-for-input))))
1417    
1418  ;;;###autoload  ;;;###autoload
1419  (defun ispell-word (&optional following quietly continue)  (defun ispell-word (&optional following quietly continue)
# Line 1504  quit          spell session exited." Line 1512  quit          spell session exited."
1512                            (progn                            (progn
1513                              (delete-region start end)                              (delete-region start end)
1514                              (setq start (point))                              (setq start (point))
1515                              (insert new-word)                              (ispell-insert-word new-word)
1516                              (setq end (point))))                              (setq end (point))))
1517                        (if (not (atom replace)) ;recheck spelling of replacement                        (if (not (atom replace)) ;recheck spelling of replacement
1518                            (progn                            (progn
# Line 2883  Returns the sum shift due to changes in Line 2891  Returns the sum shift due to changes in
2891                (delete-region (point) (+ word-len (point)))                (delete-region (point) (+ word-len (point)))
2892                (if (not (listp replace))                (if (not (listp replace))
2893                    (progn                    (progn
2894                      (insert replace)    ; insert dictionary word                      (ispell-insert-word replace) ; insert dictionary word
2895                      (ispell-send-replacement (car poss) replace)                      (ispell-send-replacement (car poss) replace)
2896                      (setq accept-list (cons replace accept-list)))                      (setq accept-list (cons replace accept-list)))
2897                  (let ((replace-word (car replace)))                  (let ((replace-word (car replace)))
# Line 3052  Standard ispell choices are then availab Line 3060  Standard ispell choices are then availab
3060               (setq word (if (atom replacement) replacement (car replacement))               (setq word (if (atom replacement) replacement (car replacement))
3061                     cursor-location (+ (- (length word) (- end start))                     cursor-location (+ (- (length word) (- end start))
3062                                        cursor-location))                                        cursor-location))
3063               (insert word)               (ispell-insert-word word)
3064               (if (not (atom replacement)) ; recheck spelling of replacement.               (if (not (atom replacement)) ; recheck spelling of replacement.
3065                   (progn                   (progn
3066                     (goto-char cursor-location)                     (goto-char cursor-location)

Legend:
Removed from v.1.158  
changed lines
  Added in v.1.159

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26