Try to fix the warning due to setting `org-babel-load-languages'

This commit is contained in:
Gerard Vermeulen 2023-01-13 16:57:56 +01:00
parent 7a77e2d736
commit 189cb48440
1 changed files with 21 additions and 23 deletions

View File

@ -2044,29 +2044,26 @@ list detailing and motivating each listing:
#+name: lst:set-org-options
#+begin_src emacs-lisp
(with-eval-after-load 'org
(custom-set-variables
`(org-babel-load-languages
(delq nil '((C . t)
(calc . t)
,(when (fboundp 'grapviz-dot-mode) '(dot . t))
(emacs-lisp . t)
(eshell . t)
,(when (fboundp 'fennel-mode) '(fennel . t))
(fortran . t)
,(when (fboundp 'gnuplot-mode) '(gnuplot . t))
(js . t)
(latex . t)
(lisp . t)
,(when (fboundp 'lua-mode) '(lua . t))
,(when (fboundp 'maxima-mode) '(maxima . t))
(org . t)
(perl . t)
;; The next two functions are not bound during bootstrap.
,(when (and (fboundp 'choose-common-python-interpreter)
(fboundp 'choose-common-python-linter))
'(python . t))
(shell . t)))))
(setopt
org-babel-load-languages
`((C . t)
(calc . t)
(dot . ,(fboundp 'grapviz-dot-mode))
(emacs-lisp . t)
(fortran . t)
(gnuplot . ,(fboundp 'gnuplot-mode))
(js . t)
(latex . t)
(lisp . t)
(lua . ,(fboundp 'lua-mode))
(maxima . ,(fboundp 'maxima-mode))
(org . t)
(perl . t)
;; The Python setup uses the two functions below.
;; Those functions are not yet bound during bootstrap.
(python . ,(and (fboundp 'choose-common-python-interpreter)
(fboundp 'choose-common-python-linter)))
(shell . t))
org-export-backends '(ascii beamer html icalendar latex odt texinfo)
org-file-apps '((auto-mode . emacs)
(directory . emacs)
@ -4270,7 +4267,8 @@ install and use [[https://gitlab.com/andreyorst/ob-fennel][ob-fennel]] with the
(ensure-package-installation 'fennel-mode 'quelpa))
(unless (package-installed-p 'ob-fennel)
(quelpa '(ob-fennel :repo "andreyorst/ob-fennel" :fetcher gitlab)))
(ensure-package-selection 'ob-fennel))
(when (ensure-package-selection 'ob-fennel)
(org-babel-do-load-languages 'fennel (fboundp 'fennel-mode))))
#+end_src
#+caption[Fennel example]: