[bug#78315,25/53] gnu: emacs-w3m: Improve style.

Message ID 20250508125104.26530-25-ngraves@ngraves.fr
State New
Headers
Series More fixes, and a lot of style improvements. |

Commit Message

Nicolas Graves May 8, 2025, 12:50 p.m. UTC
  * gnu/packages/emacs-xyz.scm (emacs-w3m):
  [arguments]<phases>: Use gexps.
---
 gnu/packages/emacs-xyz.scm | 32 +++++++++++++++-----------------
 1 file changed, 15 insertions(+), 17 deletions(-)
  

Patch

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index a8497dbdaa..6eaf571f78 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -4062,25 +4062,23 @@  (define-public emacs-w3m
               (substitute* "configure"
                 (("EMACS_FLAVOR=unsupported") "EMACS_FLAVOR=emacs"))))
           (add-before 'build 'patch-exec-paths
-            (lambda* (#:key inputs outputs #:allow-other-keys)
-              (let ((out (assoc-ref outputs "out")))
-                (make-file-writable "w3m.el")
-                (emacs-substitute-variables "w3m.el"
-                  ("w3m-command" (search-input-file inputs "/bin/w3m"))
-                  ("w3m-touch-command" (search-input-file inputs "/bin/touch"))
-                  ("w3m-icon-directory"
-                   (string-append out "/share/images/emacs-w3m")))
-                (make-file-writable "w3m-image.el")
-                (emacs-substitute-variables "w3m-image.el"
-                  ("w3m-imagick-convert-program"
-                   (search-input-file inputs "/bin/convert"))
-                  ("w3m-imagick-identify-program"
-                   (search-input-file inputs "/bin/identify"))))))
+            (lambda* (#:key inputs #:allow-other-keys)
+              (make-file-writable "w3m.el")
+              (emacs-substitute-variables "w3m.el"
+                ("w3m-command" (search-input-file inputs "/bin/w3m"))
+                ("w3m-touch-command" (search-input-file inputs "/bin/touch"))
+                ("w3m-icon-directory"
+                 (string-append #$output "/share/images/emacs-w3m")))
+              (make-file-writable "w3m-image.el")
+              (emacs-substitute-variables "w3m-image.el"
+                ("w3m-imagick-convert-program"
+                 (search-input-file inputs "/bin/convert"))
+                ("w3m-imagick-identify-program"
+                 (search-input-file inputs "/bin/identify")))))
           (replace 'install
-            (lambda* (#:key outputs #:allow-other-keys)
+            (lambda _
               (invoke "make" "install" "install-icons")
-              (with-directory-excursion
-                  (emacs:elpa-directory (assoc-ref outputs "out"))
+              (with-directory-excursion (emacs:elpa-directory #$output)
                 (for-each delete-file '("ChangeLog" "ChangeLog.1"))
                 (symlink "w3m-load.el" "w3m-autoloads.el")))))))
     (home-page "http://emacs-w3m.namazu.org/")