From 0135cb9c33c89593ced16cf4a5c5daf155b087c9 Mon Sep 17 00:00:00 2001 From: Jambunathan K Date: Sat, 19 Feb 2011 22:26:10 +0530 Subject: [PATCH] org-export-preprocess-string: Use backend var --- lisp/org-exp.el | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/lisp/org-exp.el b/lisp/org-exp.el index 964e18e1f..f95018334 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -1197,23 +1197,11 @@ on this string to produce the exported version." ;; Another hook (run-hooks 'org-export-preprocess-before-backend-specifics-hook) - ;; LaTeX-specific preprocessing - (when (eq backend 'latex) - (require 'org-latex nil) - (org-export-latex-preprocess parameters)) - - ;; ASCII-specific preprocessing - (when (eq backend 'ascii) - (org-export-ascii-preprocess parameters)) - - ;; HTML-specific preprocessing - (when (eq backend 'html) - (org-export-html-preprocess parameters)) - - ;; DocBook-specific preprocessing - (when (eq backend 'docbook) - (require 'org-docbook nil) - (org-export-docbook-preprocess parameters)) + ;; Backend-specific preprocessing + (let* ((backend-name (symbol-name backend)) + (f (intern (format "org-export-%s-preprocess" backend-name)))) + (require (intern (concat "org-" backend-name)) nil) + (funcall f parameters)) ;; Remove or replace comments (org-export-handle-comments (plist-get parameters :comments)) -- 2.11.4.GIT