help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: binding flyspell-correct-word to a key?


From: Kevin Rodgers
Subject: Re: binding flyspell-correct-word to a key?
Date: Fri, 19 May 2006 09:41:45 -0600
User-agent: Thunderbird 1.5.0.2 (Windows/20060308)

emacs user wrote:
would anyone happen to know how to bind flyspell-correct-word to a key
under xterm with no X-windows?  thanks...  EU

You can't, because that command requires an event argument via
(interactive "e"), and the Emacs Lisp manual explains the `e' code:

     The first or next mouse event in the key sequence that invoked the
     command.  More precisely, `e' gets events that are lists, so you
     can look at the data in the lists.  *Note Input Events::.  No I/O.

     You can use `e' more than once in a single command's interactive
     specification.  If the key sequence that invoked the command has N
     events that are lists, the Nth `e' provides the Nth such event.
     Events that are not lists, such as function keys and ASCII
     characters, do not count where `e' is concerned.

Maybe you could define a new command that calls flyspell-correct-word
with a synthetic generated event, and then bind the new command to a key. (The event is passed to mouse-set-point and flyspell-emacs-popup,
so it would have to satisfy whatever requirements/assumptions those
functions have.)

--
Kevin





reply via email to

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