mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
Simplify eww--rescale-images code
* lisp/net/eww.el (eww--rescale-images): Simplify code.
This commit is contained in:
parent
12f63c18f6
commit
eac4e34a2c
1 changed files with 8 additions and 9 deletions
|
|
@ -1189,18 +1189,17 @@ the like."
|
|||
(defun eww--rescale-images ()
|
||||
(let ((scaling (if text-scale-mode
|
||||
(+ 1 (* text-scale-mode-amount 0.1))
|
||||
1))
|
||||
match)
|
||||
1)))
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(while (setq match (text-property-search-forward 'display))
|
||||
(while-let ((match (text-property-search-forward
|
||||
'display nil (lambda (_ value) (imagep value)))))
|
||||
(let ((image (prop-match-value match)))
|
||||
(when (imagep image)
|
||||
(unless (image-property image :original-scale)
|
||||
(setf (image-property image :original-scale)
|
||||
(or (image-property image :scale) 1)))
|
||||
(setf (image-property image :scale)
|
||||
(* (image-property image :original-scale) scaling))))))))
|
||||
(unless (image-property image :original-scale)
|
||||
(setf (image-property image :original-scale)
|
||||
(or (image-property image :scale) 1)))
|
||||
(setf (image-property image :scale)
|
||||
(* (image-property image :original-scale) scaling)))))))
|
||||
|
||||
(defun eww--url-at-point ()
|
||||
"`thing-at-point' provider function."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue