GNU bug report logs - #26672
25.2; Flyspell overlay conflicts with table.el

Previous Next

Package: emacs;

Reported by: Allen Li <vianchielfaura <at> gmail.com>

Date: Wed, 26 Apr 2017 22:01:02 UTC

Severity: normal

Found in version 25.2

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Allen Li <vianchielfaura <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 26672 <at> debbugs.gnu.org
Subject: bug#26672: 25.2; Flyspell overlay conflicts with table.el
Date: Sat, 29 Apr 2017 14:42:15 -0700
Works, thanks, although I had to rebase the patch on emacs-25 branch
as I couldn't get the master branch to compile.

On Sat, Apr 29, 2017 at 2:09 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> From: Allen Li <vianchielfaura <at> gmail.com>
>> Date: Fri, 28 Apr 2017 21:19:38 -0700
>> Cc: 26672 <at> debbugs.gnu.org
>>
>> 1. emacs -Q
>> 2. M-x flyspell-mode
>> 3. M-x table-insert RET RET RET ... (the defaults are fine)
>> 4. apple M-b TAB (apple is spelled correctly, TAB works)
>> 5. asdf M-b TAB (wait for flyspell to mark the misspelling, TAB doesn't work)
>
> Thanks.  Does the change below give good results?
>
> diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
> index 0edf9b1..ecf729d 100644
> --- a/lisp/textmodes/flyspell.el
> +++ b/lisp/textmodes/flyspell.el
> @@ -447,7 +447,9 @@ flyspell-prog-mode
>  ;;*    The minor mode declaration.                                      */
>  ;;*---------------------------------------------------------------------*/
>  (defvar flyspell-mouse-map
> -  (make-sparse-keymap)
> +  (let ((map (make-sparse-keymap)))
> +    (define-key map [mouse-2] 'flyspell-correct-word)
> +    map)
>    "Keymap for Flyspell to put on erroneous words.")
>
>  (defvar flyspell-mode-map
> @@ -1759,6 +1761,9 @@ make-flyspell-overlay
>      (overlay-put overlay 'flyspell-overlay t)
>      (overlay-put overlay 'evaporate t)
>      (overlay-put overlay 'help-echo "mouse-2: correct word at point")
> +    ;; If misspelled text has a 'keymap' property, let that remain in
> +    ;; effect for the bindings that flyspell-mouse-map doesn't override.
> +    (set-keymap-parent flyspell-mouse-map (get-char-property beg 'keymap))
>      (overlay-put overlay 'keymap flyspell-mouse-map)
>      (when (eq face 'flyspell-incorrect)
>        (and (stringp flyspell-before-incorrect-word-string)




This bug report was last modified 8 years and 108 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.