Browse Source

Merge branch 'maint' of orgmode.org:org-mode into maint

Bastien Guerry 12 years ago
parent
commit
7efb9cb7ed
1 changed files with 5 additions and 2 deletions
  1. 5 2
      lisp/org.el

+ 5 - 2
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