From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Cc: Philipp Stephani <phst@google.com>
Subject: Re: [Emacs-diffs] master 610dad1: Revert "Prevent name clashes between CL structures and builtin types"
Date: Sun, 07 Jan 2018 10:46:30 -0500 [thread overview]
Message-ID: <jwv8td9znjw.fsf-monnier+emacsdiffs@gnu.org> (raw)
In-Reply-To: <20180107131518.3583A20487@vcs0.savannah.gnu.org> (Philipp Stephani's message of "Sun, 7 Jan 2018 08:15:17 -0500 (EST)")
> This reverts commit 151496a4b96430924bc148f85b9c8471d1e132b1.
> That commit breaks bootstrap builds due to a cyclic dependency.
Oh, yes, this part of the bootstrap is a bit tricky!
I suggest you only add the check to the `cl-defstruct` macro.
After all, this is the main entry-point (`cl-define-struct` should not
be used directly anyway) and it's the one that gives the earliest
warning/error.
Stefan
> --- a/lisp/emacs-lisp/cl-preloaded.el
> +++ b/lisp/emacs-lisp/cl-preloaded.el
> @@ -36,7 +36,6 @@
>
> ;;; Code:
>
> -(eval-when-compile (require 'cl-generic))
This definitely needs to go, yes.
> (eval-when-compile (require 'cl-lib))
> (eval-when-compile (require 'cl-macs)) ;For cl--struct-class.
>
> @@ -51,12 +50,6 @@
> (apply #'error string (append sargs args))
> (signal 'cl-assertion-failed `(,form ,@sargs)))))
>
> -(defun cl--struct-name-p (name)
> - "Return t if NAME is a valid structure name for `cl-defstruct'."
> - (and name (symbolp name) (not (keywordp name))
> - (not (memq name (eval-when-compile cl--generic-all-builtin-types)))
> - t))
But this could stay. Just test (boundp 'cl--generic-all-builtin-types)
before using it. I'd add "valid/acceptable/available/can-be" to its
name, tho, otherwise it makes it sound like it will indicate if the
symbol *is* a struct-name.
Stefan
parent reply other threads:[~2018-01-07 15:46 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20180107131518.3583A20487@vcs0.savannah.gnu.org>]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv8td9znjw.fsf-monnier+emacsdiffs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=phst@google.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.