[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Re: master 68cc4cb6b1c: Small followup change
From:
Stefan Kangas
Subject:
Re: master 68cc4cb6b1c: Small followup change
Date:
Mon, 3 Jun 2024 17:41:44 +0000
Po Lu via Mailing list for Emacs changes <emacs-diffs@gnu.org> writes:
> * lisp/image.el (create-image): Remove supererogatory instances
> of pcase. Recognize new `lambda' values and refrain from
> specifying a default transform-smoothing when it is returned.
> (image--default-smoothing): Return lambda if scaling is default.
[...]
> --- a/lisp/image.el
> +++ b/lisp/image.el
> @@ -520,7 +520,7 @@ Images should not be larger than specified by
> `max-image-size'."
> (let ((data-format
> ;; Pass the image format, if any, if this is data.
> (and data-p (or (plist-get props :format) t))))
> - ;; It is x_find_image_file in image.c that sets the search path.
> + ;; It is `x_find_image_fd' in image.c that sets the search path.
> (setq type (ignore-error unknown-image-type
> (image-type file-or-data type data-format)))
> ;; If we have external image conversion switched on (for exotic,
> @@ -540,12 +540,13 @@ Images should not be larger than specified by
> `max-image-size'."
> props)))
> ;; Add default smoothing.
> (unless (plist-member props :transform-smoothing)
> - (setq image (nconc image
> - (list :transform-smoothing
> - (pcase image-transform-smoothing
> - ('t t)
> - ('nil nil)
> - (func (funcall func image)))))))
> + (let* ((func image-transform-smoothing)
> + (value (or (eq func t)
> + (and func (funcall func image)))))
> + (unless (eq value 'lambda)
> + (setq image (nconc image
> + (list :transform-smoothing
> + value))))))
I thought we had decided to refrain from pushing our own style with
regards to `pcase` in random code for no reason.
Am I missing something?
- Re: master 68cc4cb6b1c: Small followup change,
Stefan Kangas <=