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?




_______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Reply via email to