From: Stefan Kangas <stefankangas@gmail.com>
To: Po Lu <luangruo@yahoo.com>, emacs-devel@gnu.org
Subject: Re: master 68cc4cb6b1c: Small followup change
Date: Mon, 3 Jun 2024 17:41:44 +0000 [thread overview]
Message-ID: <CADwFkm=gasYia0XoKPDkXYmyhPrusJwoX7rZS7OpUt1Bt1wQig@mail.gmail.com> (raw)
In-Reply-To: <20240603124021.394CBC12C32@vcs2.savannah.gnu.org>
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?
next parent reply other threads:[~2024-06-03 17:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <171741842084.30104.166240780698880790@vcs2.savannah.gnu.org>
[not found] ` <20240603124021.394CBC12C32@vcs2.savannah.gnu.org>
2024-06-03 17:41 ` Stefan Kangas [this message]
2024-06-03 17:55 ` master 68cc4cb6b1c: Small followup change Eli Zaretskii
2024-06-03 23:56 ` Po Lu
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADwFkm=gasYia0XoKPDkXYmyhPrusJwoX7rZS7OpUt1Bt1wQig@mail.gmail.com' \
--to=stefankangas@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=luangruo@yahoo.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).