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

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

Re: how to add button to emacs that play a elisp code


From: Emanuel Berg
Subject: Re: how to add button to emacs that play a elisp code
Date: Fri, 12 Sep 2014 21:33:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Renato Pontefice <address@hidden> writes:

> Hi, Ive found, that maybe, there is another
> parenthesis / maybe the last one,
>
> I-ve erased it and emacs start without error, but if
> I press Alt/Shift/ A, nothing happens.

OK, let's take this from the beginning, as this thread
spun out a bit.

What do you want to do? Do you want to set M-A to do
`backward-word'?

M-A is the Emacs notation for Alt, Shift, and a.
Because Emacs relies heavily on shortcuts, that notation
(M-A) is better as it is shorter to type and more
compact to read.

It may be a bad idea to use M-A for `backward-word'.
M-a (note lowercase "a") is already
`backward-sentence', and you don't want to get those
mixed up.

Also, backward-word is something you do all the time.
By default, backward-word is `M-b'. Most people would
say that M-b is better than M-a for at least two
reasons: 1) M-b involves two keys, and M-A three. 2)
M-b involves both hands, and such commands are
generally speaking easier to type: compare, from the
Unix/Linux world: ls, cp, mv, ps, du...

But, after all is said and done, if you still want
`M-A', this will do it:

(global-set-key (kbd "M-A") 'backward-word)

Unless there is a mode or local keybinding that is also
`M-A'. But, for the reasons above, I think that is
unlikely, so M-A should work after you evaluate the
above Elisp.

If it doesn't, use `C-h k' and hit `M-A'. What does it
say?

-- 
underground experts united


reply via email to

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