emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master b71241742c 2/3: Prompt for wallpaper width/height only when neede


From: Stefan Kangas
Subject: master b71241742c 2/3: Prompt for wallpaper width/height only when needed
Date: Thu, 29 Sep 2022 10:10:39 -0400 (EDT)

branch: master
commit b71241742ca825c23063c22dcb205e95ac0fd710
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>

    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.
---
 lisp/image/wallpaper.el | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/lisp/image/wallpaper.el b/lisp/image/wallpaper.el
index 0a891f9012..3b32c5a415 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]