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

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

Re: Elisp code to choose a region covering a word


From: Tassilo Horn
Subject: Re: Elisp code to choose a region covering a word
Date: Thu, 18 Nov 2010 13:10:35 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

Tassilo Horn <tassilo@member.fsf.org> writes:

Just one comment:

> (defun mark-next-word ()
>   (interactive)
>   (skip-chars-forward "[:space:]")
>   (set-mark (point))
>   (forward-word))

Most probably, it's better to use (push-mark) instead of (set-mark),
just like Deniz suggested.  That allows jumping back to the former mark
using `C-u C-SPC' (repeatedly).

Bye,
Tassilo




reply via email to

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