Emacs/Guix: Fix first/second -> cl-first/cl-second with Emacs 27.
parent
931ace0920
commit
ff651bc384
|
@ -80,8 +80,8 @@ If MULTIPLE? is non-nil, return a list of (NAME FILE) of the selected manifests.
|
|||
(if multiple?
|
||||
(mapcar (lambda (name)
|
||||
(assoc name files))
|
||||
(completing-read-multiple prompt (mapcar #'first files)))
|
||||
(assoc (completing-read prompt (mapcar #'first files))
|
||||
(completing-read-multiple prompt (mapcar #'cl-first files)))
|
||||
(assoc (completing-read prompt (mapcar #'cl-first files))
|
||||
files))))))
|
||||
|
||||
(defun ambrevar/guix-query-manifest (&optional manifest multiple?)
|
||||
|
@ -125,7 +125,7 @@ the channel specification."
|
|||
"Edit system.
|
||||
If SYSTEM is nil, it is queried from the systems found in `ambrevar/guix-system-directory'."
|
||||
(interactive)
|
||||
(setq system (second (ambrevar/guix-query-system system)))
|
||||
(setq system (cl-second (ambrevar/guix-query-system system)))
|
||||
(find-file system))
|
||||
(global-set-key (kbd "C-x c s") #'ambrevar/guix-edit-system)
|
||||
(with-eval-after-load 'evil
|
||||
|
@ -137,7 +137,7 @@ If SYSTEM is nil, it is queried from the systems found in `ambrevar/guix-system-
|
|||
"Edit MANIFEST.
|
||||
If MANIFEST is nil, it is queried from the manifests found in `ambrevar/guix-manifest-directory'."
|
||||
(interactive)
|
||||
(setq manifest (second (ambrevar/guix-query-manifest manifest)))
|
||||
(setq manifest (cl-second (ambrevar/guix-query-manifest manifest)))
|
||||
(find-file manifest))
|
||||
(global-set-key (kbd "C-x c g") #'ambrevar/guix-edit-manifest)
|
||||
(with-eval-after-load 'evil
|
||||
|
@ -154,7 +154,7 @@ If MANIFEST is nil, it is queried from the manifests found in `ambrevar/guix-man
|
|||
(defun ambrevar/guix-find-channel-from-manifest (pattern)
|
||||
"Return the channel specification file matching PATTERN in
|
||||
`ambrevar/guix-channel-spec-directory'."
|
||||
(first (directory-files ambrevar/guix-channel-spec-directory 'full
|
||||
(cl-first (directory-files ambrevar/guix-channel-spec-directory 'full
|
||||
(concat pattern "-channel"))))
|
||||
|
||||
(defun ambrevar/run-in-eshell (command)
|
||||
|
@ -194,7 +194,7 @@ If MANIFEST is nil, it is queried from the manifests found in `ambrevar/guix-man
|
|||
(let* ((guix (if channel
|
||||
(let ((dest (expand-file-name
|
||||
;; TODO: What name should we use with multiple manifests?
|
||||
(first (first manifests))
|
||||
(cl-first (cl-first manifests))
|
||||
ambrevar/guix-extra-channels)))
|
||||
(make-directory dest 'parents)
|
||||
(format "guix pull --channels=%s --profile=%s/guix && %s/guix/bin/guix"
|
||||
|
@ -203,7 +203,7 @@ If MANIFEST is nil, it is queried from the manifests found in `ambrevar/guix-man
|
|||
(shell-quote-argument dest)))
|
||||
"guix")))
|
||||
(dolist (manifest-pair manifests)
|
||||
(let ((manifest-name (first manifest-pair)))
|
||||
(let ((manifest-name (cl-first manifest-pair)))
|
||||
(make-directory (expand-file-name manifest-name
|
||||
ambrevar/guix-extra-profiles)
|
||||
'parents)))
|
||||
|
@ -212,8 +212,8 @@ If MANIFEST is nil, it is queried from the manifests found in `ambrevar/guix-man
|
|||
'ambrevar/run-in-shell)
|
||||
(mapconcat #'identity
|
||||
(mapcar (lambda (manifest-pair)
|
||||
(let ((manifest-name (first manifest-pair))
|
||||
(manifest (second manifest-pair))
|
||||
(let ((manifest-name (cl-first manifest-pair))
|
||||
(manifest (cl-second manifest-pair))
|
||||
(profile (expand-file-name ambrevar/guix-extra-profiles)))
|
||||
(string-join
|
||||
(list "echo" (format "'==> Installing manifest %S to profile %S'"
|
||||
|
@ -231,7 +231,7 @@ If MANIFEST is nil, it is queried from the manifests found in `ambrevar/guix-man
|
|||
(unless channel
|
||||
;; TODO: Only do this when manifest install has succeeded.
|
||||
(dolist (manifest-pair manifests)
|
||||
(let ((manifest-name (first manifest-pair)))
|
||||
(let ((manifest-name (cl-first manifest-pair)))
|
||||
(ambrevar/guix-save-channel-specs
|
||||
(format "%s/guix-%s-channels.scm"
|
||||
ambrevar/guix-channel-spec-directory
|
||||
|
@ -250,11 +250,11 @@ non-nil, then try to use a channel specification file from
|
|||
`ambrevar/guix-channel-spec-directory' if any."
|
||||
(interactive)
|
||||
(let* ((manifest-pair (ambrevar/guix-query-manifest manifest))
|
||||
(manifest-name (first manifest-pair))
|
||||
(manifest (second manifest-pair))
|
||||
(manifest-name (cl-first manifest-pair))
|
||||
(manifest (cl-second manifest-pair))
|
||||
(channel (or channel
|
||||
(and current-prefix-arg
|
||||
(second (ambrevar/guix-query-channel-spec)))
|
||||
(cl-second (ambrevar/guix-query-channel-spec)))
|
||||
(and ambrevar/guix-always-use-channel-specs
|
||||
(ambrevar/guix-find-channel-from-manifest manifest-name)))))
|
||||
(%ambrevar/guix-install-manifest (list manifest-pair) channel)))
|
||||
|
@ -270,7 +270,7 @@ With a prefix argument, query for a channel specification file."
|
|||
(let* ((manifests (or manifests (ambrevar/guix-query-manifest nil :multiple)))
|
||||
(channel (or channel
|
||||
(and current-prefix-arg
|
||||
(second (ambrevar/guix-query-channel-spec))))))
|
||||
(cl-second (ambrevar/guix-query-channel-spec))))))
|
||||
(%ambrevar/guix-install-manifest manifests channel)))
|
||||
(global-set-key (kbd "C-x c G") #'ambrevar/guix-install-manifests)
|
||||
(with-eval-after-load 'evil
|
||||
|
@ -284,8 +284,8 @@ System is queried from those found in `ambrevar/guix-system-directory'. "
|
|||
(interactive)
|
||||
(require 'init-shell) ; For `helm-ff-preferred-shell-mode'.
|
||||
(let* ((system-pair (ambrevar/guix-query-system system))
|
||||
(system-name (first system-pair))
|
||||
(system (second system-pair)))
|
||||
(system-name (cl-first system-pair))
|
||||
(system (cl-second system-pair)))
|
||||
(funcall (if (eq helm-ff-preferred-shell-mode 'eshell-mode)
|
||||
'ambrevar/run-in-eshell
|
||||
'ambrevar/run-in-shell)
|
||||
|
|
Loading…
Reference in New Issue