diff options
author | Eric Schulte <eric.schulte@gmx.com> | 2012-01-23 11:07:27 -0700 |
---|---|---|
committer | Eric Schulte <eric.schulte@gmx.com> | 2012-01-23 11:07:27 -0700 |
commit | 978fd46069573f46f6d3c1fe54539b3bef6b09bb (patch) | |
tree | 433c74dd6e1173e0d93bf85999e214607ac2fdc6 | |
parent | 43abeaa4888a253b2ce5fc0f789b84480b09bd37 (diff) | |
download | org-mode-978fd46069573f46f6d3c1fe54539b3bef6b09bb.tar.gz |
don't report valid header arguments as suspicious
* lisp/ob.el (org-babel-check-src-block): Don't report valid header
arguments as suspicious.
-rw-r--r-- | lisp/ob.el | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -607,15 +607,17 @@ arguments and pop open the results in a preview buffer." ;; TODO: report malformed code block ;; TODO: report incompatible combinations of header arguments ;; TODO: report uninitialized variables - (let ((too-close 2)) ;; <- control closeness to report potential match + (let ((too-close 2) ;; <- control closeness to report potential match + (names (mapcar #'symbol-name org-babel-header-arg-names))) (dolist (header (mapcar (lambda (arg) (substring (symbol-name (car arg)) 1)) (and (org-babel-where-is-src-block-head) (org-babel-parse-header-arguments (org-babel-clean-text-properties (match-string 4)))))) - (dolist (name (mapcar #'symbol-name org-babel-header-arg-names)) + (dolist (name names) (when (and (not (string= header name)) - (<= (org-babel-edit-distance header name) too-close)) + (<= (org-babel-edit-distance header name) too-close) + (not (member header names))) (error "supplied header \"%S\" is suspiciously close to \"%S\"" header name)))) (message "No suspicious header arguments found."))) |