* indenting keyword arguments so far
@ 2008-09-08 14:25 Tamas K Papp
2008-09-08 15:19 ` Thierry Volpiatto
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Tamas K Papp @ 2008-09-08 14:25 UTC (permalink / raw)
To: help-gnu-emacs
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...
Thanks,
Tamas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: indenting keyword arguments so far
2008-09-08 14:25 indenting keyword arguments so far Tamas K Papp
@ 2008-09-08 15:19 ` Thierry Volpiatto
2008-09-08 15:20 ` Joost Kremers
[not found] ` <mailman.18746.1220887362.18990.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 6+ messages in thread
From: Thierry Volpiatto @ 2008-09-08 15:19 UTC (permalink / raw)
To: Tamas K Papp; +Cc: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: indenting keyword arguments so far
2008-09-08 14:25 indenting keyword arguments so far Tamas K Papp
2008-09-08 15:19 ` Thierry Volpiatto
@ 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>
2 siblings, 1 reply; 6+ messages in thread
From: Joost Kremers @ 2008-09-08 15:20 UTC (permalink / raw)
To: help-gnu-emacs
Tamas K Papp wrote:
> 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:
have you tried starting emacs with either the -q (no ~/.emacs or
default.el) or -Q (no site-start.el either) switch and see if it works
then? if it does, go through your config files with a fine comb.
--
Joost Kremers joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: indenting keyword arguments so far
2008-09-08 15:20 ` Joost Kremers
@ 2008-09-08 19:14 ` Tamas K Papp
0 siblings, 0 replies; 6+ messages in thread
From: Tamas K Papp @ 2008-09-08 19:14 UTC (permalink / raw)
To: help-gnu-emacs
On Mon, 08 Sep 2008 15:20:06 +0000, Joost Kremers wrote:
> have you tried starting emacs with either the -q (no ~/.emacs or
> default.el) or -Q (no site-start.el either) switch and see if it works
> then? if it does, go through your config files with a fine comb.
I tried both -q and -Q, and it changed nothing about the indentation of
foo in the original example. Weird. Maybe I will try to compile the
latest emacs snapshot...
Tamas
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <mailman.18746.1220887362.18990.help-gnu-emacs@gnu.org>]
* Re: indenting keyword arguments so far
[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
0 siblings, 1 reply; 6+ messages in thread
From: Tamas K Papp @ 2008-09-08 19:13 UTC (permalink / raw)
To: help-gnu-emacs
On Mon, 08 Sep 2008 17:19:20 +0200, Thierry Volpiatto wrote:
> 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) `----
I tried M-: (setq lisp-indent-function 'common-lisp-indent-function), but
it changed nothing about the indentation of foo above.
Tamas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: indenting keyword arguments so far
2008-09-08 19:13 ` Tamas K Papp
@ 2008-09-08 22:26 ` Thierry Volpiatto
0 siblings, 0 replies; 6+ messages in thread
From: Thierry Volpiatto @ 2008-09-08 22:26 UTC (permalink / raw)
To: Tamas K Papp; +Cc: help-gnu-emacs
Tamas K Papp <tkpapp@gmail.com> writes:
> On Mon, 08 Sep 2008 17:19:20 +0200, Thierry Volpiatto wrote:
>
>> 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) `----
>
> I tried M-: (setq lisp-indent-function 'common-lisp-indent-function), but
> it changed nothing about the indentation of foo above.
You can try to write this code in your .emacs and restart emacs.
It would work.
--
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-09-08 22:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-08 14:25 indenting keyword arguments so far Tamas K Papp
2008-09-08 15:19 ` Thierry Volpiatto
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
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.