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

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

Re: Binding meta and arrow


From: Ian Crowther
Subject: Re: Binding meta and arrow
Date: Sun, 15 May 2005 00:51:41 +0100

Just use a name of a function instead of the string.  For example:
    (global-set-key [M-left] 'beginning-of-line)
(The way you used global-set-key is meant for macros: the thing inside
quotes should be a sequence of one or more keys, it cannot be an
arbitrary string, and it certainly isn't displayed in the echo area,
it's fed back to the Emacs keyboard input.)

Well thanks, but I have exactly the same problem. If I do:

        (global-set-key [left] 'beginning-of-line)

it does exactly what I expect. I press left and it goes to the line start. The following still don't work:

        (global-set-key [M-left] 'beginning-of-line)
        (global-set-key [A-left] 'beginning-of-line)
        (global-set-key [alt left] 'beginning-of-line)
        (global-set-key [meta left] 'beginning-of-line)

After evaluating all of them I still get "ESC <left> is undefined" if I do "C-h c M-left".

Thanks for correcting my fumbled attempt at lisp, but I'm still stuck. Anybody got any other ideas?






reply via email to

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