[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master b525f201ba: Allow specifying the color to use in image-elide
From: |
Stefan Kangas |
Subject: |
Re: master b525f201ba: Allow specifying the color to use in image-elide |
Date: |
Wed, 14 Sep 2022 16:52:47 -0700 |
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)?
- Re: master b525f201ba: Allow specifying the color to use in image-elide,
Stefan Kangas <=
- Re: master b525f201ba: Allow specifying the color to use in image-elide, Eli Zaretskii, 2022/09/15
- Re: master b525f201ba: Allow specifying the color to use in image-elide, Lars Ingebrigtsen, 2022/09/15
- Re: master b525f201ba: Allow specifying the color to use in image-elide, Jean Louis, 2022/09/15
- Re: master b525f201ba: Allow specifying the color to use in image-elide, Stefan Kangas, 2022/09/15
- Re: master b525f201ba: Allow specifying the color to use in image-elide, Eli Zaretskii, 2022/09/15
- Re: master b525f201ba: Allow specifying the color to use in image-elide, Lars Ingebrigtsen, 2022/09/16
- Re: master b525f201ba: Allow specifying the color to use in image-elide, Jean Louis, 2022/09/16
- Re: master b525f201ba: Allow specifying the color to use in image-elide, Stefan Monnier, 2022/09/16
- Re: master b525f201ba: Allow specifying the color to use in image-elide, Lars Ingebrigtsen, 2022/09/18
- Re: master b525f201ba: Allow specifying the color to use in image-elide, Lars Ingebrigtsen, 2022/09/15