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

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

Re: Skipping words with C-<right> like other editors do


From: Emanuel Berg
Subject: Re: Skipping words with C-<right> like other editors do
Date: Mon, 16 Apr 2018 00:17:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Skip Montanaro wrote:

> I think you probably want to tweak the
> relevant syntax table

You can use this (source last) as a template
for experimentation. Do `backward-word' and
`bwe' with point at the end of "g.args" and see
what happens.

This is done in the code with

    ?. "w"

which means, I think, that a point (full stop,
".") is considered a part of a word, so
`backward-word' shouldn't stop at it
but continue.

Perhaps there is a package that does what the
OP wants tho.

(defun backward-word-experiment ()
  (interactive)
  (let ((temp-st (make-syntax-table)))
    (modify-syntax-entry ?. "w" temp-st)
    (with-syntax-table temp-st
      (backward-word 1) )))
(defalias 'bwe 'backward-word-experiment)
;; never fear, g.args is here

-- 
underground experts united
http://user.it.uu.se/~embe8573


reply via email to

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