]> git.eshelyaron.com Git - emacs.git/commitdiff
; * lisp/battery.el (battery-bsd-apm): No need for `executable-find'.
authorManuel Giraud <manuel@ledu-giraud.fr>
Thu, 6 Oct 2022 14:03:34 +0000 (16:03 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Thu, 6 Oct 2022 18:07:23 +0000 (20:07 +0200)
lisp/battery.el

index a874f0640e676005a933bcaae31500ee8d57f4df..8de80109c6c368a514f2c66ba8867c3446ea2950 100644 (file)
@@ -938,16 +938,14 @@ The following %-sequences are provided:
 %t Remaining time (to charge or discharge) in the form `h:min'"
   (let* ((os-name (car (split-string
                         ;; FIXME: Can't we use something like `system-type'?
-                        (battery--call-process-to-string
-                         (executable-find "uname")))))
+                        (battery--call-process-to-string "uname"))))
          (apm-flag (pcase os-name
                      ("OpenBSD" "mP")
                      ("FreeBSD" "st")
                      (_         "ms")))
          (apm-args (concat "-abl" apm-flag))
          (apm-output (split-string
-                      (battery--call-process-to-string
-                       (executable-find "apm") apm-args)))
+                      (battery--call-process-to-string "apm" apm-args)))
          (indices (pcase os-name
                     ;; FreeBSD's manpage documents that multiple
                     ;; outputs are ordered by "the order in which