unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Robert Knighten <RLK@knighten.org>
To: help-gnu-emacs@gnu.org
Subject: Re: highlight select whole word when in the middle shortcut
Date: Wed, 12 May 2010 00:02:30 -0700	[thread overview]
Message-ID: <86ljbpvbzt.fsf@zeus.knighten.org> (raw)
In-Reply-To: mailman.37.1273206036.9285.help-gnu-emacs@gnu.org

Kevin Rodgers <kevin.d.rodgers@gmail.com> writes:

> Colin S. Miller wrote:
>> mouezapeter wrote:
>>> Hi,
>>> If I am in the middle of the word "deduction", is there a shortcut to
>>> highlight,select the hole word ?
>>
>> Hi,
>> If you are using a GUI, then double-click on the word to select it.
>> Otherwise, add this to your .emacs, restart, and then press C-x w
>>
>> HTH,
>> Colin S. Miller
>>
>> (defun select-word-at-point ()
>>     (interactive)
>>     (let ((p (bounds-of-thing-at-point 'word)))
>>       (set-mark (car p))
>>       (exchange-point-and-mark)
>>       (set-mark (cdr p))
>>       ))
>>
>> (global-set-key '[(control x) (w)] 'select-word-at-point)
>
> M-x mark-word

That just marks to the end of the word.

-- 
Robert L. Knighten
RLK@knighten.org


  parent reply	other threads:[~2010-05-12  7:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-05  7:09 highlight select whole word when in the middle shortcut mouezapeter
2010-04-05 13:40 ` Colin S. Miller
2010-05-07  4:20   ` Kevin Rodgers
     [not found]   ` <mailman.37.1273206036.9285.help-gnu-emacs@gnu.org>
2010-05-12  7:02     ` Robert Knighten [this message]
2010-05-12 11:32       ` Scott Frazer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86ljbpvbzt.fsf@zeus.knighten.org \
    --to=rlk@knighten.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).