From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: d7@thispla.net Newsgroups: gmane.emacs.help Subject: Re: Writing Emacs-function: how? Date: Tue, 21 Apr 2009 08:17:15 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1240375985 27406 80.91.229.12 (22 Apr 2009 04:53:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Apr 2009 04:53: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 Wed Apr 22 06:54:25 2009 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.50) id 1LwUTR-0003y2-Gz for geh-help-gnu-emacs@m.gmane.org; Wed, 22 Apr 2009 06:54:17 +0200 Original-Received: from localhost ([127.0.0.1]:59416 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LwUS2-0005qC-3x for geh-help-gnu-emacs@m.gmane.org; Wed, 22 Apr 2009 00:52:50 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!u8g2000yqn.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 14 Original-NNTP-Posting-Host: 212.126.215.62 Original-X-Trace: posting.google.com 1240327036 20284 127.0.0.1 (21 Apr 2009 15:17:16 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 21 Apr 2009 15:17:16 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: u8g2000yqn.googlegroups.com; posting-host=212.126.215.62; posting-account=6nLwcwoAAACyuDWy5iNg9hYCXPlbqduH User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8) Gecko/2009032711 Ubuntu/8.10 (intrepid) Firefox/3.0.8, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:168656 X-Mailman-Approved-At: Wed, 22 Apr 2009 00:52:12 -0400 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:63932 Archived-At: On Apr 21, 4:00=A0pm, harven wrote: > Only commands can be bound to keys. A command is a function > that can be called interactively with the M-x prefix e.g. M-x my-replace > The (interactive) line above turns the function my-replace into a command= . > Finally, you don't need to use re-search-forward, which deals with > regular expressions, but just the simpler command search-forward. > > Hope this helps Thanks very much, Ulrich