unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Bozhidar Batsov" <bozhidar.batsov@gmail.com>
To: "Andreas Schwab" <schwab@suse.de>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Indentation of cond forms in (Emacs) Lisp mode
Date: Thu, 05 Jun 2014 10:07:39 +0300	[thread overview]
Message-ID: <37BC56E1-3A18-46D0-8F56-F1447D18C02F@gmail.com> (raw)
In-Reply-To: <mvmiooidqda.fsf@hawking.suse.de>

On 3 Jun 2014, at 17:22, Andreas Schwab wrote:

> "Bozhidar Batsov" <bozhidar.batsov@gmail.com> writes:
>
>> I noticed that `cond' forms in Emacs Lisp mode and Lisp mode are 
>> indented
>> with just one space, unlike most other "control" structures:
>>
>> (cond
>> ((x) (y))
>> (t (z))
>>
>> Why is that?
>
> The intention is that you do not break after cond, so it isn't treated
> specially, ie. like a normal function call.
>
> Andreas.

Still, it seems a bit arbitrary. Are there are constructs treated in the 
same manner?

Also, how is this any different from a macro like `with-temp-buffer`, 
which has regular indentation (2 spaces)?

(with-temp-buffer
   (do-something)
   (do-something-else))

>
> -- 
> Andreas Schwab, SUSE Labs, schwab@suse.de
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA 
> B9D7
> "And now for something completely different."



  reply	other threads:[~2014-06-05  7:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-03 13:37 Indentation of cond forms in (Emacs) Lisp mode Bozhidar Batsov
2014-06-03 14:22 ` Andreas Schwab
2014-06-05  7:07   ` Bozhidar Batsov [this message]
2014-06-05  7:37     ` Andreas Schwab
2014-06-05 13:34     ` Stefan Monnier

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=37BC56E1-3A18-46D0-8F56-F1447D18C02F@gmail.com \
    --to=bozhidar.batsov@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=schwab@suse.de \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).