|
From: | Andre Kuehne |
Subject: | Re: Newbie: Unable to write a custom function |
Date: | Sat, 02 Dec 2006 22:52:53 +0100 |
User-agent: | Thunderbird 1.5.0.7 (X11/20061109) |
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
[Prev in Thread] | Current Thread | [Next in Thread] |