]> git.eshelyaron.com Git - emacs.git/commit
(cl-defstruct): Improve handling of unknown options
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 17 Apr 2024 01:17:47 +0000 (21:17 -0400)
committerEshel Yaron <me@eshelyaron.com>
Sat, 20 Apr 2024 11:02:49 +0000 (14:02 +0300)
commiteec6e1bce391f19b8ca2da0df4ae737b563f70d1
tree840444ddd2f9e2e953ae72391630173bea8fdfaf
parentf09f09b8ba423b1b7f261bdb3afdb26a08d8b5b8
(cl-defstruct): Improve handling of unknown options

Until now `cl-defstruct` signaled an error when encountering an
unknown option.  It's easy to code and it does the job, but it
doesn't give good location info in the compiler's output,
and it makes it more painful to use not-yet-supported options.
So just signal a warning instead.

* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Warn about unknown
options, instead of signaling an error.

(cherry picked from commit 484b0979099d91e286c248e32b2f693111fac2ad)
lisp/emacs-lisp/cl-macs.el