Browse Source

Fix 9323857 (again^2)

Thanks to Florian Beck for providing the right fix.
Bastien Guerry 11 years ago
parent
commit
49a9c2b213
1 changed files with 2 additions and 4 deletions
  1. 2 4
      lisp/org-src.el

+ 2 - 4
lisp/org-src.el

@@ -737,10 +737,8 @@ with \",*\", \",#+\", \",,*\" and \",,#+\"."
       (unless (or single preserve-indentation (= total-nindent 0))
 	(setq indent (make-string total-nindent ?\ ))
 	(goto-char (point-min))
-        (while (and (not (eobp)) (re-search-forward "^" nil t))
-          (if (not (looking-at "$"))
-              (replace-match indent)
-	    (forward-char 1))))
+	(while (re-search-forward "\\(^\\).+" nil t)
+	  (replace-match indent nil nil nil 1)))
       (if (org-bound-and-true-p org-edit-src-picture)
 	  (setq total-nindent (+ total-nindent 2)))
       (setq code (buffer-string))