help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I make an Emacs-Lisp function available via M-x ?


From: Perry Smith
Subject: Re: How do I make an Emacs-Lisp function available via M-x ?
Date: Wed, 29 Nov 2006 08:18:48 -0600

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]