Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2014-09-20 01:06:22 +02:00
commit 0491ae5204
1 changed files with 11 additions and 11 deletions

View File

@ -450,17 +450,17 @@ string, see `org-ascii--justify-lines' and
`org-ascii--justify-block'.
Return nil if S isn't a string."
;; Don't fill paragraph when break should be preserved.
(cond ((not (stringp s)) nil)
((plist-get info :preserve-breaks) s)
(t (let ((double-space-p sentence-end-double-space))
(with-temp-buffer
(let ((fill-column text-width)
(use-hard-newlines t)
(sentence-end-double-space double-space-p))
(insert s)
(fill-region (point-min) (point-max) justify))
(buffer-string))))))
(when (stringp s)
(let ((double-space-p sentence-end-double-space))
(with-temp-buffer
(let ((fill-column text-width)
(use-hard-newlines t)
(sentence-end-double-space double-space-p))
(insert (if (plist-get info :preserve-breaks)
(replace-regexp-in-string "\n" hard-newline s)
s))
(fill-region (point-min) (point-max) justify))
(buffer-string)))))
(defun org-ascii--justify-lines (s text-width how)
"Justify all lines in string S.