From: Le TeXnicien de Surface <texnicien.de.surface@chezmoi.eur>
Subject: Re: How do I make an Emacs-Lisp function available via M-x ?
Date: Wed, 29 Nov 2006 13:21:11 +0100 [thread overview]
Message-ID: <456d7b37$0$5095$ba4acef3@news.orange.fr> (raw)
In-Reply-To: 1164801492.467233.260780@l12g2000cwl.googlegroups.com
leonel.gayard@gmail.com écrivait :
> 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 ?
Just use
(interactive)
like this
(defun white-on-black()
(interactive)
(and
(set-foreground-color "white")
(set-background-color "black")))
/et/ /voilà/!
Hih.
--
Le TeXnicien de Surface
next prev parent reply other threads:[~2006-11-29 12:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-29 11:58 How do I make an Emacs-Lisp function available via M-x ? leonel.gayard
2006-11-29 12:21 ` Le TeXnicien de Surface [this message]
2006-11-29 14:18 ` Perry Smith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='456d7b37$0$5095$ba4acef3@news.orange.fr' \
--to=texnicien.de.surface@chezmoi.eur \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.