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

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

Re: highlight select whole word when in the middle shortcut


From: Kevin Rodgers
Subject: Re: highlight select whole word when in the middle shortcut
Date: Thu, 06 May 2010 22:20:24 -0600
User-agent: Thunderbird 2.0.0.24 (Macintosh/20100228)

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

--
Kevin Rodgers
Denver, Colorado, USA





reply via email to

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