all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Stefan Kangas <stefan@marxist.se>
Cc: emacs-devel@gnu.org
Subject: Re: master 35d5ad713e 1/3: Rewrite wallpaper.el to use a cl-defstruct
Date: Mon, 26 Sep 2022 12:37:45 -0400	[thread overview]
Message-ID: <jwvr0zyxfdc.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20220926154308.D7533C0CD93@vcs2.savannah.gnu.org> (Stefan Kangas's message of "Mon, 26 Sep 2022 11:43:08 -0400 (EDT)")

> +(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	other threads:[~2022-09-26 16:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <166420698826.28980.18372659877071995219@vcs2.savannah.gnu.org>
     [not found] ` <20220926154308.D7533C0CD93@vcs2.savannah.gnu.org>
2022-09-26 16:37   ` Stefan Monnier [this message]
2022-09-26 19:43     ` master 35d5ad713e 1/3: Rewrite wallpaper.el to use a cl-defstruct Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvr0zyxfdc.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=stefan@marxist.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.