Mercurial > emacs
diff lisp/textmodes/ispell.el @ 89971:cce1c0ee76ee
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-36
Merge from emacs--cvs-trunk--0, emacs--gnus--5.10, gnus--rel--5.10
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Merge from emacs--gnus--5.10, gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-524
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-534
Update from CVS
* miles@gnu.org--gnu-2004/emacs--gnus--5.10--base-0
tag of miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-464
* miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-1
Import from CVS branch gnus-5_10-branch
* miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-2
Merge from lorentey@elte.hu--2004/emacs--multi-tty--0, emacs--cvs-trunk--0
* miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-3
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-4
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-18
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-19
Remove autoconf-generated files from archive
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-20
Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Thu, 09 Sep 2004 09:36:36 +0000 |
parents | 3219f94257bc 09766a703f68 |
children | f3ec05478165 |
line wrap: on
line diff
--- a/lisp/textmodes/ispell.el Sun Sep 05 01:53:47 2004 +0000 +++ b/lisp/textmodes/ispell.el Thu Sep 09 09:36:36 2004 +0000 @@ -724,6 +724,8 @@ ispell-dictionary-alist-3 ispell-dictionary-alist-4 ispell-dictionary-alist-5 ispell-dictionary-alist-6)) +(defvar ispell-really-aspell nil) ; Non-nil if aspell extensions should be used + @@ -815,7 +817,12 @@ (< (car (read-from-string (buffer-substring-no-properties (match-beginning 3)(match-end 3)))) (car (cdr (cdr ispell-required-version))))) - (setq ispell-offset 0))) + (setq ispell-offset 0)) + ;; Check to see if it's really aspell. + (goto-char (point-min)) + (let (case-fold-search) + (setq ispell-really-aspell + (and (search-forward "(but really Aspell " nil t) t)))) (kill-buffer (current-buffer))) result)) @@ -1293,6 +1300,12 @@ (set-buffer buf) (erase-buffer))))))) +(defun ispell-send-replacement (misspelled replacement) + "Notify aspell that MISSPELLED should be spelled REPLACEMENT. +This allows it to improve the suggestion list based on actual mispellings." + (and ispell-really-aspell + (ispell-send-string (concat "$$ra " misspelled "," replacement "\n")))) + (defun ispell-send-string (string) "Send the string STRING to the Ispell process." @@ -2841,10 +2854,12 @@ (if (not (listp replace)) (progn (insert replace) ; insert dictionary word + (ispell-send-replacement (car poss) replace) (setq accept-list (cons replace accept-list))) (let ((replace-word (car replace))) ;; Recheck hand entered replacement word (insert replace-word) + (ispell-send-replacement (car poss) replace-word) (if (car (cdr replace)) (save-window-excursion (delete-other-windows) ; to correctly show help.