unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master 35d5ad713e 1/3: Rewrite wallpaper.el to use a cl-defstruct
       [not found] ` <20220926154308.D7533C0CD93@vcs2.savannah.gnu.org>
@ 2022-09-26 16:37   ` Stefan Monnier
  2022-09-26 19:43     ` Stefan Kangas
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2022-09-26 16:37 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: emacs-devel

> +(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




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: master 35d5ad713e 1/3: Rewrite wallpaper.el to use a cl-defstruct
  2022-09-26 16:37   ` master 35d5ad713e 1/3: Rewrite wallpaper.el to use a cl-defstruct Stefan Monnier
@ 2022-09-26 19:43     ` Stefan Kangas
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Kangas @ 2022-09-26 19:43 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> 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`.

Thanks, fixed.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-26 19:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <166420698826.28980.18372659877071995219@vcs2.savannah.gnu.org>
     [not found] ` <20220926154308.D7533C0CD93@vcs2.savannah.gnu.org>
2022-09-26 16:37   ` master 35d5ad713e 1/3: Rewrite wallpaper.el to use a cl-defstruct Stefan Monnier
2022-09-26 19:43     ` Stefan Kangas

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).