Fix tangling bug when major mode for LANGUAGE is not `LANGUAGE-mode'
* lisp/ob-core.el (org-babel-expand-noweb-references): * lisp/ob-tangle.el (org-babel-tangle): Use `org-src-get-lang-mode' so as to use proper major mode. Reported-by: immanuel <immanuel.litzroth@gmail.com> <http://lists.gnu.org/r/emacs-orgmode/2019-08/msg00272.html>
This commit is contained in:
parent
fcc0d8f509
commit
df30a056b2
|
@ -75,6 +75,7 @@
|
|||
(declare-function org-show-context "org" (&optional key))
|
||||
(declare-function org-src-coderef-format "org-src" (&optional element))
|
||||
(declare-function org-src-coderef-regexp "org-src" (fmt &optional label))
|
||||
(declare-function org-src-get-lang-mode "org-src" (lang))
|
||||
(declare-function org-table-align "org-table" ())
|
||||
(declare-function org-table-end "org-table" (&optional table-type))
|
||||
(declare-function org-table-import "org-table" (file arg))
|
||||
|
@ -2763,7 +2764,7 @@ block but are passed literally to the \"example-block\"."
|
|||
;; Comment, according to LANG mode,
|
||||
;; string S. Return new string.
|
||||
(with-temp-buffer
|
||||
(funcall (intern (concat lang "-mode")))
|
||||
(funcall (org-src-get-lang-mode lang))
|
||||
(comment-region (point)
|
||||
(progn (insert s) (point)))
|
||||
(org-trim (buffer-string)))))
|
||||
|
|
|
@ -228,13 +228,7 @@ used to limit the exported source code blocks by language."
|
|||
(let* ((lang (car by-lang))
|
||||
(specs (cdr by-lang))
|
||||
(ext (or (cdr (assoc lang org-babel-tangle-lang-exts)) lang))
|
||||
(lang-f (intern
|
||||
(concat
|
||||
(or (and (cdr (assoc lang org-src-lang-modes))
|
||||
(symbol-name
|
||||
(cdr (assoc lang org-src-lang-modes))))
|
||||
lang)
|
||||
"-mode")))
|
||||
(lang-f (org-src-get-lang-mode lang))
|
||||
she-banged)
|
||||
(mapc
|
||||
(lambda (spec)
|
||||
|
|
Loading…
Reference in New Issue