bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#28489: Acknowledgement (27.0.50; eieio-persistent slot type validati


From: Noam Postavsky
Subject: bug#28489: Acknowledgement (27.0.50; eieio-persistent slot type validation should be a bit smarter)
Date: Tue, 26 Sep 2017 20:05:25 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux)

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

>       ((eq (car-safe type) 'or)
> -      ;; If type is a list, and is an or, it is possibly something
> -      ;; like (or null myclass), so check for that.
> -      (let ((ans nil))
> -        (dolist (subtype (cdr type))
> -          (setq ans (eieio-persistent-slot-type-is-class-p
> -                     subtype)))
> -        ans))
> +      ;; If type is a list, and is an or, it is possible that
> +      ;; multiple classes are acceptable, find them all.
> +      (seq-filter (lambda (elt) (class-p elt)) (cdr type)))

You seem to have removed some recursion here, is that correct?  If yes,
probably something worth explaining in the commit message.

Minor nitpicks:
- The lambda could be replaced with just #'class-p.
- The indentation has a mix of tabs and spaces.





reply via email to

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