From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#52342: [PATCH] Add Texinfo support for Flymake Date: Tue, 7 Dec 2021 23:43:51 +0000 Message-ID: References: <3948b4c7-bd61-e2f8-6b02-6057631139cb@protonmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000b730d505d296f294" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31612"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Kangas , 52342@debbugs.gnu.org To: Okamsn , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 08 00:45:16 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1muk94-0007rj-8t for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 Dec 2021 00:45:14 +0100 Original-Received: from localhost ([::1]:58224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1muk92-00022m-ID for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Dec 2021 18:45:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:54056) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muk8s-00022M-W7 for bug-gnu-emacs@gnu.org; Tue, 07 Dec 2021 18:45:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55674) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1muk8s-0007Z5-NZ for bug-gnu-emacs@gnu.org; Tue, 07 Dec 2021 18:45:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1muk8r-0005iN-LK for bug-gnu-emacs@gnu.org; Tue, 07 Dec 2021 18:45:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Dec 2021 23:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52342 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 52342-submit@debbugs.gnu.org id=B52342.163892065021884 (code B ref 52342); Tue, 07 Dec 2021 23:45:01 +0000 Original-Received: (at 52342) by debbugs.gnu.org; 7 Dec 2021 23:44:10 +0000 Original-Received: from localhost ([127.0.0.1]:38987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1muk82-0005gu-By for submit@debbugs.gnu.org; Tue, 07 Dec 2021 18:44:10 -0500 Original-Received: from mail-qk1-f177.google.com ([209.85.222.177]:45709) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1muk80-0005gc-9V for 52342@debbugs.gnu.org; Tue, 07 Dec 2021 18:44:08 -0500 Original-Received: by mail-qk1-f177.google.com with SMTP id d2so462340qki.12 for <52342@debbugs.gnu.org>; Tue, 07 Dec 2021 15:44:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0k10vBo4lVD0hQ8tNszhV3sVI24ysttSGz75lcn6lrw=; b=hwmNCnk8GO9eAgHTAa4GqbF/VXiTHmQu7ndhMfcEWV828y92YF/ELOTT6rqtZDxiGp heAncdET4g8XKN5U+mLe3ZYhFIHsO4gmBX3sZNYbsUdoR2t5Y/mXPJ4ZP+cPEiEgD4c0 fZ2IRsF/tiZEHhE7KUha2N2Yp+vbtvEWGL+jkHJoq93KlnJ6/w0VTU9Wcn2+ScnJ9Ja3 zC2ANx9wJpF9Md2iSjXd0KZwp1TNOabcubSamiNFmtTXs069o8SbnvXni1rk7D0gtnTA SXqPJBjvliJbccnFdQ8PZaW2z3ik5nYxDUSwFrSEnqvSyyD1N1HNCc5VucEwc1/8QgmD O4pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0k10vBo4lVD0hQ8tNszhV3sVI24ysttSGz75lcn6lrw=; b=NZm3EeMFKV+F0pH55heBdlF4mVcW2wYPk0/m1EXZqi3z+Ot9VO4zIHK6d4qrn7avLk nnAz0p693VQLOzqXMKNJ69gj1vzfkO5dDXsRIIen0knUnwnTOROj2X5OeViSzk+bPoMd 1RzrXUsuLRnv5hG3NusSgYZgZn6J80rX7kLyh12KG214wD3FXSEJfHO2o5qqMz8M/2Hp 9hJ7B2luSZg3GIFASMwFcKn3CKaeIYMUIiHILcFZDsCZOSSy6zab3+Uwx3BQuGaldzN/ 637rf/xlZB2AwRN25YinQQQi8G/NaQe9zDEPIlTTUnOBOUY0kb69PU2jUMeiAMQMzdM0 Camw== X-Gm-Message-State: AOAM532MgLu7VWh9p1dfZtK+gJjlJwAM0OXC/A4QhvlsW20JrF7t4FlD R2rDsLWn7pgUn+XV4EgS/opu16EUAG32urJPSKc= X-Google-Smtp-Source: ABdhPJz1vKcMzyjCSvZKO+ykuiejMUwR5nMQTPOxygAKrdbnlyMKbHXVOMOcdoL+NELDV9/ZrrCafkGsC1IsvGtmjMk= X-Received: by 2002:a05:620a:44:: with SMTP id t4mr2902012qkt.460.1638920642571; Tue, 07 Dec 2021 15:44:02 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:221889 Archived-At: --000000000000b730d505d296f294 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Dec 7, 2021 at 11:39 PM Okamsn wrote: > On 12/7/21 09:23, Jo=C3=A3o T=C3=A1vora wrote: > > Not sure about the eval-when-compile for require. It was my > > expression that require is always "when compile". > > > > I've unfortunately been a little away from Emacs lately. > > > > Jo=C3=A3o > > My understanding is that `eval-when-compile` is used to make sure that > macro definitions are available during compilation and that the > libraries are not loaded when `texinfo.el` is loaded. The macros in the > patch are `rx`, `cl-loop`, and `flymake-log`. > require is always `eval-and-compile` (sorry if I misled you earlier). It's OK to use `eval-when-compile` when needing `cl-loop` from `cl-lib` if _all_ you need form `cl-lib` is indeed macros. But for flymake, you need the actual runtime things too, right? So I think plain require is better and simpler > There is also the following comment on line 82 of the current version > ( > https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/textmodes/texinfo.e= l#n82 > ): > > > Don't you dare insert any `require' calls at top level in this file > > --rms. > > which I tried to observe. No comment :-) Anyway, let's hear what byte-compiler guru Stefan Monnier has to say about this? Jo=C3=A3o --000000000000b730d505d296f294 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Tue, Dec 7, 2021 at 11:39 PM Okamsn <okamsn@protonmail.com> wrote:
On 12/7/21 09:23, Jo=C3=A3o T=C3= =A1vora wrote:
> Not sure about the eval-when-compile for require.=C2=A0 It was my
> expression that require is always "when compile".
>
> I've unfortunately been a little away from Emacs lately.
>
> Jo=C3=A3o

My understanding is that `eval-when-compile` is used to make sure that
macro definitions are available during compilation and that the
libraries are not loaded when `texinfo.el` is loaded.=C2=A0 The macros in t= he
patch are `rx`, `cl-loop`, and `flymake-log`.

require is always `eval-and-compile` (sorry if I misled you earlier)= .
It's OK to use `eval-when-compile` when needing `cl-loop` f= rom `cl-lib`
if _all_ you need form `cl-lib` is indeed macros.

But for flymake, you need the actual runtime things = too, right? So
I think plain require is better and simpler
=C2=A0
There is also the following comment on line 82 of the current version
(https://git.savannah.= gnu.org/cgit/emacs.git/tree/lisp/textmodes/texinfo.el#n82):

=C2=A0> Don't you dare insert any `require' calls at top level i= n this file
=C2=A0> --rms.

which I tried to observe.

No comment :-)

Anyway, let's hear what byte-compiler guru Stefa= n Monnier has to say
about this?

Jo=C3=A3o
--000000000000b730d505d296f294--