From 095f9322e5aaf6907f92ade78260ae4d802c86cb Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Fri, 24 Aug 2012 10:41:41 +0200 Subject: [PATCH] org-export: Make sure back-end specific filters do not make any back-end check * contrib/lisp/org-e-ascii.el (org-e-ascii-filter-headline-blank-lines): Remove backend check. * contrib/lisp/org-e-texinfo.el (org-e-texinfo-filter-section-blank-lines): Remove backend check. * contrib/lisp/org-export.el (org-export-define-backend): Update docstring accordingly. --- contrib/lisp/org-e-ascii.el | 2 +- contrib/lisp/org-e-texinfo.el | 5 ++--- contrib/lisp/org-export.el | 4 +++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/contrib/lisp/org-e-ascii.el b/contrib/lisp/org-e-ascii.el index 0d5da54e7..ad0f1b3c5 100644 --- a/contrib/lisp/org-e-ascii.el +++ b/contrib/lisp/org-e-ascii.el @@ -1726,7 +1726,7 @@ This function only applies to `e-ascii' back-end. See `org-e-ascii-headline-spacing' for information. For any other back-end, HEADLINE is returned as-is." - (if (not (and (eq back-end 'e-ascii) org-e-ascii-headline-spacing)) headline + (if (not org-e-ascii-headline-spacing) headline (let ((blanks (make-string (1+ (cdr org-e-ascii-headline-spacing)) ?\n))) (replace-regexp-in-string "\n\\(?:\n[ \t]*\\)*\\'" blanks headline)))) diff --git a/contrib/lisp/org-e-texinfo.el b/contrib/lisp/org-e-texinfo.el index f992d8c8a..dd8c5600f 100644 --- a/contrib/lisp/org-e-texinfo.el +++ b/contrib/lisp/org-e-texinfo.el @@ -420,9 +420,8 @@ file name, %b by the file base name \(i.e without extension) and (defun org-e-texinfo-filter-section-blank-lines (headline back-end info) "Filter controlling number of blank lines after a section." - (if (not (eq back-end 'e-texinfo)) headline - (let ((blanks (make-string 2 ?\n))) - (replace-regexp-in-string "\n\\(?:\n[ \t]*\\)*\\'" blanks headline)))) + (let ((blanks (make-string 2 ?\n))) + (replace-regexp-in-string "\n\\(?:\n[ \t]*\\)*\\'" blanks headline))) (defun org-e-texinfo--find-copying (info) "Retrieve the headline identified by the property :copying:. diff --git a/contrib/lisp/org-export.el b/contrib/lisp/org-export.el index 57bbc437f..891424c13 100644 --- a/contrib/lisp/org-export.el +++ b/contrib/lisp/org-export.el @@ -745,7 +745,9 @@ keywords are understood: Alist between filters and function, or list of functions, specific to the back-end. See `org-export-filters-alist' for - a list of all allowed filters. + a list of all allowed filters. Filters defined here + shouldn't make a back-end test, as it may prevent back-ends + derived from this one to behave properly. :options-alist -- 2.11.4.GIT