summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2012-09-02 15:01:00 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2012-09-02 15:01:00 +0200
commit8d599a4eb23f5ca60162965d5e78d8ad7afff0be (patch)
tree3b02d2e1160335d7cf673f1352934d8862e6db4f
parentc7b3c56efd63eaa54428c73c15dea4ec134cb11f (diff)
downloadorg-mode-8d599a4eb23f5ca60162965d5e78d8ad7afff0be.tar.gz
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.
-rw-r--r--lisp/org.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 162179a..d1698e1 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