From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#17801: 24.3.91; Regression: Texinfo Mode inserts newline after markup Date: Fri, 20 Jun 2014 11:54:58 +0300 Message-ID: <83bntorme5.fsf@gnu.org> References: <83wqcetgd8.fsf@gnu.org> <834mzht0e5.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1403254586 2454 80.91.229.3 (20 Jun 2014 08:56:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Jun 2014 08:56:26 +0000 (UTC) Cc: 17801-done@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 20 10:56:18 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WxucL-00024A-BB for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Jun 2014 10:56:17 +0200 Original-Received: from localhost ([::1]:39623 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxucK-00046D-PS for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Jun 2014 04:56:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59665) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxucC-00044F-NJ for bug-gnu-emacs@gnu.org; Fri, 20 Jun 2014 04:56:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wxuc7-0007Zl-JK for bug-gnu-emacs@gnu.org; Fri, 20 Jun 2014 04:56:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34388) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wxuc7-0007Zc-G2 for bug-gnu-emacs@gnu.org; Fri, 20 Jun 2014 04:56:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Wxuc7-0006z9-5z for bug-gnu-emacs@gnu.org; Fri, 20 Jun 2014 04:56:03 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Jun 2014 08:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 17801 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 17801@debbugs.gnu.org, eliz@gnu.org, eliz@gnu.org Original-Received: via spool by 17801-done@debbugs.gnu.org id=D17801.140325452526795 (code D ref 17801); Fri, 20 Jun 2014 08:56:02 +0000 Original-Received: (at 17801-done) by debbugs.gnu.org; 20 Jun 2014 08:55:25 +0000 Original-Received: from localhost ([127.0.0.1]:53770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WxubU-0006y7-NO for submit@debbugs.gnu.org; Fri, 20 Jun 2014 04:55:25 -0400 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:49014) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WxubO-0006xk-6S for 17801-done@debbugs.gnu.org; Fri, 20 Jun 2014 04:55:19 -0400 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0N7G00500M098600@mtaout28.012.net.il> for 17801-done@debbugs.gnu.org; Fri, 20 Jun 2014 11:53:42 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N7G000JIM1IKB40@mtaout28.012.net.il>; Fri, 20 Jun 2014 11:53:42 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:90581 Archived-At: > From: Stefan Monnier > 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?