mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-17 10:27:41 +00:00
(defstruct): Don't define the default constructor if it is overridden.
This commit is contained in:
parent
f679907bf2
commit
40e8a6c318
1 changed files with 6 additions and 1 deletions
|
|
@ -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 a new issue