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,v


From: Juri Linkov
Subject: [Emacs-diffs] Changes to emacs/lisp/textmodes/ispell.el,v
Date: Sun, 14 Oct 2007 20:40:53 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Juri Linkov <jurta>     07/10/14 20:40:53

Index: ispell.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/textmodes/ispell.el,v
retrieving revision 1.213
retrieving revision 1.214
diff -u -b -r1.213 -r1.214
--- ispell.el   13 Aug 2007 13:40:47 -0000      1.213
+++ ispell.el   14 Oct 2007 20:40:53 -0000      1.214
@@ -1594,8 +1594,12 @@
 quit          spell session exited."
 
   (interactive (list ispell-following-word ispell-quietly current-prefix-arg))
-  (if continue
-      (ispell-continue)
+  (cond
+   ((and transient-mark-mode mark-active
+        (not (eq (region-beginning) (region-end))))
+    (ispell-region (region-beginning) (region-end)))
+   (continue (ispell-continue))
+   (t
     (ispell-maybe-find-aspell-dictionaries)
     (ispell-accept-buffer-local-defs)  ; use the correct dictionary
     (let ((cursor-location (point))    ; retain cursor location
@@ -1690,7 +1694,7 @@
       ;; NB: Cancels ispell-quit incorrectly if called from ispell-region
       (if ispell-quit (setq ispell-quit nil replace 'quit))
       (goto-char cursor-location)      ; return to original location
-      replace)))
+      replace))))
 
 
 (defun ispell-get-word (following &optional extra-otherchars)
@@ -2683,7 +2687,7 @@
        (rstart (make-marker)))
   (unwind-protect
       (save-excursion
-       (message "Spell checking %s using %s with %s dictionary..."
+       (message "Spell-checking %s using %s with %s dictionary..."
                 (if (and (= reg-start (point-min)) (= reg-end (point-max)))
                     (buffer-name) "region")
                 (file-name-nondirectory ispell-program-name)
@@ -2782,7 +2786,9 @@
       (if (not recheckp) (set-marker ispell-region-end nil))
       ;; Only save if successful exit.
       (ispell-pdict-save ispell-silently-savep)
-      (message "Spell-checking using %s with %s dictionary done"
+      (message "Spell-checking %s using %s with %s dictionary done"
+              (if (and (= reg-start (point-min)) (= reg-end (point-max)))
+                  (buffer-name) "region")
               (file-name-nondirectory ispell-program-name)
               (or ispell-current-dictionary "default"))))))
 




reply via email to

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