Commits

Anonymous committed 5553eb3

2002-08-29 Ville Skyttä <ville.skytta@xemacs.org>

* flyspell.el: Sync with upstream.
(flyspell-auto-correct-binding): New.
(flyspell-mouse-map): Use flyspell-auto-correct-binding.

Comments (0)

Files changed (2)

+2002-08-29  Ville Skyttä  <ville.skytta@xemacs.org>
+
+	* flyspell.el: Sync with upstream.
+	(flyspell-auto-correct-binding): New.
+	(flyspell-mouse-map): Use flyspell-auto-correct-binding.
+
 2002-08-23  Jari Aalto  <jari.aalto@poboxes.com>
 
 	* folding.el: 1.10 (folding-uninstall-hooks): 2.105 
   :group 'processes)
 
 ;*---------------------------------------------------------------------*/
+;*    Which emacs are we currently running                             */
+;*---------------------------------------------------------------------*/
+(defvar flyspell-emacs
+  (cond
+   ((string-match "XEmacs" emacs-version)
+    'xemacs)
+   (t
+    'emacs))
+  "The type of Emacs we are currently running.")
+
+(defvar flyspell-use-local-map
+  (or (eq flyspell-emacs 'xemacs)
+      (not (string< emacs-version "20"))))
+
+;*---------------------------------------------------------------------*/
 ;*    User configuration ...                                           */
 ;*---------------------------------------------------------------------*/
 (defcustom flyspell-highlight-flag t
   :group 'flyspell
   :type 'boolean)
 
+(defcustom flyspell-auto-correct-binding
+  (cond
+   ((eq flyspell-emacs 'xemacs)
+    [(control \;)])
+   (t
+    [?\C-\;]))
+  "The key binding for flyspell auto correction."
+  :group 'flyspell)
+
 ;*---------------------------------------------------------------------*/
 ;*    Mode specific options                                            */
 ;*    -------------------------------------------------------------    */
 (autoload 'previous-overlay-change "overlay" "Overlay compatibility kit." t)
 
 ;*---------------------------------------------------------------------*/
-;*    Which emacs are we currently running                             */
-;*---------------------------------------------------------------------*/
-(defvar flyspell-emacs
-  (cond
-   ((string-match "XEmacs" emacs-version)
-    'xemacs)
-   (t
-    'emacs))
-  "The type of Emacs we are currently running.")
-
-(defvar flyspell-use-local-map
-  (or (eq flyspell-emacs 'xemacs)
-      (not (string< emacs-version "20"))))
-
-;*---------------------------------------------------------------------*/
 ;*    The minor mode declaration.                                      */
 ;*---------------------------------------------------------------------*/
 (eval-when-compile (defvar flyspell-local-mouse-map))
       (define-key map [(button2)] #'flyspell-correct-word)
       (if flyspell-use-meta-tab
 	  (define-key map "\M-\t" #'flyspell-auto-correct-word))
-      ;; XEmacs change: C-/ is bound to undo, so revert back to C-;
-      (define-key map [(control \;)] 'flyspell-auto-correct-previous-word)
+      (define-key map flyspell-auto-correct-binding 'flyspell-auto-correct-previous-word)
       (define-key map [(control \,)] 'flyspell-goto-next-error)
       (define-key map [(control \.)] 'flyspell-auto-correct-word))
      (flyspell-use-local-map
       (define-key map [(down-mouse-2)] #'flyspell-correct-word)
       (if flyspell-use-meta-tab
 	  (define-key map "\M-\t" #'flyspell-auto-correct-word))
-      ;; XEmacs change: C-/ is bound to undo, so revert back to C-;
-      (define-key map [?\C-\;] 'flyspell-auto-correct-previous-word)
+      (define-key map flyspell-auto-correct-binding 'flyspell-auto-correct-previous-word)
       (define-key map [?\C-\,] 'flyspell-goto-next-error)
       (define-key map [?\C-\.] 'flyspell-auto-correct-word)))
     map))
       (define-key flyspell-mode-map "\M-\t" 'flyspell-auto-correct-word))
   (cond
    ((eq flyspell-emacs 'xemacs)
-    ;; XEmacs change: C-/ is bound to undo, so revert back to C-;
-    (define-key flyspell-mode-map [(control \;)] 'flyspell-auto-correct-previous-word)
+    (define-key flyspell-mode-map flyspell-auto-correct-binding 'flyspell-auto-correct-previous-word)
     (define-key flyspell-mode-map [(control \,)] 'flyspell-goto-next-error)
     (define-key flyspell-mode-map [(control \.)] 'flyspell-auto-correct-word))
    (flyspell-use-local-map
-    ;; XEmacs change: C-/ is bound to undo, so revert back to C-;
-    (define-key flyspell-mode-map [?\C-\;] 'flyspell-auto-correct-previous-word)
+    (define-key flyspell-mode-map flyspell-auto-correct-binding 'flyspell-auto-correct-previous-word)
     (define-key flyspell-mode-map [?\C-\,] 'flyspell-goto-next-error)
     (define-key flyspell-mode-map [?\C-\.] 'flyspell-auto-correct-word))))