emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Flyspell-mode breaks CUA mode


From: Stefan Monnier
Subject: Re: Flyspell-mode breaks CUA mode
Date: Thu, 03 Nov 2005 23:19:41 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>     Why is it setting deactivate-mark?  I thought that was only set by the
>     sort of interactive command that shouldn't be used in hooks etc.,
>     which makes this problem sound more like a simple bug rather than a
>     design problem....

> Any change to the buffer sets deactivate-mark.  So flyspell's
> post-command-hook should bind deactivate-mark to prevent that.

I think this is too drastic.  We should first and foremost avoid running
"ispell -V" every time the post-command-hook is run.  And maybe we should
let bind deactivate-mark around ispell-check-version.  But maybe not around
the whole flyspell-post-command-hook.


        Stefan


> Does this fix it?

> *** flyspell.el       01 Nov 2005 20:34:12 -0500      1.83
> --- flyspell.el       03 Nov 2005 11:46:05 -0500      
> ***************
> *** 895,901 ****
>   (defun flyspell-post-command-hook ()
>     "The `post-command-hook' used by flyspell to check a word in-the-fly."
>     (interactive)
> !   (let ((command this-command))
>       (if (flyspell-check-pre-word-p)
>       (save-excursion
>         '(flyspell-debug-signal-pre-word-checked)
> --- 895,903 ----
>   (defun flyspell-post-command-hook ()
>     "The `post-command-hook' used by flyspell to check a word in-the-fly."
>     (interactive)
> !   (let ((command this-command)
> !     ;; Prevent anything we do from affecting the mark.
> !     deactivate-mark)
>       (if (flyspell-check-pre-word-p)
>       (save-excursion
>         '(flyspell-debug-signal-pre-word-checked)




reply via email to

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