From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.devel Subject: Re: toggle-viper-mode strangeness Date: Thu, 19 Jan 2006 14:43:58 -0700 Message-ID: References: <20060119011332.GA75423@flame.pc> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1137711898 8534 80.91.229.2 (19 Jan 2006 23:04:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 19 Jan 2006 23:04:58 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 20 00:04:55 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Ezipi-0006XP-V2 for ged-emacs-devel@m.gmane.org; Fri, 20 Jan 2006 00:04:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EzisB-000202-6K for ged-emacs-devel@m.gmane.org; Thu, 19 Jan 2006 18:07:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ezhq0-0006Vu-6M for emacs-devel@gnu.org; Thu, 19 Jan 2006 17:01:00 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ezhpt-0006Rm-G2 for emacs-devel@gnu.org; Thu, 19 Jan 2006 17:00:55 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ezhct-0001Al-Ja for emacs-devel@gnu.org; Thu, 19 Jan 2006 16:47:27 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1Ezhgz-0003Hd-GV for emacs-devel@gnu.org; Thu, 19 Jan 2006 16:51:41 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Ezha0-0003en-Bc for emacs-devel@gnu.org; Thu, 19 Jan 2006 22:44:28 +0100 Original-Received: from 207.167.42.60 ([207.167.42.60]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Jan 2006 22:44:28 +0100 Original-Received: from ihs_4664 by 207.167.42.60 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Jan 2006 22:44:28 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 35 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207.167.42.60 User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: <20060119011332.GA75423@flame.pc> X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:49278 Archived-At: Giorgos Keramidas wrote: > It's been several days since I updated cvs-emacs here, so forgive me if > this is fixed already. > > Isn't the following in `toggle-viper-mode' strange? > > ;;;###autoload > (defun toggle-viper-mode () > "Toggle Viper on/off. > If Viper is enabled, turn it off. Otherwise, turn it on." > (interactive) > (if (eq viper-mode t) > (viper-go-away) > ==> (setq viper-mode nil) > (viper-mode))) > > Looking at the indentation I'd expect the if expression to end where the > arrow points, but it doesn't. Or is an implicit (progn ...) added > automatically by Emacs around the third ... N-th elements of the if > expression? Yes: ,----[ C-h f if RET ] | if is a special form. | (if COND THEN ELSE...) | | If COND yields non-nil, do THEN, else do ELSE... | Returns the value of THEN or the value of the last of the ELSE's. | THEN must be one expression, but ELSE... can be zero or more expressions. | If COND yields nil, and there are no ELSE's, the value is nil. `---- -- Kevin Rodgers