From: "rgb" <rbielaws@i1.net>
Subject: Re: left brackets insert both
Date: 25 Mar 2005 15:00:00 -0800 [thread overview]
Message-ID: <1111791600.008719.217690@l41g2000cwc.googlegroups.com> (raw)
In-Reply-To: <1111781958.459903.305520@f14g2000cwb.googlegroups.com>
Shug Boabby wrote:
> cool. i am a little confused by this macro... i have only ever
written
> defun's before. why is this a defmac and not a defun?
Look at it this way.
A defmacro does nothing by itself.
When you use it, it writes a custom function on the spot based on
the arguments you supplied. It's a fairly deep subject for the
unfamiliar.
>
> a few more questions if you don't mind...
>
> what does the "p\nP" argument to interactive do?
I wanted both the numeric argument and the argument in raw form.
In raw form nil means that the user did not specify a numeric arg.
In numeric format a nil is converted to 1 and so you can't tell
by just looking at the numeric version if the user specified a
numeric arg or wants to use the default of 1.
>
> what is "cnt raw"?
These are the names by which I refer to the values provided by
the p and P interactive specification. See C-h f interactive RET
>
> why do you call self-insert-command?
In the case where the user types [ for example and the prior
character is not [ you want the [ character inserted dont you?
That's what handles all keystrokes that don't meet the (if ...
criteria. It's what all the keys are normally mapped to until
you re-assigned them to your new function.
>
> sorry for these trivial questions, i have only picked up elisp by
> reading .emacs files, editing existing functions and creating very
> simple new ones.
There is a pretty good intro... someplace. I dont' have a link
handy but if you've got a 22.0.x version of Emacs it's now included
in the help along with the Emacs Lisp Reference manual. Neither
should be hard to find once you know they exist.
next prev parent reply other threads:[~2005-03-25 23:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-25 15:37 left brackets insert both Shug Boabby
2005-03-25 15:54 ` David Hansen
2005-03-25 16:45 ` Shug Boabby
2005-03-25 17:49 ` rgb
2005-03-25 18:23 ` Shug Boabby
2005-03-25 19:53 ` rgb
2005-03-25 20:05 ` rgb
2005-03-25 20:19 ` Shug Boabby
2005-03-25 23:00 ` rgb [this message]
2005-03-26 12:48 ` David Hansen
2005-03-25 15:54 ` rgb
2005-03-25 16:39 ` Peter Lee
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1111791600.008719.217690@l41g2000cwc.googlegroups.com \
--to=rbielaws@i1.net \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).