[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#30393: 24.4; cperl-mode: indentation failure

From: Alan Mackenzie
Subject: bug#30393: 24.4; cperl-mode: indentation failure
Date: Wed, 14 Feb 2018 21:00:22 +0000
User-agent: Mutt/1.7.2 (2016-11-26)

Hello, Eli.

On Sun, Feb 11, 2018 at 18:16:00 +0200, Eli Zaretskii wrote:
> > Date: Sun, 11 Feb 2018 12:49:30 +0000
> > Cc: address@hidden, address@hidden,
> >   address@hidden, address@hidden
> > From: Alan Mackenzie <address@hidden>

> > > This text is not needed.  The original text, which you deleted,
> > > described how to avoid a real problem; if that problem no longer
> > > exists, we should just delete that text.  If that problem does exist
> > > in some modes, we should leave that text as it was, with a better
> > > description of what modes are still subject to these problems.

> > > But describing something that is no longer done by Emacs is just waste
> > > of paper.

> > Perhaps the proposed fix was somewhat prolix ("long winded").  But, in a
> > sense, we're providing a new feature, the ability to write syntactically
> > correct parens.  If we don't mention this, people won't notice.
> > Occasionally somebody will remember the previous restriction, try to
> > look it up in the manual, and end up puzzled.

> > How about a compromise, and replacing those two long paragraphs with a
> > simple sentence such as:

> >     From Emacs 27.1, you can write opening parens at column zero without
> >     problems.

> > > Overall, I must say I'm confused regarding the purpose of this patch.
> > > What does it try to accomplish?

> > To note that the documented previous restrictions on parens in column 0
> > no longer hold.

> The right place for such stuff is in NEWS.

> > I suppose we really want to mark this part of the manual as obsolete,
> > but we've got no mechanism for doing this.  Besides,
> > open-paren-in-column-0-is-defun-start still has _some_ functionality.

> The variable should have some minimal description with a note that
> using it nowadays is seldom needed.  That should be enough to drive
> your point home, I think.

In accordance with that, then, I propose the following as the complete
emacs manual page "Left Margin Convention":

    26.2.1 Left Margin Convention

    Many programming-language modes have traditionally assumed that any
    opening delimiter found at the left margin is the start of a top-level
    definition, or defun.  So, by default, commands which seek the beginning
    of a defun accept such a delimiter as signifying that position.

       If you want to override this convention, you can do so by setting the
    user option `open-paren-in-column-0-is-defun-start' to `nil'.  If this
    option is set to `t' (the default), commands seeking the start of a
    defun will stop at opening parentheses or braces at column zero.  When
    it is `nil', defuns are found by searching for parens or braces at the
    outermost level.  Since low-level Emacs routines no longer depend on
    this convention, you usually won't need to change
    `open-paren-in-column-0-is-defun-start' from its default.

Alan Mackenzie (Nuremberg, Germany).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]