[emacs] Fix org-babel aliases

This commit is contained in:
Correl Roush 2014-12-10 22:59:41 -05:00
parent 52eefec10c
commit 52fad5b38d

View file

@ -144,14 +144,15 @@
(let ((language-table (cddr '<<org-babel-languages()>>))) (let ((language-table (cddr '<<org-babel-languages()>>)))
(mapcar (lambda (lang-pair) (mapcar (lambda (lang-pair)
(let* ((alias (if (not (string= (cadr lang-pair) "")) (cadr lang-pair))) (let* ((alias (if (not (string= (cadr lang-pair) "")) (cadr lang-pair)))
(lang (if alias (make-symbol alias) (make-symbol (car lang-pair)))) (lang (make-symbol (car lang-pair)))
(lang-or-alias (if alias (make-symbol alias) lang))
(confirm (not (string= (cl-caddr lang-pair) "No")))) (confirm (not (string= (cl-caddr lang-pair) "No"))))
(if alias (if alias
(add-to-list 'my/org-src-lang-modes (cons alias lang))) (add-to-list 'my/org-src-lang-modes (cons alias lang)))
(if (not confirm) (if (not confirm)
(add-to-list 'my/org-babel-no-confirm-languages lang)) (add-to-list 'my/org-babel-no-confirm-languages lang-or-alias))
(add-to-list 'my/org-babel-evaluated-languages lang) (add-to-list 'my/org-babel-evaluated-languages lang-or-alias)
lang)) lang-or-alias))
language-table)) language-table))
(mapcar (lambda (alias) (mapcar (lambda (alias)