From: Allen Li <vianchielfaura@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 26672@debbugs.gnu.org
Subject: bug#26672: 25.2; Flyspell overlay conflicts with table.el
Date: Sat, 29 Apr 2017 14:42:15 -0700 [thread overview]
Message-ID: <CAJr1M6cjwTekYcxwkqpRB8YBgGiJfzLMrWynT2GuM=tU8y1pkg@mail.gmail.com> (raw)
In-Reply-To: <8360hnmvgr.fsf@gnu.org>
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@gnu.org> wrote:
>> From: Allen Li <vianchielfaura@gmail.com>
>> Date: Fri, 28 Apr 2017 21:19:38 -0700
>> Cc: 26672@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)
next prev parent reply other threads:[~2017-04-29 21:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-26 22:00 bug#26672: 25.2; Flyspell overlay conflicts with table.el Allen Li
2017-04-28 9:10 ` Eli Zaretskii
2017-04-29 4:19 ` Allen Li
2017-04-29 9:09 ` Eli Zaretskii
2017-04-29 21:42 ` Allen Li [this message]
2017-04-30 18:57 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJr1M6cjwTekYcxwkqpRB8YBgGiJfzLMrWynT2GuM=tU8y1pkg@mail.gmail.com' \
--to=vianchielfaura@gmail.com \
--cc=26672@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).