Browse Source

ox.el (org-export-define-backend, org-export-define-derived-backend): Use defuns

* ox.el (org-export-define-backend)
(org-export-define-derived-backend): Make defuns and update
docstrings.

* ox-texinfo.el (texinfo):
* ox-org.el (org):
* ox-odt.el (odt):
* ox-md.el (md):
* ox-man.el (man):
* ox-latex.el (latex):
* ox-icalendar.el (icalendar):
* ox-html.el (html):
* ox-beamer.el (beamer):
* ox-ascii.el (ascii): Use the defuns.
Bastien Guerry 7 years ago
parent
commit
a13b19e384
11 changed files with 590 additions and 598 deletions
  1. 90 90
      lisp/ox-ascii.el
  2. 27 27
      lisp/ox-beamer.el
  3. 77 77
      lisp/ox-html.el
  4. 22 22
      lisp/ox-icalendar.el
  5. 69 69
      lisp/ox-latex.el
  6. 61 61
      lisp/ox-man.el
  7. 36 36
      lisp/ox-md.el
  8. 62 62
      lisp/ox-odt.el
  9. 51 51
      lisp/ox-org.el
  10. 60 60
      lisp/ox-texinfo.el
  11. 35 43
      lisp/ox.el

+ 90 - 90
lisp/ox-ascii.el

@@ -54,83 +54,83 @@
 ;; We also install a filter for headlines and sections, in order to
 ;; control blank lines separating them in output string.
 
-(org-export-define-backend ascii
-  ((bold . org-ascii-bold)
-   (center-block . org-ascii-center-block)
-   (clock . org-ascii-clock)
-   (code . org-ascii-code)
-   (comment . (lambda (&rest args) ""))
-   (comment-block . (lambda (&rest args) ""))
-   (drawer . org-ascii-drawer)
-   (dynamic-block . org-ascii-dynamic-block)
-   (entity . org-ascii-entity)
-   (example-block . org-ascii-example-block)
-   (export-block . org-ascii-export-block)
-   (export-snippet . org-ascii-export-snippet)
-   (fixed-width . org-ascii-fixed-width)
-   (footnote-definition . org-ascii-footnote-definition)
-   (footnote-reference . org-ascii-footnote-reference)
-   (headline . org-ascii-headline)
-   (horizontal-rule . org-ascii-horizontal-rule)
-   (inline-src-block . org-ascii-inline-src-block)
-   (inlinetask . org-ascii-inlinetask)
-   (inner-template . org-ascii-inner-template)
-   (italic . org-ascii-italic)
-   (item . org-ascii-item)
-   (keyword . org-ascii-keyword)
-   (latex-environment . org-ascii-latex-environment)
-   (latex-fragment . org-ascii-latex-fragment)
-   (line-break . org-ascii-line-break)
-   (link . org-ascii-link)
-   (paragraph . org-ascii-paragraph)
-   (plain-list . org-ascii-plain-list)
-   (plain-text . org-ascii-plain-text)
-   (planning . org-ascii-planning)
-   (quote-block . org-ascii-quote-block)
-   (quote-section . org-ascii-quote-section)
-   (radio-target . org-ascii-radio-target)
-   (section . org-ascii-section)
-   (special-block . org-ascii-special-block)
-   (src-block . org-ascii-src-block)
-   (statistics-cookie . org-ascii-statistics-cookie)
-   (strike-through . org-ascii-strike-through)
-   (subscript . org-ascii-subscript)
-   (superscript . org-ascii-superscript)
-   (table . org-ascii-table)
-   (table-cell . org-ascii-table-cell)
-   (table-row . org-ascii-table-row)
-   (target . org-ascii-target)
-   (template . org-ascii-template)
-   (timestamp . org-ascii-timestamp)
-   (underline . org-ascii-underline)
-   (verbatim . org-ascii-verbatim)
-   (verse-block . org-ascii-verse-block))
+(org-export-define-backend 'ascii
+  '((bold . org-ascii-bold)
+    (center-block . org-ascii-center-block)
+    (clock . org-ascii-clock)
+    (code . org-ascii-code)
+    (comment . (lambda (&rest args) ""))
+    (comment-block . (lambda (&rest args) ""))
+    (drawer . org-ascii-drawer)
+    (dynamic-block . org-ascii-dynamic-block)
+    (entity . org-ascii-entity)
+    (example-block . org-ascii-example-block)
+    (export-block . org-ascii-export-block)
+    (export-snippet . org-ascii-export-snippet)
+    (fixed-width . org-ascii-fixed-width)
+    (footnote-definition . org-ascii-footnote-definition)
+    (footnote-reference . org-ascii-footnote-reference)
+    (headline . org-ascii-headline)
+    (horizontal-rule . org-ascii-horizontal-rule)
+    (inline-src-block . org-ascii-inline-src-block)
+    (inlinetask . org-ascii-inlinetask)
+    (inner-template . org-ascii-inner-template)
+    (italic . org-ascii-italic)
+    (item . org-ascii-item)
+    (keyword . org-ascii-keyword)
+    (latex-environment . org-ascii-latex-environment)
+    (latex-fragment . org-ascii-latex-fragment)
+    (line-break . org-ascii-line-break)
+    (link . org-ascii-link)
+    (paragraph . org-ascii-paragraph)
+    (plain-list . org-ascii-plain-list)
+    (plain-text . org-ascii-plain-text)
+    (planning . org-ascii-planning)
+    (quote-block . org-ascii-quote-block)
+    (quote-section . org-ascii-quote-section)
+    (radio-target . org-ascii-radio-target)
+    (section . org-ascii-section)
+    (special-block . org-ascii-special-block)
+    (src-block . org-ascii-src-block)
+    (statistics-cookie . org-ascii-statistics-cookie)
+    (strike-through . org-ascii-strike-through)
+    (subscript . org-ascii-subscript)
+    (superscript . org-ascii-superscript)
+    (table . org-ascii-table)
+    (table-cell . org-ascii-table-cell)
+    (table-row . org-ascii-table-row)
+    (target . org-ascii-target)
+    (template . org-ascii-template)
+    (timestamp . org-ascii-timestamp)
+    (underline . org-ascii-underline)
+    (verbatim . org-ascii-verbatim)
+    (verse-block . org-ascii-verse-block))
   :export-block "ASCII"
   :menu-entry
-  (?t "Export to Plain Text"
-      ((?A "As ASCII buffer"
-	   (lambda (a s v b)
-	     (org-ascii-export-as-ascii a s v b '(:ascii-charset ascii))))
-       (?a "As ASCII file"
-	   (lambda (a s v b)
-	     (org-ascii-export-to-ascii a s v b '(:ascii-charset ascii))))
-       (?L "As Latin1 buffer"
-	   (lambda (a s v b)
-	     (org-ascii-export-as-ascii a s v b '(:ascii-charset latin1))))
-       (?l "As Latin1 file"
-	   (lambda (a s v b)
-	     (org-ascii-export-to-ascii a s v b '(:ascii-charset latin1))))
-       (?U "As UTF-8 buffer"
-	   (lambda (a s v b)
-	     (org-ascii-export-as-ascii a s v b '(:ascii-charset utf-8))))
-       (?u "As UTF-8 file"
-	   (lambda (a s v b)
-	     (org-ascii-export-to-ascii a s v b '(:ascii-charset utf-8))))))
-  :filters-alist ((:filter-headline . org-ascii-filter-headline-blank-lines)
-		  (:filter-parse-tree org-ascii-filter-paragraph-spacing
-				      org-ascii-filter-comment-spacing)
-		  (:filter-section . org-ascii-filter-headline-blank-lines))
-  :options-alist ((:ascii-charset nil nil org-ascii-charset)))
+  '(?t "Export to Plain Text"
+       ((?A "As ASCII buffer"
+	    (lambda (a s v b)
+	      (org-ascii-export-as-ascii a s v b '(:ascii-charset ascii))))
+	(?a "As ASCII file"
+	    (lambda (a s v b)
+	      (org-ascii-export-to-ascii a s v b '(:ascii-charset ascii))))
+	(?L "As Latin1 buffer"
+	    (lambda (a s v b)
+	      (org-ascii-export-as-ascii a s v b '(:ascii-charset latin1))))
+	(?l "As Latin1 file"
+	    (lambda (a s v b)
+	      (org-ascii-export-to-ascii a s v b '(:ascii-charset latin1))))
+	(?U "As UTF-8 buffer"
+	    (lambda (a s v b)
+	      (org-ascii-export-as-ascii a s v b '(:ascii-charset utf-8))))
+	(?u "As UTF-8 file"
+	    (lambda (a s v b)
+	      (org-ascii-export-to-ascii a s v b '(:ascii-charset utf-8))))))
+  :filters-alist '((:filter-headline . org-ascii-filter-headline-blank-lines)
+		   (:filter-parse-tree org-ascii-filter-paragraph-spacing
+				       org-ascii-filter-comment-spacing)
+		   (:filter-section . org-ascii-filter-headline-blank-lines))
+  :options-alist '((:ascii-charset nil nil org-ascii-charset)))
 
 
 
@@ -239,8 +239,8 @@ Possible values are:
 	  (const :tag "UTF-8" utf-8)))
 
 (defcustom org-ascii-underline '((ascii ?= ?~ ?-)
-				   (latin1 ?= ?~ ?-)
-				   (utf-8 ?═ ?─ ?╌ ?┄ ?┈))
+				 (latin1 ?= ?~ ?-)
+				 (utf-8 ?═ ?─ ?╌ ?┄ ?┈))
   "Characters for underlining headings in ASCII export.
 
 Alist whose key is a symbol among `ascii', `latin1' and `utf-8'
@@ -1895,15 +1895,15 @@ is non-nil."
   (interactive)
   (if async
       (org-export-async-start
-	  (lambda (output)
-	    (with-current-buffer (get-buffer-create "*Org ASCII Export*")
-	      (erase-buffer)
-	      (insert output)
-	      (goto-char (point-min))
-	      (text-mode)
-	      (org-export-add-to-stack (current-buffer) 'ascii)))
-	`(org-export-as 'ascii ,subtreep ,visible-only ,body-only
-			',ext-plist))
+       (lambda (output)
+	 (with-current-buffer (get-buffer-create "*Org ASCII Export*")
+	   (erase-buffer)
+	   (insert output)
+	   (goto-char (point-min))
+	   (text-mode)
+	   (org-export-add-to-stack (current-buffer) 'ascii)))
+       `(org-export-as 'ascii ,subtreep ,visible-only ,body-only
+		       ',ext-plist))
     (let ((outbuf (org-export-to-buffer
 		   'ascii "*Org ASCII Export*"
 		   subtreep visible-only body-only ext-plist)))
@@ -1944,10 +1944,10 @@ Return output file's name."
   (let ((outfile (org-export-output-file-name ".txt" subtreep)))
     (if async
 	(org-export-async-start
-	    (lambda (f) (org-export-add-to-stack f 'ascii))
-	  `(expand-file-name
-	    (org-export-to-file
-	     'ascii ,outfile ,subtreep ,visible-only ,body-only ',ext-plist)))
+	 (lambda (f) (org-export-add-to-stack f 'ascii))
+	 `(expand-file-name
+	   (org-export-to-file
+	    'ascii ,outfile ,subtreep ,visible-only ,body-only ',ext-plist)))
       (org-export-to-file
        'ascii outfile subtreep visible-only body-only ext-plist))))
 

+ 27 - 27
lisp/ox-beamer.el

@@ -293,36 +293,36 @@ Return overlay specification, as a string, or nil."
 
 ;;; Define Back-End
 
-(org-export-define-derived-backend beamer latex
+(org-export-define-derived-backend 'beamer 'latex
   :export-block "BEAMER"
   :menu-entry
-  (?l 1
-      ((?B "As LaTeX buffer (Beamer)" org-beamer-export-as-latex)
-       (?b "As LaTeX file (Beamer)" org-beamer-export-to-latex)
-       (?P "As PDF file (Beamer)" org-beamer-export-to-pdf)
-       (?O "As PDF file and open (Beamer)"
-	   (lambda (a s v b)
-	     (if a (org-beamer-export-to-pdf t s v b)
-	       (org-open-file (org-beamer-export-to-pdf nil s v b)))))))
+  '(?l 1
+       ((?B "As LaTeX buffer (Beamer)" org-beamer-export-as-latex)
+	(?b "As LaTeX file (Beamer)" org-beamer-export-to-latex)
+	(?P "As PDF file (Beamer)" org-beamer-export-to-pdf)
+	(?O "As PDF file and open (Beamer)"
+	    (lambda (a s v b)
+	      (if a (org-beamer-export-to-pdf t s v b)
+		(org-open-file (org-beamer-export-to-pdf nil s v b)))))))
   :options-alist
-  ((:beamer-theme "BEAMER_THEME" nil org-beamer-theme)
-   (:beamer-color-theme "BEAMER_COLOR_THEME" nil nil t)
-   (:beamer-font-theme "BEAMER_FONT_THEME" nil nil t)
-   (:beamer-inner-theme "BEAMER_INNER_THEME" nil nil t)
-   (:beamer-outer-theme "BEAMER_OUTER_THEME" nil nil t)
-   (:beamer-header-extra "BEAMER_HEADER" nil nil newline)
-   (:headline-levels nil "H" org-beamer-frame-level))
-  :translate-alist ((bold . org-beamer-bold)
-		    (export-block . org-beamer-export-block)
-		    (export-snippet . org-beamer-export-snippet)
-		    (headline . org-beamer-headline)
-		    (item . org-beamer-item)
-		    (keyword . org-beamer-keyword)
-		    (link . org-beamer-link)
-		    (plain-list . org-beamer-plain-list)
-		    (radio-target . org-beamer-radio-target)
-		    (target . org-beamer-target)
-		    (template . org-beamer-template)))
+  '((:beamer-theme "BEAMER_THEME" nil org-beamer-theme)
+    (:beamer-color-theme "BEAMER_COLOR_THEME" nil nil t)
+    (:beamer-font-theme "BEAMER_FONT_THEME" nil nil t)
+    (:beamer-inner-theme "BEAMER_INNER_THEME" nil nil t)
+    (:beamer-outer-theme "BEAMER_OUTER_THEME" nil nil t)
+    (:beamer-header-extra "BEAMER_HEADER" nil nil newline)
+    (:headline-levels nil "H" org-beamer-frame-level))
+  :translate-alist '((bold . org-beamer-bold)
+		     (export-block . org-beamer-export-block)
+		     (export-snippet . org-beamer-export-snippet)
+		     (headline . org-beamer-headline)
+		     (item . org-beamer-item)
+		     (keyword . org-beamer-keyword)
+		     (link . org-beamer-link)
+		     (plain-list . org-beamer-plain-list)
+		     (radio-target . org-beamer-radio-target)
+		     (target . org-beamer-target)
+		     (template . org-beamer-template)))
 
 
 

+ 77 - 77
lisp/ox-html.el

@@ -49,86 +49,86 @@
 
 ;;; Define Back-End
 
-(org-export-define-backend html
-  ((bold . org-html-bold)
-   (center-block . org-html-center-block)
-   (clock . org-html-clock)
-   (code . org-html-code)
-   (drawer . org-html-drawer)
-   (dynamic-block . org-html-dynamic-block)
-   (entity . org-html-entity)
-   (example-block . org-html-example-block)
-   (export-block . org-html-export-block)
-   (export-snippet . org-html-export-snippet)
-   (fixed-width . org-html-fixed-width)
-   (footnote-definition . org-html-footnote-definition)
-   (footnote-reference . org-html-footnote-reference)
-   (headline . org-html-headline)
-   (horizontal-rule . org-html-horizontal-rule)
-   (inline-src-block . org-html-inline-src-block)
-   (inlinetask . org-html-inlinetask)
-   (inner-template . org-html-inner-template)
-   (italic . org-html-italic)
-   (item . org-html-item)
-   (keyword . org-html-keyword)
-   (latex-environment . org-html-latex-environment)
-   (latex-fragment . org-html-latex-fragment)
-   (line-break . org-html-line-break)
-   (link . org-html-link)
-   (paragraph . org-html-paragraph)
-   (plain-list . org-html-plain-list)
-   (plain-text . org-html-plain-text)
-   (planning . org-html-planning)
-   (property-drawer . org-html-property-drawer)
-   (quote-block . org-html-quote-block)
-   (quote-section . org-html-quote-section)
-   (radio-target . org-html-radio-target)
-   (section . org-html-section)
-   (special-block . org-html-special-block)
-   (src-block . org-html-src-block)
-   (statistics-cookie . org-html-statistics-cookie)
-   (strike-through . org-html-strike-through)
-   (subscript . org-html-subscript)
-   (superscript . org-html-superscript)
-   (table . org-html-table)
-   (table-cell . org-html-table-cell)
-   (table-row . org-html-table-row)
-   (target . org-html-target)
-   (template . org-html-template)
-   (timestamp . org-html-timestamp)
-   (underline . org-html-underline)
-   (verbatim . org-html-verbatim)
-   (verse-block . org-html-verse-block))
+(org-export-define-backend 'html
+  '((bold . org-html-bold)
+    (center-block . org-html-center-block)
+    (clock . org-html-clock)
+    (code . org-html-code)
+    (drawer . org-html-drawer)
+    (dynamic-block . org-html-dynamic-block)
+    (entity . org-html-entity)
+    (example-block . org-html-example-block)
+    (export-block . org-html-export-block)
+    (export-snippet . org-html-export-snippet)
+    (fixed-width . org-html-fixed-width)
+    (footnote-definition . org-html-footnote-definition)
+    (footnote-reference . org-html-footnote-reference)
+    (headline . org-html-headline)
+    (horizontal-rule . org-html-horizontal-rule)
+    (inline-src-block . org-html-inline-src-block)
+    (inlinetask . org-html-inlinetask)
+    (inner-template . org-html-inner-template)
+    (italic . org-html-italic)
+    (item . org-html-item)
+    (keyword . org-html-keyword)
+    (latex-environment . org-html-latex-environment)
+    (latex-fragment . org-html-latex-fragment)
+    (line-break . org-html-line-break)
+    (link . org-html-link)
+    (paragraph . org-html-paragraph)
+    (plain-list . org-html-plain-list)
+    (plain-text . org-html-plain-text)
+    (planning . org-html-planning)
+    (property-drawer . org-html-property-drawer)
+    (quote-block . org-html-quote-block)
+    (quote-section . org-html-quote-section)
+    (radio-target . org-html-radio-target)
+    (section . org-html-section)
+    (special-block . org-html-special-block)
+    (src-block . org-html-src-block)
+    (statistics-cookie . org-html-statistics-cookie)
+    (strike-through . org-html-strike-through)
+    (subscript . org-html-subscript)
+    (superscript . org-html-superscript)
+    (table . org-html-table)
+    (table-cell . org-html-table-cell)
+    (table-row . org-html-table-row)
+    (target . org-html-target)
+    (template . org-html-template)
+    (timestamp . org-html-timestamp)
+    (underline . org-html-underline)
+    (verbatim . org-html-verbatim)
+    (verse-block . org-html-verse-block))
   :export-block "HTML"
-  :filters-alist ((:filter-options . org-html-infojs-install-script)
-		  (:filter-final-output . org-html-final-function))
+  :filters-alist '((:filter-options . org-html-infojs-install-script)
+		   (:filter-final-output . org-html-final-function))
   :menu-entry
-  (?h "Export to HTML"
-      ((?H "As HTML buffer" org-html-export-as-html)
-       (?h "As HTML file" org-html-export-to-html)
-       (?o "As HTML file and open"
-	   (lambda (a s v b)
-	     (if a (org-html-export-to-html t s v b)
-	       (org-open-file (org-html-export-to-html nil s v b)))))))
+  '(?h "Export to HTML"
+       ((?H "As HTML buffer" org-html-export-as-html)
+	(?h "As HTML file" org-html-export-to-html)
+	(?o "As HTML file and open"
+	    (lambda (a s v b)
+	      (if a (org-html-export-to-html t s v b)
+		(org-open-file (org-html-export-to-html nil s v b)))))))
   :options-alist
-  ((:html-extension nil nil org-html-extension)
-   (:html-doctype "HTML_DOCTYPE" nil org-html-doctype)
-   (:html-container "HTML_CONTAINER" nil org-html-container-element)
-   (:html-link-home "HTML_LINK_HOME" nil org-html-link-home)
-   (:html-link-up "HTML_LINK_UP" nil org-html-link-up)
-   (:html-mathjax "HTML_MATHJAX" nil "" space)
-   (:html-postamble nil "html-postamble" org-html-postamble)
-   (:html-preamble nil "html-preamble" org-html-preamble)
-   (:html-head "HTML_HEAD" nil org-html-head newline)
-   (:html-head-extra "HTML_HEAD_EXTRA" nil org-html-head-extra newline)
-   (:html-head-include-default-style "HTML_INCLUDE_STYLE" nil org-html-head-include-default-style newline)
-   (:html-head-include-scripts "HTML_INCLUDE_SCRIPTS" nil org-html-head-include-scripts newline)
-   (:html-table-tag nil nil org-html-table-tag)
-   ;; Redefine regular options.
-   (:creator "CREATOR" nil org-html-creator-string)
-   (:with-latex nil "tex" org-html-with-latex)
-   ;; Leave room for "ox-infojs.el" extension.
-   (:infojs-opt "INFOJS_OPT" nil nil)))
+  '((:html-extension nil nil org-html-extension)
+    (:html-doctype "HTML_DOCTYPE" nil org-html-doctype)
+    (:html-container "HTML_CONTAINER" nil org-html-container-element)
+    (:html-link-home "HTML_LINK_HOME" nil org-html-link-home)
+    (:html-link-up "HTML_LINK_UP" nil org-html-link-up)
+    (:html-mathjax "HTML_MATHJAX" nil "" space)
+    (:html-postamble nil "html-postamble" org-html-postamble)
+    (:html-preamble nil "html-preamble" org-html-preamble)
+    (:html-head "HTML_HEAD" nil org-html-head newline)
+    (:html-head-extra "HTML_HEAD_EXTRA" nil org-html-head-extra newline)
+    (:html-head-include-default-style "HTML_INCLUDE_STYLE" nil org-html-head-include-default-style newline)
+    (:html-head-include-scripts "HTML_INCLUDE_SCRIPTS" nil org-html-head-include-scripts newline)
+    (:html-table-tag nil nil org-html-table-tag)
+    ;; Redefine regular options.
+    (:creator "CREATOR" nil org-html-creator-string)
+    (:with-latex nil "tex" org-html-with-latex)
+    ;; Leave room for "ox-infojs.el" extension.
+    (:infojs-opt "INFOJS_OPT" nil nil)))
 
 
 ;;; Internal Variables

+ 22 - 22
lisp/ox-icalendar.el

@@ -255,31 +255,31 @@ re-read the iCalendar file.")
 
 ;;; Define Back-End
 
-(org-export-define-derived-backend icalendar ascii
-  :translate-alist ((clock . ignore)
-		    (headline . org-icalendar-entry)
-		    (inlinetask . ignore)
-		    (planning . ignore)
-		    (section . ignore)
-		    (template . org-icalendar-template))
+(org-export-define-derived-backend 'icalendar 'ascii
+  :translate-alist '((clock . ignore)
+		     (headline . org-icalendar-entry)
+		     (inlinetask . ignore)
+		     (planning . ignore)
+		     (section . ignore)
+		     (template . org-icalendar-template))
   :options-alist
-  ((:exclude-tags
-    "ICALENDAR_EXCLUDE_TAGS" nil org-icalendar-exclude-tags split)
-   (:with-timestamps nil "<" org-icalendar-with-timestamps)
-   (:with-vtodo nil nil org-icalendar-include-todo)
-   ;; The following property will be non-nil when export has been
-   ;; started from org-agenda-mode.  In this case, any entry without
-   ;; a non-nil "ICALENDAR_MARK" property will be ignored.
-   (:icalendar-agenda-view nil nil nil))
+  '((:exclude-tags
+     "ICALENDAR_EXCLUDE_TAGS" nil org-icalendar-exclude-tags split)
+    (:with-timestamps nil "<" org-icalendar-with-timestamps)
+    (:with-vtodo nil nil org-icalendar-include-todo)
+    ;; The following property will be non-nil when export has been
+    ;; started from org-agenda-mode.  In this case, any entry without
+    ;; a non-nil "ICALENDAR_MARK" property will be ignored.
+    (:icalendar-agenda-view nil nil nil))
   :filters-alist
-  ((:filter-headline . org-icalendar-clear-blank-lines))
+  '((:filter-headline . org-icalendar-clear-blank-lines))
   :menu-entry
-  (?c "Export to iCalendar"
-      ((?f "Current file" org-icalendar-export-to-ics)
-       (?a "All agenda files"
-	   (lambda (a s v b) (org-icalendar-export-agenda-files a)))
-       (?c "Combine all agenda files"
-	   (lambda (a s v b) (org-icalendar-combine-agenda-files a))))))
+  '(?c "Export to iCalendar"
+       ((?f "Current file" org-icalendar-export-to-ics)
+	(?a "All agenda files"
+	    (lambda (a s v b) (org-icalendar-export-agenda-files a)))
+	(?c "Combine all agenda files"
+	    (lambda (a s v b) (org-icalendar-combine-agenda-files a))))))
 
 
 

+ 69 - 69
lisp/ox-latex.el

@@ -115,76 +115,76 @@
 
 ;;; Define Back-End
 
-(org-export-define-backend latex
-  ((bold . org-latex-bold)
-   (center-block . org-latex-center-block)
-   (clock . org-latex-clock)
-   (code . org-latex-code)
-   (comment . (lambda (&rest args) ""))
-   (comment-block . (lambda (&rest args) ""))
-   (drawer . org-latex-drawer)
-   (dynamic-block . org-latex-dynamic-block)
-   (entity . org-latex-entity)
-   (example-block . org-latex-example-block)
-   (export-block . org-latex-export-block)
-   (export-snippet . org-latex-export-snippet)
-   (fixed-width . org-latex-fixed-width)
-   (footnote-definition . org-latex-footnote-definition)
-   (footnote-reference . org-latex-footnote-reference)
-   (headline . org-latex-headline)
-   (horizontal-rule . org-latex-horizontal-rule)
-   (inline-src-block . org-latex-inline-src-block)
-   (inlinetask . org-latex-inlinetask)
-   (italic . org-latex-italic)
-   (item . org-latex-item)
-   (keyword . org-latex-keyword)
-   (latex-environment . org-latex-latex-environment)
-   (latex-fragment . org-latex-latex-fragment)
-   (line-break . org-latex-line-break)
-   (link . org-latex-link)
-   (paragraph . org-latex-paragraph)
-   (plain-list . org-latex-plain-list)
-   (plain-text . org-latex-plain-text)
-   (planning . org-latex-planning)
-   (property-drawer . (lambda (&rest args) ""))
-   (quote-block . org-latex-quote-block)
-   (quote-section . org-latex-quote-section)
-   (radio-target . org-latex-radio-target)
-   (section . org-latex-section)
-   (special-block . org-latex-special-block)
-   (src-block . org-latex-src-block)
-   (statistics-cookie . org-latex-statistics-cookie)
-   (strike-through . org-latex-strike-through)
-   (subscript . org-latex-subscript)
-   (superscript . org-latex-superscript)
-   (table . org-latex-table)
-   (table-cell . org-latex-table-cell)
-   (table-row . org-latex-table-row)
-   (target . org-latex-target)
-   (template . org-latex-template)
-   (timestamp . org-latex-timestamp)
-   (underline . org-latex-underline)
-   (verbatim . org-latex-verbatim)
-   (verse-block . org-latex-verse-block))
-  :export-block ("LATEX" "TEX")
+(org-export-define-backend 'latex
+  '((bold . org-latex-bold)
+    (center-block . org-latex-center-block)
+    (clock . org-latex-clock)
+    (code . org-latex-code)
+    (comment . (lambda (&rest args) ""))
+    (comment-block . (lambda (&rest args) ""))
+    (drawer . org-latex-drawer)
+    (dynamic-block . org-latex-dynamic-block)
+    (entity . org-latex-entity)
+    (example-block . org-latex-example-block)
+    (export-block . org-latex-export-block)
+    (export-snippet . org-latex-export-snippet)
+    (fixed-width . org-latex-fixed-width)
+    (footnote-definition . org-latex-footnote-definition)
+    (footnote-reference . org-latex-footnote-reference)
+    (headline . org-latex-headline)
+    (horizontal-rule . org-latex-horizontal-rule)
+    (inline-src-block . org-latex-inline-src-block)
+    (inlinetask . org-latex-inlinetask)
+    (italic . org-latex-italic)
+    (item . org-latex-item)
+    (keyword . org-latex-keyword)
+    (latex-environment . org-latex-latex-environment)
+    (latex-fragment . org-latex-latex-fragment)
+    (line-break . org-latex-line-break)
+    (link . org-latex-link)
+    (paragraph . org-latex-paragraph)
+    (plain-list . org-latex-plain-list)
+    (plain-text . org-latex-plain-text)
+    (planning . org-latex-planning)
+    (property-drawer . (lambda (&rest args) ""))
+    (quote-block . org-latex-quote-block)
+    (quote-section . org-latex-quote-section)
+    (radio-target . org-latex-radio-target)
+    (section . org-latex-section)
+    (special-block . org-latex-special-block)
+    (src-block . org-latex-src-block)
+    (statistics-cookie . org-latex-statistics-cookie)
+    (strike-through . org-latex-strike-through)
+    (subscript . org-latex-subscript)
+    (superscript . org-latex-superscript)
+    (table . org-latex-table)
+    (table-cell . org-latex-table-cell)
+    (table-row . org-latex-table-row)
+    (target . org-latex-target)
+    (template . org-latex-template)
+    (timestamp . org-latex-timestamp)
+    (underline . org-latex-underline)
+    (verbatim . org-latex-verbatim)
+    (verse-block . org-latex-verse-block))
+  :export-block '("LATEX" "TEX")
   :menu-entry
-  (?l "Export to LaTeX"
-      ((?L "As LaTeX buffer" org-latex-export-as-latex)
-       (?l "As LaTeX file" org-latex-export-to-latex)
-       (?p "As PDF file" org-latex-export-to-pdf)
-       (?o "As PDF file and open"
-	   (lambda (a s v b)
-	     (if a (org-latex-export-to-pdf t s v b)
-	       (org-open-file (org-latex-export-to-pdf nil s v b)))))))
-  :options-alist ((:date-format nil nil org-latex-date-timestamp-format)
-		  (:latex-class "LATEX_CLASS" nil org-latex-default-class t)
-		  (:latex-class-options "LATEX_CLASS_OPTIONS" nil nil t)
-		  (:latex-header "LATEX_HEADER" nil nil newline)
-		  (:latex-header-extra "LATEX_HEADER_EXTRA" nil nil newline)
-		  (:latex-hyperref-p nil "texht" org-latex-with-hyperref t)
-		  ;; Redefine regular options.
-		  (:date "DATE" nil "\\today" t)
-		  (:with-smart-quotes nil "'" t)))
+  '(?l "Export to LaTeX"
+       ((?L "As LaTeX buffer" org-latex-export-as-latex)
+	(?l "As LaTeX file" org-latex-export-to-latex)
+	(?p "As PDF file" org-latex-export-to-pdf)
+	(?o "As PDF file and open"
+	    (lambda (a s v b)
+	      (if a (org-latex-export-to-pdf t s v b)
+		(org-open-file (org-latex-export-to-pdf nil s v b)))))))
+  :options-alist '((:date-format nil nil org-latex-date-timestamp-format)
+		   (:latex-class "LATEX_CLASS" nil org-latex-default-class t)
+		   (:latex-class-options "LATEX_CLASS_OPTIONS" nil nil t)
+		   (:latex-header "LATEX_HEADER" nil nil newline)
+		   (:latex-header-extra "LATEX_HEADER_EXTRA" nil nil newline)
+		   (:latex-hyperref-p nil "texht" org-latex-with-hyperref t)
+		   ;; Redefine regular options.
+		   (:date "DATE" nil "\\today" t)
+		   (:with-smart-quotes nil "'" t)))
 
 
 

+ 61 - 61
lisp/ox-man.el

@@ -49,70 +49,70 @@
 
 ;;; Define Back-End
 
-(org-export-define-backend man
-  ((babel-call . org-man-babel-call)
-   (bold . org-man-bold)
-   (center-block . org-man-center-block)
-   (clock . org-man-clock)
-   (code . org-man-code)
-   (comment . (lambda (&rest args) ""))
-   (comment-block . (lambda (&rest args) ""))
-   (drawer . org-man-drawer)
-   (dynamic-block . org-man-dynamic-block)
-   (entity . org-man-entity)
-   (example-block . org-man-example-block)
-   (export-block . org-man-export-block)
-   (export-snippet . org-man-export-snippet)
-   (fixed-width . org-man-fixed-width)
-   (footnote-definition . org-man-footnote-definition)
-   (footnote-reference . org-man-footnote-reference)
-   (headline . org-man-headline)
-   (horizontal-rule . org-man-horizontal-rule)
-   (inline-babel-call . org-man-inline-babel-call)
-   (inline-src-block . org-man-inline-src-block)
-   (inlinetask . org-man-inlinetask)
-   (italic . org-man-italic)
-   (item . org-man-item)
-   (keyword . org-man-keyword)
-   (line-break . org-man-line-break)
-   (link . org-man-link)
-   (paragraph . org-man-paragraph)
-   (plain-list . org-man-plain-list)
-   (plain-text . org-man-plain-text)
-   (planning . org-man-planning)
-   (property-drawer . (lambda (&rest args) ""))
-   (quote-block . org-man-quote-block)
-   (quote-section . org-man-quote-section)
-   (radio-target . org-man-radio-target)
-   (section . org-man-section)
-   (special-block . org-man-special-block)
-   (src-block . org-man-src-block)
-   (statistics-cookie . org-man-statistics-cookie)
-   (strike-through . org-man-strike-through)
-   (subscript . org-man-subscript)
-   (superscript . org-man-superscript)
-   (table . org-man-table)
-   (table-cell . org-man-table-cell)
-   (table-row . org-man-table-row)
-   (target . org-man-target)
-   (template . org-man-template)
-   (timestamp . org-man-timestamp)
-   (underline . org-man-underline)
-   (verbatim . org-man-verbatim)
-   (verse-block . org-man-verse-block))
+(org-export-define-backend 'man
+  '((babel-call . org-man-babel-call)
+    (bold . org-man-bold)
+    (center-block . org-man-center-block)
+    (clock . org-man-clock)
+    (code . org-man-code)
+    (comment . (lambda (&rest args) ""))
+    (comment-block . (lambda (&rest args) ""))
+    (drawer . org-man-drawer)
+    (dynamic-block . org-man-dynamic-block)
+    (entity . org-man-entity)
+    (example-block . org-man-example-block)
+    (export-block . org-man-export-block)
+    (export-snippet . org-man-export-snippet)
+    (fixed-width . org-man-fixed-width)
+    (footnote-definition . org-man-footnote-definition)
+    (footnote-reference . org-man-footnote-reference)
+    (headline . org-man-headline)
+    (horizontal-rule . org-man-horizontal-rule)
+    (inline-babel-call . org-man-inline-babel-call)
+    (inline-src-block . org-man-inline-src-block)
+    (inlinetask . org-man-inlinetask)
+    (italic . org-man-italic)
+    (item . org-man-item)
+    (keyword . org-man-keyword)
+    (line-break . org-man-line-break)
+    (link . org-man-link)
+    (paragraph . org-man-paragraph)
+    (plain-list . org-man-plain-list)
+    (plain-text . org-man-plain-text)
+    (planning . org-man-planning)
+    (property-drawer . (lambda (&rest args) ""))
+    (quote-block . org-man-quote-block)
+    (quote-section . org-man-quote-section)
+    (radio-target . org-man-radio-target)
+    (section . org-man-section)
+    (special-block . org-man-special-block)
+    (src-block . org-man-src-block)
+    (statistics-cookie . org-man-statistics-cookie)
+    (strike-through . org-man-strike-through)
+    (subscript . org-man-subscript)
+    (superscript . org-man-superscript)
+    (table . org-man-table)
+    (table-cell . org-man-table-cell)
+    (table-row . org-man-table-row)
+    (target . org-man-target)
+    (template . org-man-template)
+    (timestamp . org-man-timestamp)
+    (underline . org-man-underline)
+    (verbatim . org-man-verbatim)
+    (verse-block . org-man-verse-block))
   :export-block "MAN"
   :menu-entry
-  (?m "Export to MAN"
-      ((?m "As MAN file" org-man-export-to-man)
-       (?p "As PDF file" org-man-export-to-pdf)
-       (?o "As PDF file and open"
-	   (lambda (a s v b)
-	     (if a (org-man-export-to-pdf t s v b)
-	       (org-open-file (org-man-export-to-pdf nil s v b)))))))
+  '(?m "Export to MAN"
+       ((?m "As MAN file" org-man-export-to-man)
+	(?p "As PDF file" org-man-export-to-pdf)
+	(?o "As PDF file and open"
+	    (lambda (a s v b)
+	      (if a (org-man-export-to-pdf t s v b)
+		(org-open-file (org-man-export-to-pdf nil s v b)))))))
   :options-alist
-  ((:man-class "MAN_CLASS" nil nil t)
-   (:man-class-options "MAN_CLASS_OPTIONS" nil nil t)
-   (:man-header-extra "MAN_HEADER" nil nil newline)))
+  '((:man-class "MAN_CLASS" nil nil t)
+    (:man-class-options "MAN_CLASS_OPTIONS" nil nil t)
+    (:man-header-extra "MAN_HEADER" nil nil newline)))
 
 
 

+ 36 - 36
lisp/ox-md.el

@@ -55,43 +55,43 @@ This variable can be set to either `atx' or `setext'."
 
 ;;; Define Back-End
 
-(org-export-define-derived-backend md html
-  :export-block ("MD" "MARKDOWN")
-  :filters-alist ((:filter-parse-tree . org-md-separate-elements))
+(org-export-define-derived-backend 'md 'html
+  :export-block '("MD" "MARKDOWN")
+  :filters-alist '((:filter-parse-tree . org-md-separate-elements))
   :menu-entry
-  (?m "Export to Markdown"
-      ((?M "To temporary buffer"
-	   (lambda (a s v b) (org-md-export-as-markdown a s v)))
-       (?m "To file" (lambda (a s v b) (org-md-export-to-markdown a s v)))
-       (?o "To file and open"
-	   (lambda (a s v b)
-	     (if a (org-md-export-to-markdown t s v)
-	       (org-open-file (org-md-export-to-markdown nil s v)))))))
-  :translate-alist ((bold . org-md-bold)
-		    (code . org-md-verbatim)
-		    (underline . org-md-verbatim)
-		    (comment . (lambda (&rest args) ""))
-		    (comment-block . (lambda (&rest args) ""))
-		    (example-block . org-md-example-block)
-		    (fixed-width . org-md-example-block)
-		    (footnote-definition . ignore)
-		    (footnote-reference . ignore)
-		    (headline . org-md-headline)
-		    (horizontal-rule . org-md-horizontal-rule)
-		    (inline-src-block . org-md-verbatim)
-		    (italic . org-md-italic)
-		    (item . org-md-item)
-		    (line-break . org-md-line-break)
-		    (link . org-md-link)
-		    (paragraph . org-md-paragraph)
-		    (plain-list . org-md-plain-list)
-		    (plain-text . org-md-plain-text)
-		    (quote-block . org-md-quote-block)
-		    (quote-section . org-md-example-block)
-		    (section . org-md-section)
-		    (src-block . org-md-example-block)
-		    (template . org-md-template)
-		    (verbatim . org-md-verbatim)))
+  '(?m "Export to Markdown"
+       ((?M "To temporary buffer"
+	    (lambda (a s v b) (org-md-export-as-markdown a s v)))
+	(?m "To file" (lambda (a s v b) (org-md-export-to-markdown a s v)))
+	(?o "To file and open"
+	    (lambda (a s v b)
+	      (if a (org-md-export-to-markdown t s v)
+		(org-open-file (org-md-export-to-markdown nil s v)))))))
+  :translate-alist '((bold . org-md-bold)
+		     (code . org-md-verbatim)
+		     (underline . org-md-verbatim)
+		     (comment . (lambda (&rest args) ""))
+		     (comment-block . (lambda (&rest args) ""))
+		     (example-block . org-md-example-block)
+		     (fixed-width . org-md-example-block)
+		     (footnote-definition . ignore)
+		     (footnote-reference . ignore)
+		     (headline . org-md-headline)
+		     (horizontal-rule . org-md-horizontal-rule)
+		     (inline-src-block . org-md-verbatim)
+		     (italic . org-md-italic)
+		     (item . org-md-item)
+		     (line-break . org-md-line-break)
+		     (link . org-md-link)
+		     (paragraph . org-md-paragraph)
+		     (plain-list . org-md-plain-list)
+		     (plain-text . org-md-plain-text)
+		     (quote-block . org-md-quote-block)
+		     (quote-section . org-md-example-block)
+		     (section . org-md-section)
+		     (src-block . org-md-example-block)
+		     (template . org-md-template)
+		     (verbatim . org-md-verbatim)))
 
 
 

+ 62 - 62
lisp/ox-odt.el

@@ -34,71 +34,71 @@
 
 ;;; Define Back-End
 
-(org-export-define-backend odt
-  ((bold . org-odt-bold)
-   (center-block . org-odt-center-block)
-   (clock . org-odt-clock)
-   (code . org-odt-code)
-   (drawer . org-odt-drawer)
-   (dynamic-block . org-odt-dynamic-block)
-   (entity . org-odt-entity)
-   (example-block . org-odt-example-block)
-   (export-block . org-odt-export-block)
-   (export-snippet . org-odt-export-snippet)
-   (fixed-width . org-odt-fixed-width)
-   (footnote-definition . org-odt-footnote-definition)
-   (footnote-reference . org-odt-footnote-reference)
-   (headline . org-odt-headline)
-   (horizontal-rule . org-odt-horizontal-rule)
-   (inline-src-block . org-odt-inline-src-block)
-   (inlinetask . org-odt-inlinetask)
-   (italic . org-odt-italic)
-   (item . org-odt-item)
-   (keyword . org-odt-keyword)
-   (latex-environment . org-odt-latex-environment)
-   (latex-fragment . org-odt-latex-fragment)
-   (line-break . org-odt-line-break)
-   (link . org-odt-link)
-   (paragraph . org-odt-paragraph)
-   (plain-list . org-odt-plain-list)
-   (plain-text . org-odt-plain-text)
-   (planning . org-odt-planning)
-   (property-drawer . org-odt-property-drawer)
-   (quote-block . org-odt-quote-block)
-   (quote-section . org-odt-quote-section)
-   (radio-target . org-odt-radio-target)
-   (section . org-odt-section)
-   (special-block . org-odt-special-block)
-   (src-block . org-odt-src-block)
-   (statistics-cookie . org-odt-statistics-cookie)
-   (strike-through . org-odt-strike-through)
-   (subscript . org-odt-subscript)
-   (superscript . org-odt-superscript)
-   (table . org-odt-table)
-   (table-cell . org-odt-table-cell)
-   (table-row . org-odt-table-row)
-   (target . org-odt-target)
-   (template . org-odt-template)
-   (timestamp . org-odt-timestamp)
-   (underline . org-odt-underline)
-   (verbatim . org-odt-verbatim)
-   (verse-block . org-odt-verse-block))
+(org-export-define-backend 'odt
+  '((bold . org-odt-bold)
+    (center-block . org-odt-center-block)
+    (clock . org-odt-clock)
+    (code . org-odt-code)
+    (drawer . org-odt-drawer)
+    (dynamic-block . org-odt-dynamic-block)
+    (entity . org-odt-entity)
+    (example-block . org-odt-example-block)
+    (export-block . org-odt-export-block)
+    (export-snippet . org-odt-export-snippet)
+    (fixed-width . org-odt-fixed-width)
+    (footnote-definition . org-odt-footnote-definition)
+    (footnote-reference . org-odt-footnote-reference)
+    (headline . org-odt-headline)
+    (horizontal-rule . org-odt-horizontal-rule)
+    (inline-src-block . org-odt-inline-src-block)
+    (inlinetask . org-odt-inlinetask)
+    (italic . org-odt-italic)
+    (item . org-odt-item)
+    (keyword . org-odt-keyword)
+    (latex-environment . org-odt-latex-environment)
+    (latex-fragment . org-odt-latex-fragment)
+    (line-break . org-odt-line-break)
+    (link . org-odt-link)
+    (paragraph . org-odt-paragraph)
+    (plain-list . org-odt-plain-list)
+    (plain-text . org-odt-plain-text)
+    (planning . org-odt-planning)
+    (property-drawer . org-odt-property-drawer)
+    (quote-block . org-odt-quote-block)
+    (quote-section . org-odt-quote-section)
+    (radio-target . org-odt-radio-target)
+    (section . org-odt-section)
+    (special-block . org-odt-special-block)
+    (src-block . org-odt-src-block)
+    (statistics-cookie . org-odt-statistics-cookie)
+    (strike-through . org-odt-strike-through)
+    (subscript . org-odt-subscript)
+    (superscript . org-odt-superscript)
+    (table . org-odt-table)
+    (table-cell . org-odt-table-cell)
+    (table-row . org-odt-table-row)
+    (target . org-odt-target)
+    (template . org-odt-template)
+    (timestamp . org-odt-timestamp)
+    (underline . org-odt-underline)
+    (verbatim . org-odt-verbatim)
+    (verse-block . org-odt-verse-block))
   :export-block "ODT"
-  :filters-alist ((:filter-parse-tree
-		   . (org-odt--translate-latex-fragments
-		      org-odt--translate-description-lists
-		      org-odt--translate-list-tables)))
+  :filters-alist '((:filter-parse-tree
+		    . (org-odt--translate-latex-fragments
+		       org-odt--translate-description-lists
+		       org-odt--translate-list-tables)))
   :menu-entry
-  (?o "Export to ODT"
-      ((?o "As ODT file" org-odt-export-to-odt)
-       (?O "As ODT file and open"
-	   (lambda (a s v b)
-	     (if a (org-odt-export-to-odt t s v)
-	       (org-open-file (org-odt-export-to-odt nil s v) 'system))))))
+  '(?o "Export to ODT"
+       ((?o "As ODT file" org-odt-export-to-odt)
+	(?O "As ODT file and open"
+	    (lambda (a s v b)
+	      (if a (org-odt-export-to-odt t s v)
+		(org-open-file (org-odt-export-to-odt nil s v) 'system))))))
   :options-alist
-  ((:odt-styles-file "ODT_STYLES_FILE" nil nil t)
-   ;; Redefine regular option.
-   (:with-latex nil "tex" org-odt-with-latex)))
+  '((:odt-styles-file "ODT_STYLES_FILE" nil nil t)
+    ;; Redefine regular option.
+    (:with-latex nil "tex" org-odt-with-latex)))
 
 
 ;;; Dependencies

+ 51 - 51
lisp/ox-org.el

@@ -52,57 +52,57 @@ setting of `org-html-htmlize-output-type' is 'css."
 	  (const :tag "Don't include external stylesheet link" nil)
 	  (string :tag "URL or local href")))
 
-(org-export-define-backend org
-  ((babel-call . org-org-identity)
-   (bold . org-org-identity)
-   (center-block . org-org-identity)
-   (clock . org-org-identity)
-   (code . org-org-identity)
-   (comment . (lambda (&rest args) ""))
-   (comment-block . (lambda (&rest args) ""))
-   (diary-sexp . org-org-identity)
-   (drawer . org-org-identity)
-   (dynamic-block . org-org-identity)
-   (entity . org-org-identity)
-   (example-block . org-org-identity)
-   (fixed-width . org-org-identity)
-   (footnote-definition . org-org-identity)
-   (footnote-reference . org-org-identity)
-   (headline . org-org-headline)
-   (horizontal-rule . org-org-identity)
-   (inline-babel-call . org-org-identity)
-   (inline-src-block . org-org-identity)
-   (inlinetask . org-org-identity)
-   (italic . org-org-identity)
-   (item . org-org-identity)
-   (keyword . org-org-keyword)
-   (latex-environment . org-org-identity)
-   (latex-fragment . org-org-identity)
-   (line-break . org-org-identity)
-   (link . org-org-identity)
-   (node-property . org-org-identity)
-   (paragraph . org-org-identity)
-   (plain-list . org-org-identity)
-   (planning . org-org-identity)
-   (property-drawer . org-org-identity)
-   (quote-block . org-org-identity)
-   (quote-section . org-org-identity)
-   (radio-target . org-org-identity)
-   (section . org-org-identity)
-   (special-block . org-org-identity)
-   (src-block . org-org-identity)
-   (statistics-cookie . org-org-identity)
-   (strike-through . org-org-identity)
-   (subscript . org-org-identity)
-   (superscript . org-org-identity)
-   (table . org-org-identity)
-   (table-cell . org-org-identity)
-   (table-row . org-org-identity)
-   (target . org-org-identity)
-   (timestamp . org-org-identity)
-   (underline . org-org-identity)
-   (verbatim . org-org-identity)
-   (verse-block . org-org-identity)))
+(org-export-define-backend 'org
+  '((babel-call . org-org-identity)
+    (bold . org-org-identity)
+    (center-block . org-org-identity)
+    (clock . org-org-identity)
+    (code . org-org-identity)
+    (comment . (lambda (&rest args) ""))
+    (comment-block . (lambda (&rest args) ""))
+    (diary-sexp . org-org-identity)
+    (drawer . org-org-identity)
+    (dynamic-block . org-org-identity)
+    (entity . org-org-identity)
+    (example-block . org-org-identity)
+    (fixed-width . org-org-identity)
+    (footnote-definition . org-org-identity)
+    (footnote-reference . org-org-identity)
+    (headline . org-org-headline)
+    (horizontal-rule . org-org-identity)
+    (inline-babel-call . org-org-identity)
+    (inline-src-block . org-org-identity)
+    (inlinetask . org-org-identity)
+    (italic . org-org-identity)
+    (item . org-org-identity)
+    (keyword . org-org-keyword)
+    (latex-environment . org-org-identity)
+    (latex-fragment . org-org-identity)
+    (line-break . org-org-identity)
+    (link . org-org-identity)
+    (node-property . org-org-identity)
+    (paragraph . org-org-identity)
+    (plain-list . org-org-identity)
+    (planning . org-org-identity)
+    (property-drawer . org-org-identity)
+    (quote-block . org-org-identity)
+    (quote-section . org-org-identity)
+    (radio-target . org-org-identity)
+    (section . org-org-identity)
+    (special-block . org-org-identity)
+    (src-block . org-org-identity)
+    (statistics-cookie . org-org-identity)
+    (strike-through . org-org-identity)
+    (subscript . org-org-identity)
+    (superscript . org-org-identity)
+    (table . org-org-identity)
+    (table-cell . org-org-identity)
+    (table-row . org-org-identity)
+    (target . org-org-identity)
+    (timestamp . org-org-identity)
+    (underline . org-org-identity)
+    (verbatim . org-org-identity)
+    (verse-block . org-org-identity)))
 
 (defun org-org-identity (blob contents info)
   "Transcode BLOB element or object back into Org syntax."

+ 60 - 60
lisp/ox-texinfo.el

@@ -65,70 +65,70 @@
 
 ;;; Define Back-End
 
-(org-export-define-backend texinfo
-  ((bold . org-texinfo-bold)
-   (center-block . org-texinfo-center-block)
-   (clock . org-texinfo-clock)
-   (code . org-texinfo-code)
-   (comment . org-texinfo-comment)
-   (comment-block . org-texinfo-comment-block)
-   (drawer . org-texinfo-drawer)
-   (dynamic-block . org-texinfo-dynamic-block)
-   (entity . org-texinfo-entity)
-   (example-block . org-texinfo-example-block)
-   (export-block . org-texinfo-export-block)
-   (export-snippet . org-texinfo-export-snippet)
-   (fixed-width . org-texinfo-fixed-width)
-   (footnote-definition . org-texinfo-footnote-definition)
-   (footnote-reference . org-texinfo-footnote-reference)
-   (headline . org-texinfo-headline)
-   (inline-src-block . org-texinfo-inline-src-block)
-   (inlinetask . org-texinfo-inlinetask)
-   (italic . org-texinfo-italic)
-   (item . org-texinfo-item)
-   (keyword . org-texinfo-keyword)
-   (line-break . org-texinfo-line-break)
-   (link . org-texinfo-link)
-   (paragraph . org-texinfo-paragraph)
-   (plain-list . org-texinfo-plain-list)
-   (plain-text . org-texinfo-plain-text)
-   (planning . org-texinfo-planning)
-   (property-drawer . org-texinfo-property-drawer)
-   (quote-block . org-texinfo-quote-block)
-   (quote-section . org-texinfo-quote-section)
-   (radio-target . org-texinfo-radio-target)
-   (section . org-texinfo-section)
-   (special-block . org-texinfo-special-block)
-   (src-block . org-texinfo-src-block)
-   (statistics-cookie . org-texinfo-statistics-cookie)
-   (subscript . org-texinfo-subscript)
-   (superscript . org-texinfo-superscript)
-   (table . org-texinfo-table)
-   (table-cell . org-texinfo-table-cell)
-   (table-row . org-texinfo-table-row)
-   (target . org-texinfo-target)
-   (template . org-texinfo-template)
-   (timestamp . org-texinfo-timestamp)
-   (verbatim . org-texinfo-verbatim)
-   (verse-block . org-texinfo-verse-block))
+(org-export-define-backend 'texinfo
+  '((bold . org-texinfo-bold)
+    (center-block . org-texinfo-center-block)
+    (clock . org-texinfo-clock)
+    (code . org-texinfo-code)
+    (comment . org-texinfo-comment)
+    (comment-block . org-texinfo-comment-block)
+    (drawer . org-texinfo-drawer)
+    (dynamic-block . org-texinfo-dynamic-block)
+    (entity . org-texinfo-entity)
+    (example-block . org-texinfo-example-block)
+    (export-block . org-texinfo-export-block)
+    (export-snippet . org-texinfo-export-snippet)
+    (fixed-width . org-texinfo-fixed-width)
+    (footnote-definition . org-texinfo-footnote-definition)
+    (footnote-reference . org-texinfo-footnote-reference)
+    (headline . org-texinfo-headline)
+    (inline-src-block . org-texinfo-inline-src-block)
+    (inlinetask . org-texinfo-inlinetask)
+    (italic . org-texinfo-italic)
+    (item . org-texinfo-item)
+    (keyword . org-texinfo-keyword)
+    (line-break . org-texinfo-line-break)
+    (link . org-texinfo-link)
+    (paragraph . org-texinfo-paragraph)
+    (plain-list . org-texinfo-plain-list)
+    (plain-text . org-texinfo-plain-text)
+    (planning . org-texinfo-planning)
+    (property-drawer . org-texinfo-property-drawer)
+    (quote-block . org-texinfo-quote-block)
+    (quote-section . org-texinfo-quote-section)
+    (radio-target . org-texinfo-radio-target)
+    (section . org-texinfo-section)
+    (special-block . org-texinfo-special-block)
+    (src-block . org-texinfo-src-block)
+    (statistics-cookie . org-texinfo-statistics-cookie)
+    (subscript . org-texinfo-subscript)
+    (superscript . org-texinfo-superscript)
+    (table . org-texinfo-table)
+    (table-cell . org-texinfo-table-cell)
+    (table-row . org-texinfo-table-row)
+    (target . org-texinfo-target)
+    (template . org-texinfo-template)
+    (timestamp . org-texinfo-timestamp)
+    (verbatim . org-texinfo-verbatim)
+    (verse-block . org-texinfo-verse-block))
   :export-block "TEXINFO"
   :filters-alist
-  ((:filter-headline . org-texinfo-filter-section-blank-lines)
-   (:filter-section . org-texinfo-filter-section-blank-lines))
+  '((:filter-headline . org-texinfo-filter-section-blank-lines)
+    (:filter-section . org-texinfo-filter-section-blank-lines))
   :menu-entry
-  (?i "Export to Texinfo"
-      ((?t "As TEXI file" org-texinfo-export-to-texinfo)
-       (?i "As INFO file" org-texinfo-export-to-info)))
+  '(?i "Export to Texinfo"
+       ((?t "As TEXI file" org-texinfo-export-to-texinfo)
+	(?i "As INFO file" org-texinfo-export-to-info)))
   :options-alist
-  ((:texinfo-filename "TEXINFO_FILENAME" nil org-texinfo-filename t)
-   (:texinfo-class "TEXINFO_CLASS" nil org-texinfo-default-class t)
-   (:texinfo-header "TEXINFO_HEADER" nil nil newline)
-   (:texinfo-post-header "TEXINFO_POST_HEADER" nil nil newline)
-   (:subtitle "SUBTITLE" nil nil newline)
-   (:subauthor "SUBAUTHOR" nil nil newline)
-   (:texinfo-dircat "TEXINFO_DIR_CATEGORY" nil nil t)
-   (:texinfo-dirtitle "TEXINFO_DIR_TITLE" nil nil t)
-   (:texinfo-dirdesc "TEXINFO_DIR_DESC" nil nil t)))
+  '((:texinfo-filename "TEXINFO_FILENAME" nil org-texinfo-filename t)
+    (:texinfo-class "TEXINFO_CLASS" nil org-texinfo-default-class t)
+    (:texinfo-header "TEXINFO_HEADER" nil nil newline)
+    (:texinfo-post-header "TEXINFO_POST_HEADER" nil nil newline)
+    (:subtitle "SUBTITLE" nil nil newline)
+    (:subauthor "SUBAUTHOR" nil nil newline)
+    (:texinfo-dircat "TEXINFO_DIR_CATEGORY" nil nil t)
+    (:texinfo-dirtitle "TEXINFO_DIR_TITLE" nil nil t)
+    (:texinfo-dirdesc "TEXINFO_DIR_DESC" nil nil t)))
 
 
 

+ 35 - 43
lisp/ox.el

@@ -842,7 +842,7 @@ mode."
 ;; Eventually `org-export-barf-if-invalid-backend' returns an error
 ;; when a given back-end hasn't been registered yet.
 
-(defmacro org-export-define-backend (backend translators &rest body)
+(defun org-export-define-backend (backend translators &rest body)
   "Define a new back-end BACKEND.
 
 TRANSLATORS is an alist between object or element types and
@@ -905,7 +905,7 @@ keywords are understood:
     Menu entry for the export dispatcher.  It should be a list
     like:
 
-      \(KEY DESCRIPTION-OR-ORDINAL ACTION-OR-MENU)
+      '(KEY DESCRIPTION-OR-ORDINAL ACTION-OR-MENU)
 
     where :
 
@@ -929,17 +929,17 @@ keywords are understood:
       If it is an alist, associations should follow the
       pattern:
 
-        \(KEY DESCRIPTION ACTION)
+        '(KEY DESCRIPTION ACTION)
 
       where KEY, DESCRIPTION and ACTION are described above.
 
     Valid values include:
 
-      \(?m \"My Special Back-end\" my-special-export-function)
+      '(?m \"My Special Back-end\" my-special-export-function)
 
       or
 
-      \(?l \"Export to LaTeX\"
+      '(?l \"Export to LaTeX\"
            \(?p \"As PDF file\" org-latex-export-to-pdf)
            \(?o \"As PDF file and open\"
                \(lambda (a s v b)
@@ -950,7 +950,7 @@ keywords are understood:
       or the following, which will be added to the previous
       sub-menu,
 
-      \(?l 1
+      '(?l 1
           \((?B \"As TEX buffer (Beamer)\" org-beamer-export-as-latex)
            \(?P \"As PDF file (Beamer)\" org-beamer-export-to-pdf)))
 
@@ -960,8 +960,7 @@ keywords are understood:
     communication channel and how their value are acquired.  See
     `org-export-options-alist' for more information about
     structure of the values."
-  (declare (debug (&define name sexp [&rest [keywordp sexp]] defbody))
-	   (indent 1))
+  (declare (indent 1))
   (let (export-block filters menu-entry options contents)
     (while (keywordp (car body))
       (case (pop body)
@@ -977,22 +976,19 @@ keywords are understood:
 			   (and filters (list :filters-alist filters))
 			   (and options (list :options-alist options))
 			   (and menu-entry (list :menu-entry menu-entry))))
-    `(progn
-       ;; Register back-end.
-       (let ((registeredp (assq ',backend org-export-registered-backends)))
-	 (if registeredp (setcdr registeredp ',contents)
-	   (push (cons ',backend ',contents) org-export-registered-backends)))
-       ;; Tell parser to not parse EXPORT-BLOCK blocks.
-       ,(when export-block
-	  `(mapc
-	    (lambda (name)
-	      (add-to-list 'org-element-block-name-alist
-			   `(,name . org-element-export-block-parser)))
-	    ',export-block))
-       ;; Splice in the body, if any.
-       ,@body)))
-
-(defmacro org-export-define-derived-backend (child parent &rest body)
+    ;; Register back-end.
+    (let ((registeredp (assq backend org-export-registered-backends)))
+      (if registeredp (setcdr registeredp contents)
+	(push (cons backend contents) org-export-registered-backends)))
+    ;; Tell parser to not parse EXPORT-BLOCK blocks.
+    (when export-block
+      (mapc
+       (lambda (name)
+	 (add-to-list 'org-element-block-name-alist
+		      `(,name . org-element-export-block-parser)))
+       export-block))))
+
+(defun org-export-define-derived-backend (child parent &rest body)
   "Create a new back-end as a variant of an existing one.
 
 CHILD is the name of the derived back-end.  PARENT is the name of
@@ -1038,14 +1034,13 @@ keywords are understood:
 As an example, here is how one could define \"my-latex\" back-end
 as a variant of `latex' back-end with a custom template function:
 
-  \(org-export-define-derived-backend my-latex latex
-     :translate-alist ((template . my-latex-template-fun)))
+  \(org-export-define-derived-backend 'my-latex 'latex
+     :translate-alist '((template . my-latex-template-fun)))
 
 The back-end could then be called with, for example:
 
   \(org-export-to-buffer 'my-latex \"*Test my-latex*\")"
-  (declare (debug (&define name sexp [&rest [keywordp sexp]] def-body))
-	   (indent 2))
+  (declare (indent 2))
   (let (export-block filters menu-entry options translators contents)
     (while (keywordp (car body))
       (case (pop body)
@@ -1067,21 +1062,18 @@ The back-end could then be called with, for example:
 		    (let ((p-options (org-export-backend-options parent)))
 		      (list :options-alist (append options p-options)))
 		    (and menu-entry (list :menu-entry menu-entry))))
-    `(progn
-       (org-export-barf-if-invalid-backend ',parent)
-       ;; Register back-end.
-       (let ((registeredp (assq ',child org-export-registered-backends)))
-	 (if registeredp (setcdr registeredp ',contents)
-	   (push (cons ',child ',contents) org-export-registered-backends)))
-       ;; Tell parser to not parse EXPORT-BLOCK blocks.
-       ,(when export-block
-	  `(mapc
-	    (lambda (name)
-	      (add-to-list 'org-element-block-name-alist
-			   `(,name . org-element-export-block-parser)))
-	    ',export-block))
-       ;; Splice in the body, if any.
-       ,@body)))
+    (org-export-barf-if-invalid-backend parent)
+    ;; Register back-end.
+    (let ((registeredp (assq child org-export-registered-backends)))
+      (if registeredp (setcdr registeredp contents)
+	(push (cons child contents) org-export-registered-backends)))
+    ;; Tell parser to not parse EXPORT-BLOCK blocks.
+    (when export-block
+      (mapc
+       (lambda (name)
+	 (add-to-list org-element-block-name-alist
+		      `(,name . org-element-export-block-parser)))
+       export-block))))
 
 (defun org-export-backend-parent (backend)
   "Return back-end from which BACKEND is derived, or nil."