[gnu.emacs.bug] auto fill and newline in 18.52

hrp@earth.cray.com (Hal Peterson) (11/15/88)

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 */
      }