emacs-devel
[Top][All Lists]
Advanced

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

Re: master 35d5ad713e 1/3: Rewrite wallpaper.el to use a cl-defstruct


From: Stefan Monnier
Subject: Re: master 35d5ad713e 1/3: Rewrite wallpaper.el to use a cl-defstruct
Date: Mon, 26 Sep 2022 12:37:45 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> +(cl-defstruct (wallpaper-setter
> +               ;; Rename the default constructor from `make-wallpaper-cmd'.
> +               (:constructor
> +                wallpaper-setter-create
> +                ( name command args-raw
> +                  &rest rest-plist
> +                  &aux
> +                  (args (if (listp args-raw)
> +                            args-raw
> +                          (string-split args-raw)))
> +                  (predicate (plist-get rest-plist :predicate))))

FWIW, the above does not "rename" anything.  It just adds another
constructor in addition to the default `make-wallpaper-cmd`.
If you don't want that default (I never want it, personally), then you
need to add (:constructor nil) to your `cl-defstruct`.


        Stefan




reply via email to

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