Thorsten Jolitz <tjol...@gmail.com> writes: > Shiyuan <gshy2...@gmail.com> writes: >> (org-export-define-derived-backend 'my-html-enlish 'html >> :traslate-alist '((bold . my-org-html-english-bold)) > > > :translate-alist ?
Perhaps org-export-define-derived-backend could do a sanity check that all keywords are known. use-package does that, and it has saved me multiple times ! Nicolas, what am I overlooking ? Modified lisp/ox.el diff --git a/lisp/ox.el b/lisp/ox.el index 03bd8bb..e931723 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -1187,9 +1187,9 @@ The back-end could then be called with, for example: \(org-export-to-buffer 'my-latex \"*Test my-latex*\")" (declare (indent 2)) - (let (blocks filters menu-entry options transcoders contents) + (let (blocks filters menu-entry options transcoders contents keyword) (while (keywordp (car body)) - (case (pop body) + (case (setq keyword (pop body)) (:export-block (let ((names (pop body))) (setq blocks (if (consp names) (mapcar 'upcase names) (list (upcase names)))))) @@ -1197,7 +1197,7 @@ The back-end could then be called with, for example: (:menu-entry (setq menu-entry (pop body))) (:options-alist (setq options (pop body))) (:translate-alist (setq transcoders (pop body))) - (t (pop body)))) + (t (error "Unknown keyword in `org-export-define-derived-backend': %s" keyword)))) (org-export-register-backend (org-export-create-backend :name child :parent parent -- Nico.