From 8d599a4eb23f5ca60162965d5e78d8ad7afff0be Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sun, 2 Sep 2012 15:01:00 +0200 Subject: [PATCH] Make sure fill prefix is computed from beginning of line * lisp/org.el (org-adaptive-fill-function): Make sure fill prefix is computed from beginning of line. --- lisp/org.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 162179aee..d1698e16b 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -21061,7 +21061,8 @@ meant to be filled." (make-string (org-list-item-body-column (org-element-property :begin parent)) ? )) - ((looking-at "[ \t]+") (match-string 0)) + ((save-excursion (beginning-of-line) (looking-at "[ \t]+")) + (match-string 0)) (t "")))) (comment-block ;; Only fill contents if P is within block boundaries. @@ -21073,7 +21074,9 @@ meant to be filled." (skip-chars-backward " \r\t\n") (line-beginning-position)))) (when (and (>= p cbeg) (< p cend)) - (if (looking-at "[ \t]+") (match-string 0) "")))))))))) + (if (save-excursion (beginning-of-line) (looking-at "[ \t]+")) + (match-string 0) + "")))))))))) (declare-function message-goto-body "message" ()) (defvar message-cite-prefix-regexp) ; From message.el -- 2.11.4.GIT