mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-21 06:55:39 +00:00
Correctly update image properties
* lisp/image-mode.el (image--update-properties): New function to update image properties. (image-toggle-display-image): Use it. (Bug#73617)
This commit is contained in:
parent
bb5b25181e
commit
0e9502b10e
@ -867,6 +867,13 @@ The limits are given by the user option
|
|||||||
(or (<= mw (* (car size) scale))
|
(or (<= mw (* (car size) scale))
|
||||||
(<= mh (* (cdr size) scale))))))
|
(<= mh (* (cdr size) scale))))))
|
||||||
|
|
||||||
|
(defun image--update-properties (image properties)
|
||||||
|
"Update IMAGE with the new PROPERTIES set."
|
||||||
|
(let (prop)
|
||||||
|
(while (setq prop (pop properties))
|
||||||
|
(plist-put (cdr image) prop (pop properties)))
|
||||||
|
image))
|
||||||
|
|
||||||
(defun image-toggle-display-image ()
|
(defun image-toggle-display-image ()
|
||||||
"Show the image of the image file.
|
"Show the image of the image file.
|
||||||
Turn the image data into a real image, but only if the whole file
|
Turn the image data into a real image, but only if the whole file
|
||||||
@ -959,7 +966,7 @@ was inserted."
|
|||||||
|
|
||||||
;; Discard any stale image data before looking it up again.
|
;; Discard any stale image data before looking it up again.
|
||||||
(image-flush image)
|
(image-flush image)
|
||||||
(setq image (append image (image-transform-properties image)))
|
(setq image (image--update-properties image (image-transform-properties image)))
|
||||||
(setq props
|
(setq props
|
||||||
`(display ,image
|
`(display ,image
|
||||||
;; intangible ,image
|
;; intangible ,image
|
||||||
|
Loading…
Reference in New Issue
Block a user