[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#57813: Icon images are non-functional
From: |
Juri Linkov |
Subject: |
bug#57813: Icon images are non-functional |
Date: |
Fri, 23 Sep 2022 18:48:54 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) |
> diff --git a/lisp/emacs-lisp/icons.el b/lisp/emacs-lisp/icons.el
> index ff4f20c207..ccc3657793 100644
> --- a/lisp/emacs-lisp/icons.el
> +++ b/lisp/emacs-lisp/icons.el
> @@ -202,7 +202,11 @@ icons--create
> :height (if (eq height 'line)
> (window-default-line-height)
> height)
> - :scale 1 :ascent 'center)
> + :scale 1
> + :rotation (plist-get keywords :rotation)
Oh, I noticed now this prints a warning in *Messages*:
Invalid image ‘:rotation’ parameter nil
but still continues to work fine.
So maybe the keyword :rotation should be used only on this
condition (plist-member keywords :rotation) instead of:
(create-image file
nil nil
:rotation (plist-get keywords :rotation)
I guess the only way is to convert this function call to 'apply'
with a constructed list of arguments?
Or better to change compute_image_rotation to allow nil in :rotation:
diff --git a/src/image.c b/src/image.c
index 1e323ba66a..6d9316c64b 100644
--- a/src/image.c
+++ b/src/image.c
@@ -2548,6 +2548,8 @@ compute_image_rotation (struct image *img, double
*rotation)
Lisp_Object value = image_spec_value (img->spec, QCrotation, &foundp);
if (!foundp)
return;
+ if (NILP (value))
+ return;
if (! NUMBERP (value))
{
image_error ("Invalid image `:rotation' parameter");
- bug#57813: Icon images are non-functional, (continued)
- bug#57813: Icon images are non-functional, Eli Zaretskii, 2022/09/18
- bug#57813: Icon images are non-functional, Juri Linkov, 2022/09/18
- bug#57813: Icon images are non-functional, Eli Zaretskii, 2022/09/19
- bug#57813: Icon images are non-functional, Juri Linkov, 2022/09/19
- bug#57813: Icon images are non-functional, Eli Zaretskii, 2022/09/20
- bug#57813: Icon images are non-functional, Juri Linkov, 2022/09/20
- bug#57813: Icon images are non-functional,
Juri Linkov <=
- bug#57813: Icon images are non-functional, Lars Ingebrigtsen, 2022/09/23
- bug#57813: Icon images are non-functional, Juri Linkov, 2022/09/24