mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-01 11:14:55 +00:00
(defstruct): Don't define the default constructor if it is overridden.
This commit is contained in:
parent
f679907bf2
commit
40e8a6c318
@ -2175,7 +2175,12 @@ copier, a `NAME-p' predicate, and setf-able `NAME-SLOT' accessors.
|
||||
(symbol-name (car args)) ""))))
|
||||
((eq opt :constructor)
|
||||
(if (cdr args)
|
||||
(push args constrs)
|
||||
(progn
|
||||
;; If this defines a constructor of the same name as
|
||||
;; the default one, don't define the default.
|
||||
(if (eq (car args) constructor)
|
||||
(setq constructor nil))
|
||||
(push args constrs))
|
||||
(if args (setq constructor (car args)))))
|
||||
((eq opt :copier)
|
||||
(if args (setq copier (car args))))
|
||||
|
Loading…
Reference in New Issue
Block a user