Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
89970:a849e5779b8c | 89971:cce1c0ee76ee |
---|---|
721 (setq ispell-dictionary-alist | 721 (setq ispell-dictionary-alist |
722 (append ispell-local-dictionary-alist ; dictionary customizations | 722 (append ispell-local-dictionary-alist ; dictionary customizations |
723 ispell-dictionary-alist-1 ispell-dictionary-alist-2 | 723 ispell-dictionary-alist-1 ispell-dictionary-alist-2 |
724 ispell-dictionary-alist-3 ispell-dictionary-alist-4 | 724 ispell-dictionary-alist-3 ispell-dictionary-alist-4 |
725 ispell-dictionary-alist-5 ispell-dictionary-alist-6)) | 725 ispell-dictionary-alist-5 ispell-dictionary-alist-6)) |
726 | |
727 (defvar ispell-really-aspell nil) ; Non-nil if aspell extensions should be used | |
726 | 728 |
727 | 729 |
728 | 730 |
729 | 731 |
730 ;;; ********************************************************************** | 732 ;;; ********************************************************************** |
813 (match-beginning 2)(match-end 2)))) | 815 (match-beginning 2)(match-end 2)))) |
814 (car (cdr ispell-required-version))) | 816 (car (cdr ispell-required-version))) |
815 (< (car (read-from-string (buffer-substring-no-properties | 817 (< (car (read-from-string (buffer-substring-no-properties |
816 (match-beginning 3)(match-end 3)))) | 818 (match-beginning 3)(match-end 3)))) |
817 (car (cdr (cdr ispell-required-version))))) | 819 (car (cdr (cdr ispell-required-version))))) |
818 (setq ispell-offset 0))) | 820 (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)))) | |
819 (kill-buffer (current-buffer))) | 826 (kill-buffer (current-buffer))) |
820 result)) | 827 result)) |
821 | 828 |
822 | 829 |
823 | 830 |
1290 (point-min) (point-max)))) | 1297 (point-min) (point-max)))) |
1291 (ispell-filter t ispell-output) | 1298 (ispell-filter t ispell-output) |
1292 (save-excursion | 1299 (save-excursion |
1293 (set-buffer buf) | 1300 (set-buffer buf) |
1294 (erase-buffer))))))) | 1301 (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")))) | |
1295 | 1308 |
1296 | 1309 |
1297 (defun ispell-send-string (string) | 1310 (defun ispell-send-string (string) |
1298 "Send the string STRING to the Ispell process." | 1311 "Send the string STRING to the Ispell process." |
1299 (if ispell-async-processp | 1312 (if ispell-async-processp |
2839 (t ; replacement word selected or entered | 2852 (t ; replacement word selected or entered |
2840 (delete-region (point) (+ word-len (point))) | 2853 (delete-region (point) (+ word-len (point))) |
2841 (if (not (listp replace)) | 2854 (if (not (listp replace)) |
2842 (progn | 2855 (progn |
2843 (insert replace) ; insert dictionary word | 2856 (insert replace) ; insert dictionary word |
2857 (ispell-send-replacement (car poss) replace) | |
2844 (setq accept-list (cons replace accept-list))) | 2858 (setq accept-list (cons replace accept-list))) |
2845 (let ((replace-word (car replace))) | 2859 (let ((replace-word (car replace))) |
2846 ;; Recheck hand entered replacement word | 2860 ;; Recheck hand entered replacement word |
2847 (insert replace-word) | 2861 (insert replace-word) |
2862 (ispell-send-replacement (car poss) replace-word) | |
2848 (if (car (cdr replace)) | 2863 (if (car (cdr replace)) |
2849 (save-window-excursion | 2864 (save-window-excursion |
2850 (delete-other-windows) ; to correctly show help. | 2865 (delete-other-windows) ; to correctly show help. |
2851 ;; Assume case-replace & | 2866 ;; Assume case-replace & |
2852 ;; case-fold-search correct? | 2867 ;; case-fold-search correct? |