[4200] in testers
Re: emacs 20.3/20.4 beta core dump
daemon@ATHENA.MIT.EDU (John Hawkinson)
Mon Jun 7 12:46:39 1999
Message-Id: <199906071645.MAA28506@x15-cruise-basselope.mit.edu>
To: Greg Hudson <ghudson@MIT.EDU>
Cc: Richard Stallman <rms@gnu.org>, testers@MIT.EDU
In-Reply-To: Your message of "Mon, 07 Jun 1999 10:13:14 EDT."
<199906071413.KAA13783@r93aag001866.sbo-smr.ma.cable.rcn.com>
Date: Mon, 07 Jun 1999 12:45:10 -0400
From: John Hawkinson <jhawk@MIT.EDU>
In message <199906071413.KAA13783@r93aag001866.sbo-smr.ma.cable.rcn.com>, Greg
Hudson writes:
>I suspect that the right fix does not involve mucking with
>find_before_next_newline(). I'm planning on trying to the following
>workaround.
Abstracted out to:
(gdb) list 1417
1412 if (pos < to)
1413 {
1414 /* Skip any number of invisible lines all at once */
1415 do
1416 {
1417 pos = find_before_next_newline (pos, to, 1) + 1;
1418 pos_byte = CHAR_TO_BYTE (pos);
1419 }
1420 while (pos < to
1421 && indented_beyond_p (pos, pos_byte, selective));
(gdb) break 1418
Breakpoint 3 at 0x14aa0c: file indent.c, line 1418.
(gdb) commands 3
Type commands for when breakpoint 3 is hit, one per line.
End with a line saying just "end".
>silent
>set pos=pos-1
>if (pos < to)
>set pos=pos+1
>end
>continue
>end
It does not DTRT. Given a buffer comprised of:
---cut
The rain in spain falls
mainly on the plain.
The rain in spain
The spain of rain
The dolphin
lives
---cut
Entering "C-u 2 C-x $" (set-selective-display 2) and placing
the point midway on line 3, "C-e" (end-of-line) moves
the point to end of line 2.
--jhawk
>Index: indent.c
>===================================================================
>RCS file: /afs/dev.mit.edu/source/repository/third/emacs/src/indent.c,v
>retrieving revision 1.1.1.2
>diff -c -r1.1.1.2 indent.c
>*** indent.c 1998/12/16 20:04:34 1.1.1.2
>--- indent.c 1999/06/07 14:09:57
>***************
>*** 1414,1420 ****
> /* Skip any number of invisible lines all at once */
> do
> {
>! pos = find_before_next_newline (pos, to, 1) + 1;
> pos_byte = CHAR_TO_BYTE (pos);
> }
> while (pos < to
>--- 1414,1422 ----
> /* Skip any number of invisible lines all at once */
> do
> {
>! pos = find_before_next_newline (pos, to, 1);
>! if (pos < to)
>! pos++;
> pos_byte = CHAR_TO_BYTE (pos);
> }
> while (pos < to