GNU bug report logs - #13810
24.3.50; Docstring of `newline' is confusing

Previous Next

Package: emacs;

Reported by: Xue Fuqiao <xfq.free <at> gmail.com>

Date: Mon, 25 Feb 2013 10:06:02 UTC

Severity: minor

Tags: fixed

Found in version 24.3.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 13810 <at> debbugs.gnu.org (full text, mbox):

From: Xue Fuqiao <xfq.free <at> gmail.com>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: 13810 <at> debbugs.gnu.org
Subject: Re: bug#13810: 24.3.50; Docstring of `newline' is confusing
Date: Mon, 25 Feb 2013 20:48:06 +0800
On Mon, 25 Feb 2013 13:23:14 +0100
Stephen Berman <stephen.berman <at> gmx.net> wrote:

> On Mon, 25 Feb 2013 18:03:09 +0800 Xue Fuqiao <xfq.free <at> gmail.com> wrote:
> > In the doc string of the function `newline':
> >   Insert a newline, and move to left margin of the new line if it's
> >   blank.
> > To reproduce this bug:
> >
> >    emacs -Q
> >    M-<
> >    M-: (newline) RET
> > A new line appears, but the point doesn't move to left margin of the
> > first line.  
> I think you misread the doc string: point should -- and does -- move to
> the left margin of the *new* line.

You mean the *new* line is the second line (now)?

> Your report prompted me to check the code of newline and I think I found
> a bug: a comment says, "If the newline leaves the previous line blank,
> and we have a left margin, delete that from the blank line", but the
> code only checks whether the previous line consists of a *single* space
> or tab, so if there's more than one space or tab and the line is
> otherwise blank, these won't be deleted.

What does the "left margin" mean?  I'm a little confused here.  Does it mean the "margin" in the variable `left-margin-width'?

BTW there is another problem with the doc string of the function `newline'.  The `auto-fill-function' in the doc string is somewhat ambiguous.  It is a Lisp function in simple.el, but it is also is a variable defined in buffer.c.

> Steve Berman

-- 
Best regards, Xue Fuqiao.
http://www.emacswiki.org/emacs/XueFuqiao




This bug report was last modified 4 years and 246 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.