From 9323857411587db10b51621bc1fb5370e527866d Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Wed, 12 Mar 2014 19:08:17 +0100 Subject: [PATCH] org-src.el (org-edit-src-exit): Don't add indentation on empty lines * org-src.el (org-edit-src-exit): Don't add indentation on empty lines. TINYCHANGE --- lisp/org-src.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/org-src.el b/lisp/org-src.el index 4ca123df5..6f481e07a 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -737,8 +737,10 @@ with \",*\", \",#+\", \",,*\" and \",,#+\"." (unless (or single preserve-indentation (= total-nindent 0)) (setq indent (make-string total-nindent ?\ )) (goto-char (point-min)) - (while (re-search-forward "^" nil t) - (replace-match indent))) + (while (re-search-forward "^" nil t) + (if (not (looking-at "$")) + (replace-match indent) + (forward-char 1)))) (if (org-bound-and-true-p org-edit-src-picture) (setq total-nindent (+ total-nindent 2))) (setq code (buffer-string))