Subject: [bug#78315] [PATCH 19/53] gnu: emacs-everywhere: Improve style.

From: Nicolas Graves <[email-masked]>
Date: Thu, 8 May 2025 14:50:21 +0200

* gnu/packages/emacs-xyz.scm (emacs-everywhere):
  [arguments]<phases>: Factorize 'patch-exec-paths substitution.
---
 gnu/packages/emacs-xyz.scm | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 026f04464a..dc272e4fe8 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -37147,21 +37147,9 @@ (define-public emacs-everywhere
             (add-after 'unpack 'patch-exec-paths
               (lambda* (#:key inputs #:allow-other-keys)
                 (substitute* "emacs-everywhere.el"
-                  (("\"xclip\"")
-                   (string-append "\""
-                                  (search-input-file inputs "/bin/xclip")
-                                  "\""))
-                  (("\"xdotool\"")
-                   (string-append "\""
-                                  (search-input-file inputs "/bin/xdotool")
-                                  "\""))
-                  (("\"xprop\"")
-                   (string-append "\""
-                                  (search-input-file inputs "/bin/xprop")
-                                  "\""))
-                  (("\"xwininfo\"")
-                   (string-append "\""
-                                  (search-input-file inputs "/bin/xwininfo")
+                  (("\"(xclip|xdotool|xprop|xwininfo)\"" all binary)
+                   (string-append "\"" (search-input-file
+                                        inputs (string-append "bin/" binary))
                                   "\""))))))))
       (inputs (list xclip xdotool xprop xwininfo))
       (build-system emacs-build-system)
-- 
2.49.0