[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why shouldn't we have a #if .... #else .... #endif construct in Emac
From: |
Richard Stallman |
Subject: |
Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp? |
Date: |
Wed, 13 Sep 2023 19:53:06 -0400 |
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> Org mode uses `fboundp' check to fontify arbitrary source blocks:
> #+begin_src language
> ...
> #+end_src
> The corresponding code does the following:
> (defun org-src-font-lock-fontify-block (lang start end)
> "Fontify code block between START and END using LANG's syntax.
> This function is called by Emacs' automatic fontification, as long
> as `org-src-fontify-natively' is non-nil."
> ...
> (let ((lang-mode (org-src-get-lang-mode lang)))
> (when (fboundp lang-mode)
> <fontify using LANG-MODE's native fontification>
We may be talking about different kincs of cases.
As I understand it, the proposal was to handle at compile time
certain conditionals at _top-level_ in the source file being compiled.
Things like
(if (fboundp 'whatever)
...conditional-code...)
However, what you've shown is a conditional inside a function definition
that is part of org-mode -- right?
The proposal I think we are discussing would have no effect at all on
cases like that. So this example would get the unchanged curent
behavior, just as you asked for.
--
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
- Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?, (continued)
- Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?, tomas, 2023/09/04
- Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?, Richard Stallman, 2023/09/05
- Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?, Richard Stallman, 2023/09/05
- Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?, Andreas Schwab, 2023/09/06
- Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?, Alan Mackenzie, 2023/09/06
- Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?, Alan Mackenzie, 2023/09/06
- Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?, Richard Stallman, 2023/09/08
- Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?, Ihor Radchenko, 2023/09/09
- Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?, Richard Stallman, 2023/09/09
- Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?, Ihor Radchenko, 2023/09/10
- Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?,
Richard Stallman <=
- Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?, Ihor Radchenko, 2023/09/20
Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?, Ulrich Mueller, 2023/09/05