From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Perry Smith Newsgroups: gmane.emacs.help Subject: Re: How do I make an Emacs-Lisp function available via M-x ? Date: Wed, 29 Nov 2006 08:18:48 -0600 Message-ID: <95B6B900-8BC8-4CED-B02C-F79B068FA6B7@easesoftware.com> References: <1164801492.467233.260780@l12g2000cwl.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: multipart/mixed; boundary="===============2107169656==" X-Trace: sea.gmane.org 1164810008 17272 80.91.229.2 (29 Nov 2006 14:20:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 29 Nov 2006 14:20:08 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 29 15:20:00 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 1GpQHe-0005Fd-85 for geh-help-gnu-emacs@m.gmane.org; Wed, 29 Nov 2006 15:19:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GpQHd-0005F8-7s for geh-help-gnu-emacs@m.gmane.org; Wed, 29 Nov 2006 09:19:33 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GpQH5-0005BC-Bi for help-gnu-emacs@gnu.org; Wed, 29 Nov 2006 09:18:59 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GpQH0-00056k-Um for help-gnu-emacs@gnu.org; Wed, 29 Nov 2006 09:18:55 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GpQH0-00056O-0X for help-gnu-emacs@gnu.org; Wed, 29 Nov 2006 09:18:54 -0500 Original-Received: from [64.192.143.210] (helo=easeserver.easesoftware.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GpQGz-0005b0-HZ for help-gnu-emacs@gnu.org; Wed, 29 Nov 2006 09:18:53 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by easeserver.easesoftware.com (Postfix) with ESMTP id D38F45648D9; Wed, 29 Nov 2006 08:18:52 -0600 (CST) Original-Received: from easeserver.easesoftware.com ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 22926-02; Wed, 29 Nov 2006 08:18:49 -0600 (CST) Original-Received: from [64.192.143.210] (easeserver.easesoftware.com [64.192.143.210]) by easeserver.easesoftware.com (Postfix) with ESMTP id 0B1B75648AC; Wed, 29 Nov 2006 08:18:49 -0600 (CST) In-Reply-To: <1164801492.467233.260780@l12g2000cwl.googlegroups.com> Original-To: leonel.gayard@gmail.com X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: by amavisd-new at easesoftware.net 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:39093 Archived-At: --===============2107169656== Content-Type: multipart/alternative; boundary=Apple-Mail-52--328349229 --Apple-Mail-52--328349229 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed On Nov 29, 2006, at 5:58 AM, leonel.gayard@gmail.com wrote: > Hi all, > > I've recently started to add some Lisp functions to my .emacs file. > For > instance, these two functions change the colors in Emacs, with white > fonts over black background or vice-versa: > > ;;;###autoload > (defun black-on-white() > (and > (set-foreground-color "black") > (set-background-color "white"))) > > ;;;###autoload > (defun white-on-black() > (and > (set-foreground-color "white") > (set-background-color "black"))) > > Now, I would like to call these functions by typing M-x white-on- > black, > but they simply are not available there. The apropos command (M-x > apropos) acknowledges that they exist, but when I type M-x > black-on-white, all I get is "no match". > > Any ideas ? Look at the function: interactive Probably you just need (interactive) but there is a lot to it. Perry Smith ( pedz@easesoftware.com ) Ease Software, Inc. ( http://www.easesoftware.com ) Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX systems --Apple-Mail-52--328349229 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1
On Nov 29, 2006, at = 5:58 AM, leonel.gayard@gmail.com = wrote:

Hi all,

I've = recently started to add some Lisp functions to my .emacs file. = For
instance, these two functions = change the colors in Emacs, with white
fonts = over black background or vice-versa:

;;;###autoload
(defun black-on-white()
=A0 =A0 (and
=A0=A0 =A0 =A0 = =A0 (set-foreground-color "black")
=A0=A0 =A0 =A0 =A0 = (set-background-color "white")))

(defun = white-on-black()
=A0 =A0 (and
=A0=A0 =A0 =A0 = =A0 (set-foreground-color "white")
=A0=A0 =A0 =A0 =A0 = (set-background-color "black")))

Now, I would = like to call these functions by typing M-x white-on-black,
but they simply are not available there. The apropos = command (M-x
apropos) acknowledges that they = exist, but when I type M-x

Any ideas = ?

Look at the function: = interactive

Probably you = just need (interactive) but there is a lot to it.

Perry Smith (=A0pedz@easesoftware.com = )
Ease Software, Inc. (=A0http://www.easesoftware.com = )

Low = cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX systems

=

= --Apple-Mail-52--328349229-- --===============2107169656== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --===============2107169656==--