Browse Source

Fix `newline-and-indent' in a list when called on a line being filled

* lisp/org.el (org-return): when filling happens, `newline' can change
  match data, hence modifying the indent column.
Nicolas Goaziou 13 years ago
parent
commit
aab16ffdf4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/org.el

+ 1 - 1
lisp/org.el

@@ -17940,7 +17940,7 @@ See the individual commands for more information."
    ((and (org-in-item-p) indent)
     (if (and (org-at-item-p) (>= (point) (match-end 0)))
 	(progn
-	  (newline)
+	  (save-match-data (newline))
 	  (org-indent-line-to (length (match-string 0))))
       (let ((ind (org-get-indentation)))
 	(newline)