[Top][All Lists]

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

Re: address@hidden: Re: [Preview-latex-devel] CVS-1.42; scale function]

From: David Kastrup
Subject: Re: address@hidden: Re: [Preview-latex-devel] CVS-1.42; scale function]
Date: 08 Nov 2001 09:01:33 +0100

>>>>> "Richard" == Richard Stallman <address@hidden> writes:

    Richard>     The following patch seemingly fixes the problem for
    Richard>     me.  You'll probably want to make this only
    Richard>     conditionally when flyspell-use-local-map is t

    Richard> This "fix" simply turns off the flyspell.el mouse-2
    Richard> feature.

You have not actually tried it, have you?  I have.

The mouse-2 feature already gets provided by a 'keymap property
(actually, the 'local-map property since flyspell.el is lacking the
knowledge that Emacs-21 already has the 'keymap property) on the
overlay.  The minor map key binding is there from a time where the
overlay keymaps did not work, and so the entire buffer got overlayed
with a mouse-2 binding that tries to detect whether the mouse is
pressed in an overlay and if not, tries to do what the mousepress
would have done instead.  This fake key action ignores overlay keymaps
and thus destroys my bindings.

    Richard> That is too drastic; we should look for fixes that
    Richard> preserve the feature before we consider eliminating it.

Please try it out before doing such claims.  The feature fully
remains.  If you look at the DOC string for
flyspell-correct-word/local-keymap, it actually says

    emacs 19.xx seems to be buggous. Overlay keymap does not seems to
    work correctly with local map. That is, if a key is not defined
    for the overlay keymap, the current local map, is not checked. The
    binding is resolved with the global map. The consequence is that
    we can not use overlay map with flyspell.

Since we are now beyond Emacs 19.xx, the buffer-local keybinding is no
longer necessary, and things work perfectly well without.

    Richard> We don't yet know where the bug is.

    Richard>       In preview-latex, mouse-2 is bound to some
    Richard>     function, but when using it in conjunction with
    Richard>     flyspell, this function not work, and mouse-2 just
    Richard>     pastes the selection instead.

    Richard> flyspell provides a definition of defines mouse-2, but
    Richard> the definition does not paste.  So something very strange
    Richard> is happening, which is apparently not what flyspell is
    Richard> trying to do.

flyspell is trying to simulate not being active at all, but fails.  It
is easier to let flyspell not attempt something which is absolutely
and totally unnecessary than to try to improve its attempt at
simulating Emacs.

    Richard> On the contrary, the `local-map' property is NEWER than
    Richard> the `keymap' property.

While I don't know about the dates of the actual implementation, the
local-map property has been documented in Elisp manuals earlier than
has been the keymap property: only after the release of Emacs-21.1 has
the Elisp-21 manual mentioned the keymap property.  So pretest
programmers were naturally lead to use local-map, not knowing of
keymap.  The local-map property is for replacing the local keymap, the
keymap property is for augmenting it.  Clearly in most cases you would
want to use the keymap property.

David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: address@hidden

reply via email to

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