Subject: Re: bug#7281: 24.0.50; newline function inserts newline when the optional argument is 0

From: Eli Zaretskii <[email-masked]>
Date: Tue, 26 Oct 2010 11:12:59 -0400

> Date: Tue, 26 Oct 2010 13:43:32 +0530
> From: Noorul Islam <[email-masked]>
> Cc: [email-masked]
> 
> On Tue, Oct 26, 2010 at 1:17 PM, Glenn Morris <[email-masked]> wrote:
> >
> >> > On emacs 23 (insert 0) returns nil and cursor stays at the place where
> >> > the function is invoked. But in the case of bzr trunk (Emacs 24) the
> >> > same function call moves the cursor one line down from the current
> >> > position.
> >>
> >> I cannot reproduce this. Is this with `emacs -Q'?
> >
> > Maybe you meant to say (newline 0), like in your subject?
> >
> 
> You are right. I am sorry about the typo.

I think this happens because the modified function
internal_self_insert does not handle the case of n = 0.