From aab16ffdf4a661ef37f30ca8f18f5c7fb223cbe6 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 8 Aug 2011 18:32:32 +0200 Subject: [PATCH] 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. --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 11eaf780e..ba7f0498c 100644 --- a/lisp/org.el +++ b/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)