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: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/lisp/textmodes/ispell.el,v
Date: Sat, 06 Sep 2008 20:07:49 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      08/09/06 20:07:49

Index: ispell.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/textmodes/ispell.el,v
retrieving revision 1.233
retrieving revision 1.234
diff -u -b -r1.233 -r1.234
--- ispell.el   28 Aug 2008 11:36:55 -0000      1.233
+++ ispell.el   6 Sep 2008 20:07:49 -0000       1.234
@@ -1858,14 +1858,23 @@
                  (let (message-log-max)
                    (message (concat "C-h or ? for more options; SPC to leave "
                                     "unchanged, Character to replace word")))
-                 (let ((inhibit-quit t))
-                   (setq char (if (fboundp 'read-char-exclusive)
-                                  (read-char-exclusive)
-                                (read-char))
-                         skipped 0)
-                   (if (or quit-flag (= char ?\C-g)) ; C-g is like typing X
-                       (setq char ?X
-                             quit-flag nil)))
+                 (let ((inhibit-quit t)
+                       (input-valid t))
+                   (setq char nil skipped 0)
+                   ;; If the user types C-g, or generates some other
+                   ;; non-character event (such as a frame switch
+                   ;; event), stop ispell.  As a special exception,
+                   ;; ignore mouse events occuring in the same frame.
+                   (while (and input-valid (not (characterp char)))
+                     (setq char (read-event))
+                     (setq input-valid
+                           (or (characterp char)
+                               (and (mouse-event-p char)
+                                    (eq (selected-frame)
+                                        (window-frame
+                                         (posn-window (event-start char))))))))
+                   (when (or quit-flag (not input-valid) (= char ?\C-g))
+                     (setq char ?X quit-flag nil)))
                  ;; Adjust num to array offset skipping command characters.
                  (let ((com-chars command-characters))
                    (while com-chars




reply via email to

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