From: Stefan Kangas Date: Tue, 27 Sep 2022 18:09:01 +0000 (+0200) Subject: Prompt for wallpaper width/height only when needed X-Git-Tag: emacs-29.0.90~1856^2~143 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b71241742ca825c23063c22dcb205e95ac0fd710;p=emacs.git Prompt for wallpaper width/height only when needed * lisp/image/wallpaper.el (wallpaper--format-arg): Don't prompt for width and height unless the values are actually used. --- diff --git a/lisp/image/wallpaper.el b/lisp/image/wallpaper.el index 0a891f9012a..3b32c5a4156 100644 --- a/lisp/image/wallpaper.el +++ b/lisp/image/wallpaper.el @@ -405,14 +405,16 @@ FILE is the image file name." (?F . ,(mapconcat #'url-hexify-string (file-name-split file) "/")) - (?h . ,(wallpaper--get-height-or-width - "height" - #'display-pixel-height - wallpaper-default-height)) - (?w . ,(wallpaper--get-height-or-width - "width" - #'display-pixel-width - wallpaper-default-width)) + (?h . ,(lambda () + (wallpaper--get-height-or-width + "height" + #'display-pixel-height + wallpaper-default-height))) + (?w . ,(lambda () + (wallpaper--get-height-or-width + "width" + #'display-pixel-width + wallpaper-default-width))) ;; screen number (?S . ,(let ((display (frame-parameter (selected-frame) 'display))) (if (and display