[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Should `indirect-function' be preferred over `fboundp'?
From: |
Ihor Radchenko |
Subject: |
Re: Should `indirect-function' be preferred over `fboundp'? |
Date: |
Thu, 20 Jul 2023 13:08:53 +0000 |
Alan Mackenzie <acm@muc.de> writes:
> I don't think it affects the point you are making, but why are you using
> funcall in the last line, rather than just calling the funcion as
>
> (yant/foo)
I stumbled upon this behaviour in Org mode's code that works with src
blocks:
#+begin_src language
<code>
#+end_src
Org uses heuristics to determine how to fontify such code blocks:
1. Org tries to derive the major mode name from language name
constructing a symbol as (format "%s-mode" language)
2. If the symbol is a function, Org proceeds running that function to
expedite fontification.
So, no, it would not be possible to write (language-mode) directly.
Function symbol string is calculated dynamically.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>