From: yamaoka Date: Fri, 17 Jan 2003 01:31:13 +0000 (+0000) Subject: * infohack.el (infohack-texi-format): Insert one excessive newline after a X-Git-Tag: t-gnus-6_15_14-00-quimby~13 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1496020e37cfa65b77c2efe20cc6f53c548313a;p=elisp%2Fgnus.git- * 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. --- 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)