bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17801: 24.3.91; Regression: Texinfo Mode inserts newline after marku


From: Eli Zaretskii
Subject: 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@iro.umontreal.ca>
> Cc: 17801@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?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]