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/flyspell.el


From: Richard M . Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/textmodes/flyspell.el
Date: Tue, 28 Jun 2005 15:07:45 -0400

Index: emacs/lisp/textmodes/flyspell.el
diff -c emacs/lisp/textmodes/flyspell.el:1.69 
emacs/lisp/textmodes/flyspell.el:1.70
*** emacs/lisp/textmodes/flyspell.el:1.69       Tue Jun 14 11:36:04 2005
--- emacs/lisp/textmodes/flyspell.el    Tue Jun 28 19:07:45 2005
***************
*** 66,75 ****
      '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 ...                                           */
  ;*---------------------------------------------------------------------*/
--- 66,71 ----
***************
*** 403,436 ****
  ;*---------------------------------------------------------------------*/
  ;*    The minor mode declaration.                                      */
  ;*---------------------------------------------------------------------*/
- (eval-when-compile (defvar flyspell-local-mouse-map))
- 
  (defvar flyspell-mouse-map
    (let ((map (make-sparse-keymap)))
-     (if flyspell-use-meta-tab
-       (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 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)
!     map))
  
  (defvar flyspell-mode-map
    (let ((map (make-sparse-keymap)))
-     ;; mouse, keyboard bindings and misc definition
      (if flyspell-use-meta-tab
        (define-key map "\M-\t" 'flyspell-auto-correct-word))
!     (cond
!      ;; I don't understand this test, so I left it as is.  --Stef
!      ((or (featurep 'xemacs) flyspell-use-local-map)
!       (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)))
!     map))
! 
! ;; the name of the overlay property that defines the keymap
! (defvar flyspell-overlay-keymap-property-name 'keymap)
  
  ;; dash character machinery
  (defvar flyspell-consider-dash-as-word-delimiter-flag nil
--- 399,420 ----
  ;*---------------------------------------------------------------------*/
  ;*    The minor mode declaration.                                      */
  ;*---------------------------------------------------------------------*/
  (defvar flyspell-mouse-map
    (let ((map (make-sparse-keymap)))
      (define-key map (if (featurep 'xemacs) [button2] [down-mouse-2])
        #'flyspell-correct-word)
!     map)
!   "Keymap for Flyspell to put on erroneous words.")
  
  (defvar flyspell-mode-map
    (let ((map (make-sparse-keymap)))
      (if flyspell-use-meta-tab
        (define-key map "\M-\t" 'flyspell-auto-correct-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)
!     map)
!   "Minor mode keymap for Flyspell mode--for the whole buffer.")
  
  ;; dash character machinery
  (defvar flyspell-consider-dash-as-word-delimiter-flag nil
***************
*** 569,590 ****
    (let ((mode-predicate (get major-mode 'flyspell-mode-predicate)))
      (if mode-predicate
        (setq flyspell-generic-check-word-p mode-predicate)))
-   ;; work around the fact that the `local-map' text-property replaces the
-   ;; buffer's local map rather than shadowing it.
-   (set (make-local-variable 'flyspell-mouse-map)
-        (let ((map (copy-keymap flyspell-mouse-map)))
-        (set-keymap-parent map (current-local-map))
-        (if (and (eq flyspell-emacs 'emacs)
-                 (not (string< emacs-version "20")))
-            (define-key map '[tool-bar] nil))
-        map))
-   (set (make-local-variable 'flyspell-mode-map)
-        (let ((map (copy-keymap flyspell-mode-map)))
-        (set-keymap-parent map (current-local-map))
-        (if (and (eq flyspell-emacs 'emacs)
-                 (not (string< emacs-version "20")))
-            (define-key map '[tool-bar] nil))
-        map))
    ;; the welcome message
    (if (and flyspell-issue-message-flag
           flyspell-issue-welcome-flag
--- 553,558 ----
***************
*** 1570,1579 ****
      (overlay-put flyspell-overlay 'flyspell-overlay t)
      (overlay-put flyspell-overlay 'evaporate t)
      (overlay-put flyspell-overlay 'help-echo "mouse-2: correct word at point")
!     (if flyspell-use-local-map
!         (overlay-put flyspell-overlay
!                      flyspell-overlay-keymap-property-name
!                      flyspell-mouse-map))
      (when (eq face 'flyspell-incorrect)
        (and (stringp flyspell-before-incorrect-word-string)
             (overlay-put flyspell-overlay 'before-string
--- 1538,1544 ----
      (overlay-put flyspell-overlay 'flyspell-overlay t)
      (overlay-put flyspell-overlay 'evaporate t)
      (overlay-put flyspell-overlay 'help-echo "mouse-2: correct word at point")
!     (overlay-put flyspell-overlay 'keymap flyspell-mouse-map)
      (when (eq face 'flyspell-incorrect)
        (and (stringp flyspell-before-incorrect-word-string)
             (overlay-put flyspell-overlay 'before-string




reply via email to

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