From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "rgb" Newsgroups: gmane.emacs.help Subject: Re: left brackets insert both Date: 25 Mar 2005 15:00:00 -0800 Organization: http://groups.google.com Message-ID: <1111791600.008719.217690@l41g2000cwc.googlegroups.com> References: <1111765040.509327.116280@g14g2000cwa.googlegroups.com> <87ll8b2022.fsf@robotron.ath.cx> <1111769127.619222.303620@z14g2000cwz.googlegroups.com> <1111772988.425339.47700@g14g2000cwa.googlegroups.com> <1111775012.703198.185290@o13g2000cwo.googlegroups.com> <1111780392.575165.138760@l41g2000cwc.googlegroups.com> <1111781127.783436.91790@z14g2000cwz.googlegroups.com> <1111781958.459903.305520@f14g2000cwb.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1111791975 14794 80.91.229.2 (25 Mar 2005 23:06:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 25 Mar 2005 23:06:15 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Mar 26 00:06:00 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DExrg-0004hV-2Z for geh-help-gnu-emacs@m.gmane.org; Sat, 26 Mar 2005 00:05:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DEy7F-0002o8-FX for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Mar 2005 18:21:21 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!postnews.google.com!l41g2000cwc.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 45 Original-NNTP-Posting-Host: 198.74.20.73 Original-X-Trace: posting.google.com 1111791604 4760 127.0.0.1 (25 Mar 2005 23:00:04 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 25 Mar 2005 23:00:04 +0000 (UTC) In-Reply-To: <1111781958.459903.305520@f14g2000cwb.googlegroups.com> User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: l41g2000cwc.googlegroups.com; posting-host=198.74.20.73; posting-account=C7LM4w0AAAD23IRuMuUUJVCLQTuHhTK8 Original-Xref: shelby.stanford.edu gnu.emacs.help:129614 Original-To: help-gnu-emacs@gnu.org 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 X-MailScanner-To: geh-help-gnu-emacs@m.gmane.org Xref: news.gmane.org gmane.emacs.help:25166 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:25166 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.