emacs-devel
[Top][All Lists]
Advanced

[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)?



reply via email to

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