diff options
author | 1998-12-17 17:45:45 +0000 | |
---|---|---|
committer | 1998-12-17 17:45:45 +0000 | |
commit | 8133366d9d9185175a24debcc20225206b373653 (patch) | |
tree | 1da57e4a2c1c8c32856dc56be9347e495ea882c0 | |
parent | 5590ba3a6ea132308ea2fc422635699208f21579 (diff) |
Newline after first sentence. Submitted for Texinfo distribution.
-rw-r--r-- | generic/texi-docstring-magic.el | 16 |
1 files changed, 15 insertions, 1 deletions
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." |