From f1496020e37cfa65b77c2efe20cc6f53c548313a Mon Sep 17 00:00:00 2001 From: yamaoka Date: Fri, 17 Jan 2003 01:31:13 +0000 Subject: [PATCH] * infohack.el (infohack-texi-format): Insert one excessive newline after a @foo{bar} thing to prevent clinging of a line and a line (old texinfmt bug?) if it should be considered only one thing in a line. --- ChangeLog | 7 +++++++ texi/infohack.el | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/ChangeLog b/ChangeLog index 765ae60..ec6aee4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-01-17 Katsumi Yamaoka + + * texi/infohack.el (infohack-texi-format): Insert one excessive + newline after a @foo{bar} thing to prevent clinging of a line and + a line (old texinfmt bug?) if it should be considered only one + thing in a line. + 2003-01-17 TSUCHIYA Masatoshi * .cvsignore: Import from Oort Gnus. diff --git a/texi/infohack.el b/texi/infohack.el index 17b1f68..1cf6e8d 100644 --- a/texi/infohack.el +++ b/texi/infohack.el @@ -133,6 +133,14 @@ (delete-region (point) (save-excursion (forward-line 1) (point)))))))))) + ;; Insert one excessive newline after a @foo{bar} thing to + ;; prevent clinging of a line and a line (old texinfmt bug?) + ;; if it should be considered only one thing in a line. + (goto-char (point-min)) + (while (re-search-forward "^[\t ]*@[a-z]+{.+}[\t ]*\n[\t ]*\n" + nil t) + (if (not (looking-at "[\t ]*$\\|[\t ]*@[a-z]+[\t\n ]")) + (insert "\n"))) (texinfo-mode) (texinfo-every-node-update) (set-buffer-modified-p nil) -- 1.7.10.4