/[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.140.2.3 by miles, Sat Sep 4 09:14:25 2004 UTC revision 1.140.2.4 by miles, Thu Sep 9 09:36:33 2004 UTC
# Line 724  LANGUAGE.aff file \(e.g., english.aff\). Line 724  LANGUAGE.aff file \(e.g., english.aff\).
724                ispell-dictionary-alist-3 ispell-dictionary-alist-4                ispell-dictionary-alist-3 ispell-dictionary-alist-4
725                ispell-dictionary-alist-5 ispell-dictionary-alist-6))                ispell-dictionary-alist-5 ispell-dictionary-alist-6))
726    
727    (defvar ispell-really-aspell nil) ; Non-nil if aspell extensions should be used
728    
729    
730    
731    
# Line 815  Otherwise returns the library directory Line 817  Otherwise returns the library directory
817                   (< (car (read-from-string (buffer-substring-no-properties                   (< (car (read-from-string (buffer-substring-no-properties
818                                              (match-beginning 3)(match-end 3))))                                              (match-beginning 3)(match-end 3))))
819                      (car (cdr (cdr ispell-required-version)))))                      (car (cdr (cdr ispell-required-version)))))
820              (setq ispell-offset 0)))            (setq ispell-offset 0))
821            ;; Check to see if it's really aspell.
822            (goto-char (point-min))
823            (let (case-fold-search)
824              (setq ispell-really-aspell
825                    (and (search-forward "(but really Aspell " nil t) t))))
826        (kill-buffer (current-buffer)))        (kill-buffer (current-buffer)))
827      result))      result))
828    
# Line 1293  pass it the output of the last ispell in Line 1300  pass it the output of the last ispell in
1300              (set-buffer buf)              (set-buffer buf)
1301              (erase-buffer)))))))              (erase-buffer)))))))
1302    
1303    (defun ispell-send-replacement (misspelled replacement)
1304      "Notify aspell that MISSPELLED should be spelled REPLACEMENT.
1305    This allows it to improve the suggestion list based on actual mispellings."
1306      (and ispell-really-aspell
1307           (ispell-send-string (concat "$$ra " misspelled "," replacement "\n"))))
1308    
1309    
1310  (defun ispell-send-string (string)  (defun ispell-send-string (string)
1311    "Send the string STRING to the Ispell process."    "Send the string STRING to the Ispell process."
# Line 2841  Returns the sum shift due to changes in Line 2854  Returns the sum shift due to changes in
2854                (if (not (listp replace))                (if (not (listp replace))
2855                    (progn                    (progn
2856                      (insert replace)    ; insert dictionary word                      (insert replace)    ; insert dictionary word
2857                        (ispell-send-replacement (car poss) replace)
2858                      (setq accept-list (cons replace accept-list)))                      (setq accept-list (cons replace accept-list)))
2859                  (let ((replace-word (car replace)))                  (let ((replace-word (car replace)))
2860                    ;; Recheck hand entered replacement word                    ;; Recheck hand entered replacement word
2861                    (insert replace-word)                    (insert replace-word)
2862                      (ispell-send-replacement (car poss) replace-word)
2863                    (if (car (cdr replace))                    (if (car (cdr replace))
2864                        (save-window-excursion                        (save-window-excursion
2865                          (delete-other-windows) ; to correctly show help.                          (delete-other-windows) ; to correctly show help.

Legend:
Removed from v.1.140.2.3  
changed lines
  Added in v.1.140.2.4

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