Browse Source

Fix indentation in code export

Patch by Eric Schulte.
Carsten Dominik 15 years ago
parent
commit
e9cdfce08c
2 changed files with 5 additions and 3 deletions
  1. 3 0
      lisp/ChangeLog
  2. 2 3
      lisp/org-exp-blocks.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2009-08-18  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-exp-blocks.el (org-export-blocks-preprocess): Use
+	`indent-code-rigidly' to indent.
+
 	* org-agenda.el (org-agenda-get-restriction-and-command): Remove
 	properties only if MATCH really is a string.
 

+ 2 - 3
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-string 4)))
                                           (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) indentation)))
 	  (setf start (save-match-data (match-end 0))))
 	(mapcar (lambda (type)
 		  (interblock start (point-max) type))