]> code.delx.au - gnu-emacs/commitdiff
(flyspell-mouse-map): Pop the menu
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 16 Nov 2004 15:29:10 +0000 (15:29 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 16 Nov 2004 15:29:10 +0000 (15:29 +0000)
when pressing rather than when releasing mouse-2.  Simplify.

lisp/textmodes/flyspell.el

index 441d9972173fac20d12f94514fa33f332c8d83f9..01db2d64b27241e505e39dfdc332368fa4df027c 100644 (file)
@@ -1,6 +1,6 @@
 ;;; flyspell.el --- on-the-fly spell checker
 
-;; Copyright (C) 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2000, 2001, 2002, 2004  Free Software Foundation, Inc.
 
 ;; Author: Manuel Serrano <Manuel.Serrano@sophia.inria.fr>
 ;; Maintainer: FSF
@@ -391,13 +391,9 @@ property of the major mode name.")
 
 (defvar flyspell-mouse-map
   (let ((map (make-sparse-keymap)))
-    (cond
-     ((eq flyspell-emacs 'xemacs)
-      (define-key map [(button2)] #'flyspell-correct-word)
-      (define-key map "\M-\t" #'flyspell-auto-correct-word))
-     (flyspell-use-local-map
-      (define-key map [(mouse-2)] #'flyspell-correct-word)
-      (define-key map "\M-\t" #'flyspell-auto-correct-word)))
+    (define-key map (if (featurep 'xemacs) [button2] [down-mouse-2])
+      #'flyspell-correct-word)
+    (define-key map "\M-\t" #'flyspell-auto-correct-word)
     map))
 
 ;;;###autoload
@@ -2123,5 +2119,5 @@ This function is meant to be added to 'flyspell-incorrect-hook'."
 
 (provide 'flyspell)
 
-;;; arch-tag: 05d915b9-e9cf-44fb-9137-fc28f5eaab2a
+;; arch-tag: 05d915b9-e9cf-44fb-9137-fc28f5eaab2a
 ;;; flyspell.el ends here