From 8133366d9d9185175a24debcc20225206b373653 Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Thu, 17 Dec 1998 17:45:45 +0000 Subject: Newline after first sentence. Submitted for Texinfo distribution. --- generic/texi-docstring-magic.el | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'generic') diff --git a/generic/texi-docstring-magic.el b/generic/texi-docstring-magic.el index 1eba92d7..11a4a195 100644 --- a/generic/texi-docstring-magic.el +++ b/generic/texi-docstring-magic.el @@ -191,7 +191,21 @@ including any whitespace included to delimit matches.") (replace-match replacement t t docstring)) (setq i (+ i (- newlength origlength)))))) (if in-quoted-region - (setq docstring (concat docstring "\n@end lisp"))))))) + (setq docstring (concat docstring "\n@end lisp")))))) + ;; Force a new line after (what should be) the first sentence, + ;; if not already a new paragraph. + (let* + ((pos (string-match "\n" docstring)) + (needscr (and pos + (not (string= "\n" + (substring docstring + (1+ pos) + (+ pos 2))))))) + (if (and pos needscr) + (concat (substring docstring 0 pos) + "@*\n" + (substring docstring (1+ pos))) + docstring))) (defun texi-docstring-magic-texi (env grp name docstring args &optional endtext) "Make a texi def environment ENV for entity NAME with DOCSTRING." -- cgit v1.2.3