unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: Tamas K Papp <tkpapp@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: indenting keyword arguments so far
Date: Mon, 08 Sep 2008 17:19:20 +0200	[thread overview]
Message-ID: <87zlmi8y2v.fsf@tux.homenetwork> (raw)
In-Reply-To: <6ikqv2Fr5mrqU1@mid.individual.net> (Tamas K. Papp's message of "8 Sep 2008 14:25:38 GMT")

Tamas K Papp <tkpapp@gmail.com> writes:

> Hi asked this on c.l.l, but didn't find a solution, so I thought I would 
> ask here.  I would like my Common Lisp code to be indented properly.
>
> Suppose I type
>
> (foo :a a :b b
> :c c :d :e e
> :f f :g g)
>
> into a Lisp buffer (keyword names are deliberately short, but imagine they
> would not fit on a line).  C-M-q gives
>
> (foo :a a :b b
> 	  :c c :d d :e e
> 	  :f f :g g)
>
> Pressing Tab gives
>
> (foo :a a :b b
> 	  :c c :d d :e e
> 		    :f f :g g)
>
> What I would prefer is something like
>
> (foo :a a :b b
>      :c c :d d :e e
>      :f f :g g)
>
> Others on c.l.l claim it works properly for them, but not for me.  I am 
> using Emacs 23.0.0.1, with the following settings:
>
> C-M-q runs the command indent-sexp
>   which is an interactive compiled Lisp function in `lisp-mode.el'.
>
> TAB (translated from <tab>) runs the command lisp-indent-line
>   which is an interactive compiled Lisp function in `lisp-mode.el'.
>
> lisp-indent-function is a variable defined in `lisp-mode.el'.
> Its value is 
> common-lisp-indent-function
> Local in buffer foo.lisp; global value is 
> lisp-indent-function
>
> (symbol-plist 'common-lisp-indent-function) gives nil.
>
>>From the comments of others, I am under the impression that what I want 
> should work out of the box, but it doesn't.  Please help me find out 
> why...

Hi,
it seem `common-lisp-indent-function' is set for lisp-mode, and
emacs-lisp-mode overhide this settings.
How did you set lisp-indent-function ? (with a hook may be?)
if you just set it with:
,----
| (setq lisp-indent-function 'common-lisp-indent-function)
`----
you will have this setting both for emacs-lisp and cl.
The property lists will be indented correctly but you will lost
the if emacs-lisp indentation: 

,----
| (if A
|     t
|     nil)
`----

instead of

,----
| (if A
|     t
|   nil)
`----

is it a problem?

-- 
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France




  reply	other threads:[~2008-09-08 15:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-08 14:25 indenting keyword arguments so far Tamas K Papp
2008-09-08 15:19 ` Thierry Volpiatto [this message]
2008-09-08 15:20 ` Joost Kremers
2008-09-08 19:14   ` Tamas K Papp
     [not found] ` <mailman.18746.1220887362.18990.help-gnu-emacs@gnu.org>
2008-09-08 19:13   ` Tamas K Papp
2008-09-08 22:26     ` Thierry Volpiatto

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=87zlmi8y2v.fsf@tux.homenetwork \
    --to=thierry.volpiatto@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=tkpapp@gmail.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.
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).