[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r117265: Fix bug #17801 with extraneous newlines
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-24 r117265: Fix bug #17801 with extraneous newlines after inserting markup in Texinfo mode. |
Date: |
Fri, 20 Jun 2014 08:48:15 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117265
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/17801
committer: Eli Zaretskii <address@hidden>
branch nick: emacs-24
timestamp: Fri 2014-06-20 11:47:10 +0300
message:
Fix bug #17801 with extraneous newlines after inserting markup in Texinfo
mode.
lisp/textmodes/texinfo.el (texinfo-mode): Set skeleton-end-newline
locally to nil.
(texinfo-insert-block, address@hidden)
(address@hidden, address@hidden): Adjust to
local setting of skeleton-end-newline by adding an explicit \n to
the skeletons where appropriate.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/textmodes/texinfo.el texinfo.el-20091113204419-o5vbwnq5f7feedwu-124
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-06-20 01:05:40 +0000
+++ b/lisp/ChangeLog 2014-06-20 08:47:10 +0000
@@ -1,3 +1,12 @@
+2014-06-20 Eli Zaretskii <address@hidden>
+
+ * textmodes/texinfo.el (texinfo-mode): Set skeleton-end-newline
+ locally to nil.
+ (texinfo-insert-block, address@hidden)
+ (address@hidden, address@hidden): Adjust to
+ local setting of skeleton-end-newline by adding an explicit \n to
+ the skeletons where appropriate. (Bug#17801)
+
2014-06-20 Stefan Monnier <address@hidden>
* emacs-lisp/smie.el (smie--hanging-eolp-function): New var.
=== modified file 'lisp/textmodes/texinfo.el'
--- a/lisp/textmodes/texinfo.el 2014-02-10 01:34:22 +0000
+++ b/lisp/textmodes/texinfo.el 2014-06-20 08:47:10 +0000
@@ -44,6 +44,8 @@
(defvar outline-heading-alist)
+(defvar skeleton-end-newline)
+
(defgroup texinfo nil
"Texinfo Mode."
:link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
@@ -626,6 +628,11 @@
(setq-local tex-first-line-header-regexp "^\\\\input")
(setq-local tex-trailer "@bye\n")
+ ;; Prevent skeleton.el from adding a newline to each inserted
+ ;; skeleton. Those which do want a newline do that explicitly in
+ ;; their define-skeleton form.
+ (setq-local skeleton-end-newline nil)
+
;; Prevent filling certain lines, in addition to ones specified by
;; the user.
(setq-local auto-fill-inhibit-regexp
@@ -653,7 +660,7 @@
(if (or (string-match "\\`def" str)
(member str '("table" "ftable" "vtable")))
'(nil " " -))
- \n _ \n "@end " str \n)
+ \n _ \n "@end " str \n \n)
(defun texinfo-inside-macro-p (macro &optional bound)
"Non-nil if inside a macro matching the regexp MACRO."
@@ -732,7 +739,7 @@
(backward-word 1)
(texinfo-last-unended-begin)
(or (match-string 1) '-)))
- \n "@end " str \n)
+ \n "@end " str \n \n)
(define-skeleton texinfo-insert-braces
"Make a pair of braces and be poised to type inside of them.
@@ -771,7 +778,7 @@
(define-skeleton address@hidden
"Insert the string address@hidden' in a Texinfo buffer."
nil
- \n "@example" \n)
+ \n "@example" \n \n)
(define-skeleton address@hidden
"Insert a address@hidden' command in a Texinfo buffer.
@@ -816,7 +823,7 @@
(define-skeleton address@hidden
"Insert the string address@hidden' in a Texinfo buffer."
- \n "@quotation" \n)
+ \n "@quotation" \n _ \n)
(define-skeleton address@hidden
"Insert a address@hidden' command in a Texinfo buffer.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r117265: Fix bug #17801 with extraneous newlines after inserting markup in Texinfo mode.,
Eli Zaretskii <=