From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: highlight select whole word when in the middle shortcut Date: Thu, 06 May 2010 22:20:24 -0600 Message-ID: References: <8481edba-6131-49c8-9d6c-7b9cb1b8fd9f@q16g2000yqq.googlegroups.com> <4bb9e7f7$0$280$14726298@news.sunsite.dk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1273206065 5021 80.91.229.12 (7 May 2010 04:21:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 7 May 2010 04:21:05 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 07 06:21:04 2010 connect(): No such file or directory Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OAF3g-0000Ss-1j for geh-help-gnu-emacs@m.gmane.org; Fri, 07 May 2010 06:21:04 +0200 Original-Received: from localhost ([127.0.0.1]:56374 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OAF3f-0002r2-Bl for geh-help-gnu-emacs@m.gmane.org; Fri, 07 May 2010 00:21:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OAF3C-0002nn-E4 for help-gnu-emacs@gnu.org; Fri, 07 May 2010 00:20:34 -0400 Original-Received: from [140.186.70.92] (port=58766 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OAF3B-0002lt-5S for help-gnu-emacs@gnu.org; Fri, 07 May 2010 00:20:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OAF39-0006TL-VX for help-gnu-emacs@gnu.org; Fri, 07 May 2010 00:20:33 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:51243) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OAF39-0006TF-P2 for help-gnu-emacs@gnu.org; Fri, 07 May 2010 00:20:31 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OAF35-0000II-F2 for help-gnu-emacs@gnu.org; Fri, 07 May 2010 06:20:27 +0200 Original-Received: from c-71-237-24-138.hsd1.co.comcast.net ([71.237.24.138]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 May 2010 06:20:27 +0200 Original-Received: from kevin.d.rodgers by c-71-237-24-138.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 May 2010 06:20:27 +0200 X-Injected-Via-Gmane: http://gmane.org/ connect(): No such file or directory Original-Lines: 28 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-71-237-24-138.hsd1.co.comcast.net User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) In-Reply-To: <4bb9e7f7$0$280$14726298@news.sunsite.dk> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:73550 Archived-At: 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