emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] scratch/record 25aa500 5/5: Backward compatibility wit


From: Stefan Monnier
Subject: Re: [Emacs-diffs] scratch/record 25aa500 5/5: Backward compatibility with pre-existing struct instances.
Date: Tue, 28 Mar 2017 16:47:20 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

> --- a/lisp/emacs-lisp/cl-preloaded.el
> +++ b/lisp/emacs-lisp/cl-preloaded.el
> @@ -79,6 +79,8 @@
>          (let ((tag (intern (format "cl-struct-%s" name)))
>                (type-and-named (get name 'cl-struct-type))
>                (descs (get name 'cl-struct-slots)))
> +          (if (null (car type-and-named))
> +              (setq type-and-named (cons 'record (cdr type-and-named))))
>            (cl-struct-define name nil (get name 'cl-struct-include)
>                              (unless (and (eq (car type-and-named) 'vector)
>                                           (null (cadr type-and-named))

Hmm... if we're in this code, it means we're in the case of an old-old
struct (once compiled before we introduced cl-struct-define), so it's
definitely not using `record`s.


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]