From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andre Kuehne Newsgroups: gmane.emacs.help Subject: Re: Newbie: Unable to write a custom function Date: Sat, 02 Dec 2006 22:52:53 +0100 Message-ID: <4571F5B5.8050306@gmx.net> References: <1165094606.836594.304590@j72g2000cwa.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1165096338 32080 80.91.229.2 (2 Dec 2006 21:52:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 2 Dec 2006 21:52:18 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Dec 02 22:52:13 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Gqcm5-0002tS-KO for geh-help-gnu-emacs@m.gmane.org; Sat, 02 Dec 2006 22:51:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gqcm5-0006Ka-AY for geh-help-gnu-emacs@m.gmane.org; Sat, 02 Dec 2006 16:51:57 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gqclr-0006JF-9y for help-gnu-emacs@gnu.org; Sat, 02 Dec 2006 16:51:43 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gqclp-0006Ha-EP for help-gnu-emacs@gnu.org; Sat, 02 Dec 2006 16:51:42 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gqclp-0006HE-96 for help-gnu-emacs@gnu.org; Sat, 02 Dec 2006 16:51:41 -0500 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1Gqclo-0002th-VO for help-gnu-emacs@gnu.org; Sat, 02 Dec 2006 16:51:41 -0500 Original-Received: (qmail invoked by alias); 02 Dec 2006 21:51:39 -0000 Original-Received: from i53874961.versanet.de (EHLO [192.168.1.3]) [83.135.73.97] by mail.gmx.net (mp033) with SMTP; 02 Dec 2006 22:51:39 +0100 X-Authenticated: #19272812 User-Agent: Thunderbird 1.5.0.7 (X11/20061109) Original-To: deech In-Reply-To: <1165094606.836594.304590@j72g2000cwa.googlegroups.com> X-Y-GMX-Trusted: 0 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:39215 Archived-At: deech wrote: > Hi all, > I am new to Emacs. I have written a new search function into my .emacs > file but I am unable to invoke it with M-x when I restart Emacs. There > are no error messages when Emacs starts up. Here is the code: > > ;;Search backwards from a point for a string. If found delete > ;;all characters from that string to the point. > ;;Eg Given the argument 't', 'alligator' becomes 'alliga' > (defun isearch-backward-tophrase () > (set-mark-command ()) > (isearch-backward ) > (kill-region ()()) > ) > > Any idea what I am doing wrong? You have to use the (interactive) special form to make your funtion invokable with M-x: (defun isearch-backward-tophrase () (interactive) ... Regards Andre > Thanks... > Deech > > _______________________________________________ > help-gnu-emacs mailing list > help-gnu-emacs@gnu.org > http://lists.gnu.org/mailman/listinfo/help-gnu-emacs >