unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Arash Esbati <arash@gnu.org>
To: Tassilo Horn <tsdh@gnu.org>
Cc: 72313@debbugs.gnu.org, monnier@iro.umontreal.ca
Subject: bug#72313: 31.0.50; Warning about cl-member possibly being undefined when using cl-pushnew
Date: Sat, 27 Jul 2024 23:25:14 +0200	[thread overview]
Message-ID: <m2wml6y1c5.fsf@macmutant.fritz.box> (raw)
In-Reply-To: <87v80qftk4.fsf@gnu.org> (Tassilo Horn's message of "Sat, 27 Jul 2024 22:50:35 +0200")

Tassilo Horn <tsdh@gnu.org> writes:

> Let's just require cl-lib.  declare-function only silences the
> byte-compiler and the usage of cl-member at runtime is a fact; no
> cheating allowed.  It's also an implementation detail we should not
> bother with.

I'm not sure if this is cheating, but I'm easy, and if we want to
require cl-lib, I'd do it in tex.el which is loaded by all
<mode-name>.el files; so basically:

--8<---------------cut here---------------start------------->8---
diff --git a/tex-info.el b/tex-info.el
index dc69762e..4ae14401 100644
--- a/tex-info.el
+++ b/tex-info.el
@@ -24,9 +24,6 @@

 ;;; Code:

-(eval-when-compile
-  (require 'cl-lib))
-
 (require 'tex)

 (require 'texinfo)
diff --git a/tex.el b/tex.el
index e67d2059..729e4db2 100644
--- a/tex.el
+++ b/tex.el
@@ -33,8 +33,8 @@

 (require 'custom)
 (require 'tex-site)
+(require 'cl-lib)
 (eval-when-compile
-  (require 'cl-lib)
   (require 'subr-x))
 (require 'texmathp)
 ;; seq.el is preloaded in Emacs 29, so the next form can be removed
--8<---------------cut here---------------end--------------->8---

(plus some more changes to come).

> Tomorrow, Stefan might have optimized it to use some cl-memql-1-wazzup
> for the specific case we have here. :-)

I will not put my money on another bet :)

Best, Arash





  reply	other threads:[~2024-07-27 21:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-26 20:29 bug#72313: 31.0.50; Warning about cl-member possibly being undefined when using cl-pushnew Tassilo Horn
2024-07-26 21:20 ` Jeremy Bryant via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-27  7:01 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-27  7:13   ` Tassilo Horn
2024-07-27  7:49     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-27 15:29       ` Arash Esbati
2024-07-27 20:50         ` Tassilo Horn
2024-07-27 21:25           ` Arash Esbati [this message]
2024-07-31 17:44             ` Tassilo Horn
2024-07-31 19:55               ` Arash Esbati
2024-07-28  4:58           ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2wml6y1c5.fsf@macmutant.fritz.box \
    --to=arash@gnu.org \
    --cc=72313@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=tsdh@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).