Article View: gnu.emacs.bug
Article #1169auto fill and newline in 18.52
From: Hal Peterson
Date: Mon, 14 Nov 1988 18:01
Date: Mon, 14 Nov 1988 18:01
43 lines
1959 bytes
1959 bytes
newline no longer causes an auto-fill in GNU Emacs version 18.52
running on a Sun-3/50 or Sun-3/280 with SunOS 3.5. Repeat by:
C-x b b u g RET ; get a new buffer
M-x t e x t - m o d e RET ; put it into a known mode
C-u M-x a u t o - f i l l RET ; turn on auto-fill
M-x s e t - v a r RET f i l l - c RET 7 0 RET ; set the fill column
M-4 M-0 x SPC M-4 M-0 x ; create text that should fill
RET ; demonstrate the bug
That last RET should cause the line to break after the first string of
'?x characters, but it does not.
The problem appears to be a misnamed variable reference in Fnewline in
cmds.c. "arg1" is the raw prefix argument to newline, and arg is the
numeric interpretation of that argument. The call to SelfInsert uses
arg1 but should use arg. Following is a diff (which I have installed
on our system and which appears to fix the problem).
Hal
--
Hal Peterson / Cray Research / 1440 Northland Dr. / Mendota Hts, MN 55120
hrp@cray.com bungia!cray!hrp (612) 681-3145
============================================================
*** cmds.c-orig Tue Jul 19 18:43:25 1988
--- cmds.c Sun Nov 13 15:19:31 1988
***************
*** 237,243 ****
if (flag)
InsCStr (&c1, 1);
else
! SelfInsert ('\n', XFASTINT (arg1) > 1);
XFASTINT (arg)--; /* Ok since old and new vals both nonneg */
}
--- 237,243 ----
if (flag)
InsCStr (&c1, 1);
else
! SelfInsert ('\n', XFASTINT (arg) > 1);
XFASTINT (arg)--; /* Ok since old and new vals both nonneg */
}
Technical Details
Message-ID:
<8811141801.AA29069@earth.cray.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!earth.cray.com!hrpShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!earth.cray.com!hrp From: hrp@earth.cray.com (Hal Peterson) Newsgroups: gnu.emacs.bug Subject: auto fill and newline in 18.52 Message-ID: <8811141801.AA29069@earth.cray.com> Date: 14 Nov 88 18:01:39 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 43