浏览代码

babel: New const variable org-babel-header-arg-names

This is used when checking for babel header args in org properties.
Dan Davison 15 年之前
父节点
当前提交
283ebcb43b
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      contrib/babel/lisp/org-babel.el

+ 5 - 2
contrib/babel/lisp/org-babel.el

@@ -79,6 +79,10 @@ then run `org-babel-pop-to-session'."
 
 (add-hook 'org-metadown-hook 'org-babel-pop-to-session-maybe)
 
+(defconst org-babel-header-arg-names
+  '(cache cmdline colnames dir exports file noweb results session tangle var)
+  "All header arguments used by org-babel")
+
 (defvar org-babel-default-header-args
   '((:session . "none") (:results . "replace") (:exports . "code") (:cache . "no") (:noweb . "no"))
   "Default arguments to use when evaluating a source block.")
@@ -507,8 +511,7 @@ may be specified in the properties of the current outline entry."
                (when val
                  ;; (message "prop %s=%s" header-arg val) ;; debugging
                  (cons (intern (concat ":" header-arg)) val))))
-           '("cache" "cmdline" "exports" "file" "noweb" "results"
-             "session" "tangle" "var")))))
+           (mapcar 'symbol-name org-babel-header-arg-names)))))
 
 (defun org-babel-parse-src-block-match ()
   (let* ((lang (org-babel-clean-text-properties (match-string 1)))