From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: minor mode on/off/toggle with t/nil question Date: Tue, 20 Jul 2010 00:41:41 +0200 Organization: A noiseless patient Spider Message-ID: References: <089883ee-0a63-4cb4-a0ec-d2fe4e71cc03@y18g2000prn.googlegroups.com> <87wruco5yq.fsf@lola.goethe.zz> <87wrubfd8p.fsf@rapttech.com.au> <848w6ndwn0.fsf@cs.bham.ac.uk> <87d3vx5cku.fsf@gmail.com> <87bpbcrdk5.fsf@kuiper.lan.informatimago.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1291847215 24659 80.91.229.12 (8 Dec 2010 22:26:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Dec 2010 22:26:55 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 08 23:26:51 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQSTK-0007RM-7G for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 23:26:50 +0100 Original-Received: from localhost ([127.0.0.1]:53036 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQSTJ-0004i0-BT for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 17:26:49 -0500 Original-Path: usenet.stanford.edu!goblin1!goblin.stu.neva.ru!eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 19 Injection-Date: Mon, 19 Jul 2010 22:41:41 +0000 (UTC) Injection-Info: mx01.eternal-september.org; posting-host="5z3mbmgF6aDw6xCuz7tUbQ"; logging-data="15434"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Lj27fJ6qzP7zRx/OQ9ktA" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:XmNjJUDANDMiQwY2/p6ys3yQoHU= sha1:LtFiOsmPGkxBBCwFnM1qmZJuwjE= Original-Xref: usenet.stanford.edu gnu.emacs.help:179860 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:76127 Archived-At: > May i ask how does one toggle the mode in elisp code with the new > scheme? Here's one way: (foo-mode (if foo-mode -1 1)) it works with the new scheme as well as the old scheme. > some question about elisp: when calling a function interactively > without any arg, how does emacs lisp engine distinguish it from with a > nil argument? The Emacs Lisp engine is only called after the `interactive' spec was used to build the actual arguments. So the interactive spec is set up such that it doesn't pass nil but something else (e.g. `toggle'). Stefan