summaryrefslogtreecommitdiff
path: root/lisp/org/org-exp-blocks.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/org/org-exp-blocks.el')
-rw-r--r--lisp/org/org-exp-blocks.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/org/org-exp-blocks.el b/lisp/org/org-exp-blocks.el
index fd0dbca4e2d..90cb610c538 100644
--- a/lisp/org/org-exp-blocks.el
+++ b/lisp/org/org-exp-blocks.el
@@ -4,6 +4,7 @@
;; Free Software Foundation, Inc.
;; Author: Eric Schulte
+;; Version: 6.35i
;; This file is part of GNU Emacs.
;;
@@ -166,7 +167,7 @@ specified in BLOCKS which default to the value of
(save-window-excursion
(let ((case-fold-search t)
(types '())
- indentation type func start body headers preserve-indent)
+ indentation type func start body headers preserve-indent progress-marker)
(flet ((interblock (start end)
(mapcar (lambda (pair) (funcall (second pair) start end))
org-export-interblocks)))
@@ -183,13 +184,15 @@ specified in BLOCKS which default to the value of
(setq body (save-match-data (org-remove-indentation body))))
(unless (memq type types) (setq types (cons type types)))
(save-match-data (interblock start (match-beginning 0)))
- (if (setq func (cadr (assoc type org-export-blocks)))
- (progn
- (replace-match (save-match-data
+ (when (setq func (cadr (assoc type org-export-blocks)))
+ (let ((replacement (save-match-data
(if (memq type org-export-blocks-witheld) ""
- (apply func body headers))) t t)
+ (apply func body headers)))))
+ (when replacement
+ (replace-match replacement t t)
(unless preserve-indent
- (indent-code-rigidly (match-beginning 0) (match-end 0) indentation))))
+ (indent-code-rigidly
+ (match-beginning 0) (match-end 0) indentation)))))
(setq start (match-end 0)))
(interblock start (point-max))))))