GNU bug report logs - #17801
24.3.91; Regression: Texinfo Mode inserts newline after markup

Previous Next

Package: emacs;

Reported by: Eli Zaretskii <eliz <at> gnu.org>

Date: Wed, 18 Jun 2014 14:59:01 UTC

Severity: normal

Found in version 24.3.91

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 17801-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 17801-done <at> debbugs.gnu.org
Subject: Re: bug#17801: 24.3.91;
 Regression: Texinfo Mode inserts newline after markup
Date: Fri, 20 Jun 2014 11:54:58 +0300
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: 17801 <at> debbugs.gnu.org
> Date: Thu, 19 Jun 2014 11:44:22 -0400
> 
> >> Indeed, there isn't any.  But really skeleton shouldn't insert a newline
> >> by default (since it offers no way for individual skeletons to override
> >> it).  Instead, each skeleton that needs it should end with a \n.
> > But this will probably cause massive breakage in users of skeleton.
> 
> Indeed, that's why I haven't made such a change.

Should we make such a change on the trunk at this time?

> > For the branch, is it OK to make skeleton-end-newline buffer-local in
> > Texinfo buffers, and then give it a nil value?
> 
> Yes.

Done as r117265 on the emacs-24 branch.

Btw, while working on this, I bumped into some strange feature: the
last \n element in a skeleton is only obeyed when it would be inserted
not at end of line.  This is explicitly coded in skeleton.el:

       ;; \n as last element only inserts \n if not at eol.
       ((and (null (cdr skeleton-il)) (not recursive) (eolp))

For this reason, if a skeleton wants to always insert a newline at the
end, it quite embarrassingly must end with 2 \n elements, and risk
inserting an extra newline in some cases.

Is this a feature or a bug?  If a feature, does the code assume that
skeleton-end-newline is non-nil?  That is, should the condition
above also test skeleton-end-newline?




This bug report was last modified 11 years and 30 days ago.

Previous Next


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