emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/textmodes/ispell.el [lexbind]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/textmodes/ispell.el [lexbind]
Date: Wed, 15 Sep 2004 20:33:46 -0400

Index: emacs/lisp/textmodes/ispell.el
diff -c emacs/lisp/textmodes/ispell.el:1.131.2.6 
emacs/lisp/textmodes/ispell.el:1.131.2.7
*** emacs/lisp/textmodes/ispell.el:1.131.2.6    Sat Sep  4 09:28:13 2004
--- emacs/lisp/textmodes/ispell.el      Thu Sep 16 00:12:22 2004
***************
*** 724,729 ****
--- 724,731 ----
              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,821 ****
                 (< (car (read-from-string (buffer-substring-no-properties
                                            (match-beginning 3)(match-end 3))))
                    (car (cdr (cdr ispell-required-version)))))
!           (setq ispell-offset 0)))
        (kill-buffer (current-buffer)))
      result))
  
--- 817,828 ----
                 (< (car (read-from-string (buffer-substring-no-properties
                                            (match-beginning 3)(match-end 3))))
                    (car (cdr (cdr ispell-required-version)))))
!           (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,1298 ****
--- 1300,1311 ----
            (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,2850 ****
--- 2854,2865 ----
              (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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]