all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Scott Frazer <frazer.scott@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: highlight select whole word when in the middle shortcut
Date: Wed, 12 May 2010 04:32:08 -0700 (PDT)	[thread overview]
Message-ID: <0bf6115d-74c6-4734-b69b-e8bb561ccb94@k2g2000yqe.googlegroups.com> (raw)
In-Reply-To: 86ljbpvbzt.fsf@zeus.knighten.org

On May 12, 3:02 am, Robert Knighten <R...@knighten.org> wrote:
> Kevin Rodgers <kevin.d.rodg...@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
> R...@knighten.org

I use this:

(defun my-select-word-at-point ()
  "Select the word at point."
  (interactive)
  (skip-syntax-forward "w_")
  (push-mark (point))
  (skip-syntax-backward "w_")
  (exchange-point-and-mark))


      reply	other threads:[~2010-05-12 11:32 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
2010-05-12 11:32       ` Scott Frazer [this message]

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

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

  git send-email \
    --in-reply-to=0bf6115d-74c6-4734-b69b-e8bb561ccb94@k2g2000yqe.googlegroups.com \
    --to=frazer.scott@gmail.com \
    --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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.