unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 60102@debbugs.gnu.org
Subject: bug#60102: Move gv-expander of substring to cl-lib
Date: Fri, 16 Dec 2022 09:22:10 +0200	[thread overview]
Message-ID: <86o7s3lsnx.fsf@mail.linkov.net> (raw)
In-Reply-To: <jwvv8mc4eax.fsf@iro.umontreal.ca> (Stefan Monnier via's message of "Thu, 15 Dec 2022 15:12:06 -0500")

> The `gv-expander` of `substring` uses the `cl--set-substring` function
> that's defined only in `cl-lib`, so currently, you can compile
>
>     (setf (substring ...) ...)
>
> without requiring `cl-lib` but at run time it will tend to signal
> a `void-function` error.
> We could autoload `cl--set-substring`, but I think a better choice is to
> move this `gv-expander` to `cl-lib.el`.

I tried your patch by evaluating `(tab-bar-make-keymap-1)`,
but it still fails with:

Debugger entered--Lisp error: (void-function cl--set-substring)
  cl--set-substring(#("*scratch* x" 0 9 ...
  tab-bar-auto-width(((sep-1 menu-item " " ignore) (current-tab menu-item #("*scratch* x" 0 9 ...
  tab-bar-make-keymap-1()
  (progn (tab-bar-make-keymap-1))
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  command-execute(eval-last-sexp)

OTOH, autoloading `cl--set-substring` fixes this error.





      parent reply	other threads:[~2022-12-16  7:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-15 20:12 bug#60102: Move gv-expander of substring to cl-lib Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-16  6:56 ` Eli Zaretskii
2022-12-16 14:14   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-04 20:00     ` Stefan Kangas
2023-09-04 20:43       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-16  7:22 ` Juri Linkov [this message]

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=86o7s3lsnx.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=60102@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).