From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Michael Slass Newsgroups: gmane.emacs.help Subject: Re: Word at cursor Date: Wed, 20 Nov 2002 19:24:22 GMT Organization: AT&T Broadband Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1037820296 28894 80.91.224.249 (20 Nov 2002 19:24:56 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 20 Nov 2002 19:24:56 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18EaSX-0007Tl-00 for ; Wed, 20 Nov 2002 20:24:25 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18EaUK-0004E6-00; Wed, 20 Nov 2002 14:26:16 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!wn14feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!sccrnsc04.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 20 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-NNTP-Posting-Host: 12.228.27.239 Original-X-Complaints-To: abuse@attbi.com Original-X-Trace: sccrnsc04 1037820262 12.228.27.239 (Wed, 20 Nov 2002 19:24:22 GMT) Original-NNTP-Posting-Date: Wed, 20 Nov 2002 19:24:22 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:107255 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:3810 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:3810 Peter Lee writes: >I have a lisp function that I would like to bind to a key such that >when I press a key it will call my function and pass as a parameter >the word under the cursor. > >I know this is probably trivial, but I'm not familiar with lisp at all >and any pointers would be appreciated. Thanks. ,----[ C-h f current-word RET ] | current-word is a compiled Lisp function in `simple'. | (current-word &optional STRICT) | | Return the word point is on (or a nearby word) as a string. | If optional arg STRICT is non-nil, return nil unless point is within | or adjacent to a word. `---- -- Mike Slass