aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorPhilipp Stephani2018-01-07 14:14:38 +0100
committerPhilipp Stephani2018-01-07 14:14:38 +0100
commit610dad1102cba5fa6111050d30c734b51bcdb77d (patch)
treee017da7f090e2125d21dbc4d5600a444765f5277 /lisp
parent6735df4443fe0aa60862a95c38746edf2b053862 (diff)
downloademacs-610dad1102cba5fa6111050d30c734b51bcdb77d.tar.gz
emacs-610dad1102cba5fa6111050d30c734b51bcdb77d.zip
Revert "Prevent name clashes between CL structures and builtin types"
This reverts commit 151496a4b96430924bc148f85b9c8471d1e132b1. That commit breaks bootstrap builds due to a cyclic dependency.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emacs-lisp/cl-macs.el4
-rw-r--r--lisp/emacs-lisp/cl-preloaded.el8
2 files changed, 0 insertions, 12 deletions
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 05cb9b091d9..16f33282bae 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -43,7 +43,6 @@
43 43
44;;; Code: 44;;; Code:
45 45
46(require 'cl-generic)
47(require 'cl-lib) 46(require 'cl-lib)
48(require 'macroexp) 47(require 'macroexp)
49;; `gv' is required here because cl-macs can be loaded before loaddefs.el. 48;; `gv' is required here because cl-macs can be loaded before loaddefs.el.
@@ -2664,9 +2663,6 @@ non-nil value, that slot cannot be set via `setf'.
2664 (forms nil) 2663 (forms nil)
2665 (docstring (if (stringp (car descs)) (pop descs))) 2664 (docstring (if (stringp (car descs)) (pop descs)))
2666 pred-form pred-check) 2665 pred-form pred-check)
2667 ;; Can't use `cl-check-type' yet.
2668 (unless (cl--struct-name-p name)
2669 (signal 'wrong-type-argument (list 'cl-struct-name-p name 'name)))
2670 (setq descs (cons '(cl-tag-slot) 2666 (setq descs (cons '(cl-tag-slot)
2671 (mapcar (function (lambda (x) (if (consp x) x (list x)))) 2667 (mapcar (function (lambda (x) (if (consp x) x (list x))))
2672 descs))) 2668 descs)))
diff --git a/lisp/emacs-lisp/cl-preloaded.el b/lisp/emacs-lisp/cl-preloaded.el
index 33a1438f690..4e73a4a31b7 100644
--- a/lisp/emacs-lisp/cl-preloaded.el
+++ b/lisp/emacs-lisp/cl-preloaded.el
@@ -36,7 +36,6 @@
36 36
37;;; Code: 37;;; Code:
38 38
39(eval-when-compile (require 'cl-generic))
40(eval-when-compile (require 'cl-lib)) 39(eval-when-compile (require 'cl-lib))
41(eval-when-compile (require 'cl-macs)) ;For cl--struct-class. 40(eval-when-compile (require 'cl-macs)) ;For cl--struct-class.
42 41
@@ -51,12 +50,6 @@
51 (apply #'error string (append sargs args)) 50 (apply #'error string (append sargs args))
52 (signal 'cl-assertion-failed `(,form ,@sargs))))) 51 (signal 'cl-assertion-failed `(,form ,@sargs)))))
53 52
54(defun cl--struct-name-p (name)
55 "Return t if NAME is a valid structure name for `cl-defstruct'."
56 (and name (symbolp name) (not (keywordp name))
57 (not (memq name (eval-when-compile cl--generic-all-builtin-types)))
58 t))
59
60;; When we load this (compiled) file during pre-loading, the cl--struct-class 53;; When we load this (compiled) file during pre-loading, the cl--struct-class
61;; code below will need to access the `cl-struct' info, since it's considered 54;; code below will need to access the `cl-struct' info, since it's considered
62;; already as its parent (because `cl-struct' was defined while the file was 55;; already as its parent (because `cl-struct' was defined while the file was
@@ -117,7 +110,6 @@
117;;;###autoload 110;;;###autoload
118(defun cl-struct-define (name docstring parent type named slots children-sym 111(defun cl-struct-define (name docstring parent type named slots children-sym
119 tag print) 112 tag print)
120 (cl-check-type name cl--struct-name)
121 (unless type 113 (unless type
122 ;; Legacy defstruct, using tagged vectors. Enable backward compatibility. 114 ;; Legacy defstruct, using tagged vectors. Enable backward compatibility.
123 (cl-old-struct-compat-mode 1)) 115 (cl-old-struct-compat-mode 1))