[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] [PATCH] fix bug in org-exp-blocks, removing src code indentati

From: Eric Schulte
Subject: [Orgmode] [PATCH] fix bug in org-exp-blocks, removing src code indentation
Date: Mon, 17 Aug 2009 14:49:41 -0600
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (darwin)


Please apply the attached patch which replaces `indent-region' with
`indent-code-rigidly' in org-exp-blocks.  This fixes the problem of
indentation being removed from source-code blocks.

Thanks -- Eric

diff --git a/lisp/org-exp-blocks.el b/lisp/org-exp-blocks.el
index 6025ce7..8df0ac1 100644
--- a/lisp/org-exp-blocks.el
+++ b/lisp/org-exp-blocks.el
@@ -203,9 +203,8 @@ specified in BLOCKS which default to the value of
                                    (apply func (save-match-data 
(org-remove-indentation (match-stri
                                           (split-string (match-string 3) " 
")))) t t)
-                ;; indent the replaced match
-                (indent-region (match-beginning 0) (match-end 0) indentation)
-                ))
+                ;; indent block
+                (indent-code-rigidly (match-beginning 0) (match-end 0) 
          (setf start (save-match-data (match-end 0))))
        (mapcar (lambda (type)
                  (interblock start (point-max) type))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]