From: Stefan Kangas <stefankangas@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>, emacs-devel@gnu.org
Subject: Re: master b525f201ba: Allow specifying the color to use in image-elide
Date: Wed, 14 Sep 2022 16:52:47 -0700 [thread overview]
Message-ID: <CADwFkmkUrc-=X+5GP8a0QTPXA9jSWWGshefCPpwMRF3hAEkwRw@mail.gmail.com> (raw)
In-Reply-To: <20220914182209.04F50C00872@vcs2.savannah.gnu.org>
Lars Ingebrigtsen <larsi@gnus.org> writes:
> ;;;###autoload
> -(defun image-elide (&optional square)
> +(defun image-elide (color &optional square)
> "Elide a square from the image under point.
> If SQUARE (interactively, the prefix), elide a square instead of a
> -rectangle from the image."
> - (interactive "P")
> - (image-crop square t))
> +rectangle from the image.
> +
> +Interatively, the user will be prompted for the color to use, and
> +defaults to black."
> + (interactive (list (read-color "Use color: ")
> + current-prefix-arg))
> + (image-crop square (if (string-empty-p color)
> + "black" color)))
How about putting the color selection behind a prefix argument instead?
How about also adding a defcustom for the default color (i.e. without a
prefix argument)?
next parent reply other threads:[~2022-09-14 23:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <166317972871.8462.16344173364399917298@vcs2.savannah.gnu.org>
[not found] ` <20220914182209.04F50C00872@vcs2.savannah.gnu.org>
2022-09-14 23:52 ` Stefan Kangas [this message]
2022-09-15 5:47 ` master b525f201ba: Allow specifying the color to use in image-elide Eli Zaretskii
2022-09-15 7:07 ` Lars Ingebrigtsen
2022-09-15 7:21 ` Jean Louis
2022-09-15 7:28 ` Stefan Kangas
2022-09-15 7:34 ` Eli Zaretskii
2022-09-16 9:08 ` Lars Ingebrigtsen
2022-09-16 14:42 ` Jean Louis
2022-09-16 15:14 ` Stefan Monnier
2022-09-18 10:30 ` Lars Ingebrigtsen
2022-09-15 5:58 ` Lars Ingebrigtsen
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='CADwFkmkUrc-=X+5GP8a0QTPXA9jSWWGshefCPpwMRF3hAEkwRw@mail.gmail.com' \
--to=stefankangas@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.org \
/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.