]> git.eshelyaron.com Git - emacs.git/commit
Prevent name clashes between CL structures and builtin types
authorPhilipp Stephani <phst@google.com>
Thu, 21 Dec 2017 17:25:49 +0000 (18:25 +0100)
committerPhilipp Stephani <phst@google.com>
Sun, 7 Jan 2018 11:33:53 +0000 (12:33 +0100)
commit151496a4b96430924bc148f85b9c8471d1e132b1
tree27341499efeba63bb6deae9d6dfeed4a748b5879
parentf04a527a9266690e6486c65d303a897b08fc5732
Prevent name clashes between CL structures and builtin types

* lisp/emacs-lisp/cl-preloaded.el (cl-struct-define): Don't allow
structures with the same names as builtin types.
(cl--struct-name-p): New helper function.

* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Don't allow structures
with the same names as builtin types.

* test/lisp/emacs-lisp/cl-macs-tests.el (cl-defstruct/builtin-type):
* test/lisp/emacs-lisp/cl-preloaded-tests.el
(cl-struct-define/builtin-type): New unit tests.

* etc/NEWS: Document changed behavior.
etc/NEWS
lisp/emacs-lisp/cl-macs.el
lisp/emacs-lisp/cl-preloaded.el
test/lisp/emacs-lisp/cl-macs-tests.el
test/lisp/emacs-lisp/cl-preloaded-tests.el [new file with mode: 0644]