unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* bug in Python-mode
@ 2006-12-17 19:46 Paul Pogonyshev
  2006-12-17 19:51 ` Paul Pogonyshev
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Pogonyshev @ 2006-12-17 19:46 UTC (permalink / raw)


Indentation of this construct is broken:

sys.stderr.write (str (lambda x:
		       x + 1))

The reason is the ending column after lambda declaration.

Paul

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: bug in Python-mode
  2006-12-17 19:46 bug in Python-mode Paul Pogonyshev
@ 2006-12-17 19:51 ` Paul Pogonyshev
  2006-12-17 23:46   ` Slawomir Nowaczyk
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Pogonyshev @ 2006-12-17 19:51 UTC (permalink / raw)


I wrote:
> Indentation of this construct is broken:
> 
> sys.stderr.write (str (lambda x:
> 		       x + 1))
> 
> The reason is the ending column after lambda declaration.

I meant `colon' of course.

Paul

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: bug in Python-mode
  2006-12-17 19:51 ` Paul Pogonyshev
@ 2006-12-17 23:46   ` Slawomir Nowaczyk
  2006-12-18  0:03     ` Paul Pogonyshev
  0 siblings, 1 reply; 6+ messages in thread
From: Slawomir Nowaczyk @ 2006-12-17 23:46 UTC (permalink / raw)
  Cc: emacs-devel

On Sun, 17 Dec 2006 21:51:41 +0200
Paul Pogonyshev <pogonyshev@gmx.net> wrote:

#> I wrote:
#>> Indentation of this construct is broken:
#>> 
#>> sys.stderr.write (str (lambda x:
#>>                            x + 1))
#>> 
#>> The reason is the ending column after lambda declaration.
#> 
#> I meant `colon' of course.

Well, you may be right, but I am not entirely sure... How do you think
the indentation *should* look in this case?

-- 
 Best wishes,
   Slawomir Nowaczyk
     ( slawomir.nowaczyk.847@student.lu.se )

Living your life is a task so difficult, it has never
been attempted before.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: bug in Python-mode
  2006-12-17 23:46   ` Slawomir Nowaczyk
@ 2006-12-18  0:03     ` Paul Pogonyshev
  2006-12-18  0:06       ` Slawomir Nowaczyk
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Pogonyshev @ 2006-12-18  0:03 UTC (permalink / raw)
  Cc: Slawomir Nowaczyk

Slawomir Nowaczyk wrote:
> On Sun, 17 Dec 2006 21:51:41 +0200
> Paul Pogonyshev <pogonyshev@gmx.net> wrote:
> 
> #> I wrote:
> #>> Indentation of this construct is broken:
> #>> 
> #>> sys.stderr.write (str (lambda x:
> #>>                            x + 1))
> #>> 
> #>> The reason is the ending column after lambda declaration.
> #> 
> #> I meant `colon' of course.
> 
> Well, you may be right, but I am not entirely sure... How do you think
> the indentation *should* look in this case?

Damn, I cannot formulate even two sentences properly.  Indentation
_after_ this construct is broken.  Try copying it into a Python-mode
buffer and try to add a statement after it.

Paul

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: bug in Python-mode
  2006-12-18  0:03     ` Paul Pogonyshev
@ 2006-12-18  0:06       ` Slawomir Nowaczyk
  2006-12-18  0:20         ` Paul Pogonyshev
  0 siblings, 1 reply; 6+ messages in thread
From: Slawomir Nowaczyk @ 2006-12-18  0:06 UTC (permalink / raw)
  Cc: emacs-devel

On Mon, 18 Dec 2006 02:03:59 +0200
Paul Pogonyshev <pogonyshev@gmx.net> wrote:

#> Slawomir Nowaczyk wrote:
#> > On Sun, 17 Dec 2006 21:51:41 +0200
#> > Paul Pogonyshev <pogonyshev@gmx.net> wrote:
#> > 
#> > #> I wrote:
#> > #>> Indentation of this construct is broken:
#> > #>> 
#> > #>> sys.stderr.write (str (lambda x:
#> > #>>                            x + 1))
#> > #>> 
#> > #>> The reason is the ending column after lambda declaration.
#> > #> 
#> > #> I meant `colon' of course.
#> > 
#> > Well, you may be right, but I am not entirely sure... How do you think
#> > the indentation *should* look in this case?
#> 
#> Damn, I cannot formulate even two sentences properly.  Indentation
#> _after_ this construct is broken.  Try copying it into a Python-mode
#> buffer and try to add a statement after it.

Well, both:

    sys.stderr.write (str (lambda x:
                               x + 1))
    a = 1

and:

    def aa():
        sys.stderr.write (str (lambda x:
                                   x + 1))
        a = 1

indent properly on my machine... Did I misunderstood you again?

-- 
 Best wishes,
   Slawomir Nowaczyk
     ( slawomir.nowaczyk.847@student.lu.se )

Honeymoon: time between I do and you'd better

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: bug in Python-mode
  2006-12-18  0:06       ` Slawomir Nowaczyk
@ 2006-12-18  0:20         ` Paul Pogonyshev
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Pogonyshev @ 2006-12-18  0:20 UTC (permalink / raw)
  Cc: Slawomir Nowaczyk

Slawomir Nowaczyk wrote:
> Well, both:
> 
>     sys.stderr.write (str (lambda x:
>                                x + 1))
>     a = 1
> 
> and:
> 
>     def aa():
>         sys.stderr.write (str (lambda x:
>                                    x + 1))
>         a = 1
> 
> indent properly on my machine... Did I misunderstood you again?

No, sorry.  It works OK with the CVS version of python-mode.el, which
I failed to update before complaining.  (Except that I think the old
version of indentation of the lambda itself was nicer, but that is not
really important.)

Paul

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-12-18  0:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-17 19:46 bug in Python-mode Paul Pogonyshev
2006-12-17 19:51 ` Paul Pogonyshev
2006-12-17 23:46   ` Slawomir Nowaczyk
2006-12-18  0:03     ` Paul Pogonyshev
2006-12-18  0:06       ` Slawomir Nowaczyk
2006-12-18  0:20         ` Paul Pogonyshev

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