Преглед на файлове

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.
Nicolas Goaziou преди 12 години
родител
ревизия
8d599a4eb2
променени са 1 файла, в които са добавени 5 реда и са изтрити 2 реда
  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