From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: toggle-viper-mode strangeness
Date: Thu, 19 Jan 2006 14:43:58 -0700 [thread overview]
Message-ID: <dqp171$iaj$2@sea.gmane.org> (raw)
In-Reply-To: <20060119011332.GA75423@flame.pc>
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
next prev parent reply other threads:[~2006-01-19 21:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-19 1:13 toggle-viper-mode strangeness Giorgos Keramidas
2006-01-19 21:43 ` Kevin Rodgers [this message]
2006-01-20 1:14 ` Richard M. Stallman
2006-01-20 2:35 ` Giorgos Keramidas
2006-01-20 3:38 ` Johan Bockgård
2006-01-20 4:03 ` Stefan Monnier
2006-01-20 4:14 ` Luc Teirlinck
2006-01-20 12:45 ` Giorgos Keramidas
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='dqp171$iaj$2@sea.gmane.org' \
--to=ihs_4664@yahoo.com \
/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.