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

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

Re: How to do this moving in emacs?


From: Alan
Subject: Re: How to do this moving in emacs?
Date: Sat, 19 Jul 2008 04:04:07 -0700 (PDT)
User-agent: G2/1.0

On Jul 14, 6:42 pm, anhnmncb <anhnm...@gmail.com> wrote:
> 1)
> M-f/b is for forward/backward words which is separated by non-charactor.
> Say, -->|-->|--->|--->|
>      foo-bar foo2-bar2
>     |<--|<--|<---|<---
>
> How can I make a function to move forward/backward words which are
> separated by space?
> Say, ------>|-------->|
>      foo-bar foo2-bar2
>     |<------|<--------
>
> 2)
> M-f is to forward to a word's ending, M-b is to beginning. Now I want to
> bind M-F to forward to a word's beginning, M-B is for ending, how to
> achieve it?
> Say, ---->|
>      foo   bar
>         |<----
> --
> Regards,
>
>   anhnmncb
>  gpg key: 44A31344

Another possibility is to evaluate

(modify-syntax-entry ?- "w")

in the buffer in which you wish to have M-F treat "-" as a word
character.

By evaluate, of course, I mean the following:

M-: (translated from <escape> :) runs the command eval-expression
  which is an interactive compiled Lisp function in `simple.el'.
It is bound to M-:, M-ESC :.
(eval-expression eval-expression-arg &optional
eval-expression-insert-value)


reply via email to

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