mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-24 07:20:29 +00:00
org-lint: Improve heuristics for unknown src block language
* lisp/org-lint.el (org-lint-suspicious-language-in-src-block): Do not complain about src block languages without execute function if there is <lang>-mode major mode available. Reported-by: Suhail Singh <suhailsingh247@gmail.com> Link: https://orgmode.org/list/874ja7ik7h.fsf@gmail.com
This commit is contained in:
parent
04d56f757f
commit
51aea49462
@ -542,7 +542,10 @@ Use :header-args: instead"
|
||||
(org-element-map ast 'src-block
|
||||
(lambda (b)
|
||||
(when-let ((lang (org-element-property :language b)))
|
||||
(unless (functionp (intern (format "org-babel-execute:%s" lang)))
|
||||
(unless (or (functionp (intern (format "org-babel-execute:%s" lang)))
|
||||
;; No babel backend, but there is corresponding
|
||||
;; major mode.
|
||||
(fboundp (org-src-get-lang-mode lang)))
|
||||
(list (org-element-property :post-affiliated b)
|
||||
(format "Unknown source block language: '%s'" lang)))))))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user