Function: eieio--constructor-macro

eieio--constructor-macro is a byte-compiled function defined in eieio.el.gz.

Signature

(eieio--constructor-macro WHOLE &rest SLOTS)

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/eieio.el.gz
(defun eieio--constructor-macro (whole &rest slots)
  ;; When `eieio-backward-compatibility' is removed, we should
  ;; remove this compiler-macro, until then, it's best to emit a compile-time
  ;; warning even if `eieio-backward-compatibility' is nil, I think.
  (if (or (null slots) (keywordp (car slots))
          ;; Detect the second pass!
          (eq 'identity (car-safe (car slots))))
      whole
    (macroexp-warn-and-return
     (format "Obsolete name argument %S to constructor %S"
             (car slots) (car whole))
     ;; Keep the name arg, for backward compatibility,
     ;; but hide it so we don't trigger indefinitely.
     `(,(car whole) (identity ,(car slots))
       ,@(cdr slots))
     '(obsolete eieio-constructor-name-arg) nil (car slots))))