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

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

Re: Changing behavior of backward-word?


From: Tim X
Subject: Re: Changing behavior of backward-word?
Date: Wed, 08 Dec 2010 15:35:17 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Elena <egarrulo@gmail.com> writes:

> On Oct 31, 10:27 pm, Johan Json <wow...@gmail.com> wrote:
>> Afterthought, would this possibly break other user modes dependant on
>> key M-b and/or 'backward-word'?
>
> It would not.  This is basic Emacs customization.  Here is the code:
>
> (defun my-backward-word ()
>   (interactive)
>   (backward-word)
>   (backward-char))
>
> (global-set-key (kbd "M-b") #'my-backward-word)

Keeping in mind of course that if any mode rebinds M-b in a local key
map, it will override the global definition. However, this would
normally indicate the mode defines a new interpretation for
backward-word and that interpretation probably makes more sense
(otherwise the mode would not bother). If you notice your backward word
behavior does not seem to work in some specific mode, this is likely the
reason. 

Tim

-- 
tcross (at) rapttech dot com dot au


reply via email to

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