From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp? Date: Wed, 13 Sep 2023 19:53:06 -0400 Message-ID: References: <87cyyr7i2i.fsf@localhost> <87jzsypgqo.fsf@localhost> Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16123"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, ulm@gentoo.org, emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 14 01:54:13 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qgZgS-0003zJ-Uh for ged-emacs-devel@m.gmane-mx.org; Thu, 14 Sep 2023 01:54:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgZfS-0006mA-Ac; Wed, 13 Sep 2023 19:53:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qgZfR-0006m2-GA for emacs-devel@gnu.org; Wed, 13 Sep 2023 19:53:09 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qgZfQ-0000n5-79; Wed, 13 Sep 2023 19:53:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=YoSFiM7AEwLdKzKYoUbDZeGjmqR0dJBqzM89QqJaZ24=; b=PAFYO0B0jj2J FzhzXGTrJGpJOeACHc0b2F4R7niaKUqwIoW8gztZU+ZWYDxUetGjQPu5d//r7CV8AvjjFXgwpPfCW Rgd9ncGdmZu3MgG7LT1CrFBcXoJJTzhzrNvWqdBkuSLWNJdt4W9sHVZKUvbORCMNQGgZ6jTPbC8rK DNt3JrAfZL76suWHD7iszepGZ6+4hrNekAvJVav7G7V9bfOhyekKS095Bha7O2t3dcAdMian6Hyho GnES8sQmykN2J5M4gkCO+OB7V/TJxP1ikCvfn62XBPRd3fIh9R6iYnnBJ9Q5uU3nMZCl/WY848a8R nNQTf+I+o/6seKoLr9UxOA==; Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1qgZfO-0002yR-8Z; Wed, 13 Sep 2023 19:53:06 -0400 In-Reply-To: <87jzsypgqo.fsf@localhost> (message from Ihor Radchenko on Sun, 10 Sep 2023 08:36:15 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:310558 Archived-At: [[[ 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) > 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)