From: Stefan Kangas Date: Thu, 29 Sep 2022 16:44:03 +0000 (+0200) Subject: Fix loading wallpaper.el on MS-Windows X-Git-Tag: emacs-29.0.90~1856^2~136 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=696c528379a92274ccdc8688863e2ab1cd5a762c;p=emacs.git Fix loading wallpaper.el on MS-Windows * lisp/image/wallpaper.el (wallpaper--find-command) (wallpaper--find-command-args): Avoid backtrace when 'wallpaper--find-setter' returns nil, e.g. on MS-Windows. (Bug#58167) --- diff --git a/lisp/image/wallpaper.el b/lisp/image/wallpaper.el index 80c98629166..3f852f2504f 100644 --- a/lisp/image/wallpaper.el +++ b/lisp/image/wallpaper.el @@ -271,11 +271,13 @@ order in which they appear.") (defun wallpaper--find-command () "Return a valid command to set the wallpaper in this environment." - (wallpaper-setter-command (wallpaper--find-setter))) + (when-let ((setter (wallpaper--find-setter))) + (wallpaper-setter-command setter))) (defun wallpaper--find-command-args () "Return command line arguments matching `wallpaper-command'." - (wallpaper-setter-args (wallpaper--find-setter))) + (when-let ((setter (wallpaper--find-setter))) + (wallpaper-setter-args setter))) ;;; Customizable variables