Ensure to define functions before calling them

This commit is contained in:
Gerard Vermeulen 2023-01-10 19:04:39 +01:00
parent 54363c2bdc
commit 88b8ef8000

View File

@ -2126,7 +2126,10 @@ follows a list detailing and motivating each listing:
,(when (fboundp 'maxima-mode) '(maxima . t))
(org . t)
(perl . t)
(python . 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))))
'(org-export-backends '(ascii beamer html icalendar latex odt texinfo))
'(org-file-apps '((auto-mode . emacs)
@ -4491,18 +4494,6 @@ rules which make [[https://flake8.pycqa.org/en/latest/][flake8]] or [[https://py
Finally, listing [[lst:flake8-nocolor][flake8-nocolor]] and [[lst:ruff-nocolor][ruff-nocolor]] pipe the =stdout= output of the
[[https://pypi.org/project/flake8/][flake8]] and [[https://pypi.org/project/ruff/][ruff]] executables through =cat= to remove escape sequences.
#+caption[Setup Python mode]:
#+caption: Setup Python mode.
#+name: lst:setup-python-mode
#+begin_src emacs-lisp
(with-eval-after-load 'python
(custom-set-variables
'(python-indent-guess-indent-offset nil)
'(python-shell-completion-native-disabled-interpreters '("ipython3" "pypy")))
(choose-common-python-interpreter 'python)
(choose-common-python-linter 'ruff-nocolor))
#+end_src
#+caption[Choose a common Python interpreter]:
#+caption: Choose a common Python interpreter for =ob-python= and =python-mode=.
#+name: lst:choose-common-python-interpreter
@ -4584,6 +4575,18 @@ Finally, listing [[lst:flake8-nocolor][flake8-nocolor]] and [[lst:ruff-nocolor][
python-check-command python-flymake-command))))
#+end_src
#+caption[Setup Python mode]:
#+caption: Setup Python mode.
#+name: lst:setup-python-mode
#+begin_src emacs-lisp
(with-eval-after-load 'python
(custom-set-variables
'(python-indent-guess-indent-offset nil)
'(python-shell-completion-native-disabled-interpreters '("ipython3" "pypy")))
(choose-common-python-interpreter 'python)
(choose-common-python-linter 'ruff-nocolor))
#+end_src
#+caption[Access =pyenv=]:
#+caption: Access =pyenv=.
#+name: lst:access-pyenv