1 ;;; guix-command.el --- Popup interface for guix commands -*- lexical-binding: t -*-
3 ;; Copyright © 2015 Alex Kost <alezost@gmail.com>
5 ;; This file is part of GNU Guix.
7 ;; GNU Guix is free software; you can redistribute it and/or modify
8 ;; it under the terms of the GNU General Public License as published by
9 ;; the Free Software Foundation, either version 3 of the License, or
10 ;; (at your option) any later version.
12 ;; GNU Guix is distributed in the hope that it will be useful,
13 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;; GNU General Public License for more details.
17 ;; You should have received a copy of the GNU General Public License
18 ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
22 ;; This file provides a magit-like popup interface for running guix
23 ;; commands in Guix REPL. The entry point is "M-x guix". When it is
24 ;; called the first time, "guix --help" output is parsed and
25 ;; `guix-COMMAND-action' functions are generated for each available guix
26 ;; COMMAND. Then a window with these commands is popped up. When a
27 ;; particular COMMAND is called, "guix COMMAND --help" output is parsed,
28 ;; and a user get a new popup window with available options for this
31 ;; To avoid hard-coding all guix options, actions, etc., as much data is
32 ;; taken from "guix ... --help" outputs as possible. But this data is
33 ;; still incomplete: not all long options have short analogs, also
34 ;; special readers should be used for some options (for example, to
35 ;; complete package names while prompting for a package). So after
36 ;; parsing --help output, the arguments are "improved". All arguments
37 ;; (switches, options and actions) are `guix-command-argument'
40 ;; Only "M-x guix" command is available after this file is loaded. The
41 ;; rest commands/actions/popups are generated on the fly only when they
42 ;; are needed (that's why there is a couple of `eval'-s in this file).
44 ;; COMMANDS argument is used by many functions in this file. It means a
45 ;; list of guix commands without "guix" itself, e.g.: ("build"),
46 ;; ("import" "gnu"). The empty list stands for the plain "guix" without
49 ;; All actions in popup windows are divided into 2 groups:
51 ;; - 'Popup' actions - used to pop up another window. For example, every
52 ;; action in the 'guix' or 'guix import' window is a popup action. They
53 ;; are defined by `guix-command-define-popup-action' macro.
55 ;; - 'Execute' actions - used to do something with the command line (to
56 ;; run a command in Guix REPL or to copy it into kill-ring) constructed
57 ;; with the current popup. They are defined by
58 ;; `guix-command-define-execute-action' macro.
65 (require 'guix-help-vars
)
69 (require 'guix-external
)
71 (defgroup guix-commands nil
72 "Settings for guix popup windows."
75 (defvar guix-command-complex-with-shared-arguments
77 "List of guix commands which have subcommands with shared options.
78 I.e., 'guix foo --help' is the same as 'guix foo bar --help'.")
80 (defun guix-command-action-name (&optional commands
&rest name-parts
)
81 "Return name of action function for guix COMMANDS."
82 (guix-command-symbol (append commands name-parts
(list "action"))))
87 (cl-defstruct (guix-command-argument
88 (:constructor guix-command-make-argument
)
89 (:copier guix-command-copy-argument
))
90 name char doc fun switch? option? action?
)
92 (cl-defun guix-command-modify-argument
94 (name nil name-bound?
)
95 (char nil char-bound?
)
98 (switch? nil switch?-bound?
)
99 (option? nil option?-bound?
)
100 (action? nil action?-bound?
))
101 "Return a modified version of ARGUMENT."
103 (let ((copy (guix-command-copy-argument argument
)))
104 (and name-bound?
(setf (guix-command-argument-name copy
) name
))
105 (and char-bound?
(setf (guix-command-argument-char copy
) char
))
106 (and doc-bound?
(setf (guix-command-argument-doc copy
) doc
))
107 (and fun-bound?
(setf (guix-command-argument-fun copy
) fun
))
108 (and switch?-bound?
(setf (guix-command-argument-switch? copy
) switch?
))
109 (and option?-bound?
(setf (guix-command-argument-option? copy
) option?
))
110 (and action?-bound?
(setf (guix-command-argument-action? copy
) action?
))
113 (defun guix-command-modify-argument-from-alist (argument alist
)
114 "Return a modified version of ARGUMENT or nil if it wasn't modified.
115 Each assoc from ALIST have a form (NAME . PLIST). NAME is an
116 argument name. PLIST is a property list of argument parameters
118 (let* ((name (guix-command-argument-name argument
))
119 (plist (guix-assoc-value alist name
)))
121 (apply #'guix-command-modify-argument
124 (defmacro guix-command-define-argument-improver
(name alist
)
125 "Define NAME variable and function to modify an argument from ALIST."
128 (defvar ,name
,alist
)
129 (defun ,name
(argument)
130 (guix-command-modify-argument-from-alist argument
,name
))))
132 (guix-command-define-argument-improver
133 guix-command-improve-action-argument
135 ("environment" :char ?E
)
140 (guix-command-define-argument-improver
141 guix-command-improve-common-argument
142 '(("--help" :switch? nil
)
143 ("--version" :switch? nil
)))
145 (guix-command-define-argument-improver
146 guix-command-improve-target-argument
147 '(("--target" :char ?T
)))
149 (guix-command-define-argument-improver
150 guix-command-improve-system-type-argument
151 '(("--system" :fun guix-read-system-type
)))
153 (guix-command-define-argument-improver
154 guix-command-improve-load-path-argument
155 '(("--load-path" :fun read-directory-name
)))
157 (guix-command-define-argument-improver
158 guix-command-improve-search-paths-argument
159 '(("--search-paths" :char ?P
)))
161 (guix-command-define-argument-improver
162 guix-command-improve-substitute-urls-argument
163 '(("--substitute-urls" :char ?U
)))
165 (guix-command-define-argument-improver
166 guix-command-improve-hash-argument
167 '(("--format" :fun guix-read-hash-format
)))
169 (guix-command-define-argument-improver
170 guix-command-improve-key-policy-argument
171 '(("--key-download" :fun guix-read-key-policy
)))
173 (defvar guix-command-improve-common-build-argument
174 '(("--no-substitutes" :char ?s
)
175 ("--no-build-hook" :char ?h
)
176 ("--max-silent-time" :char ?x
)))
178 (defun guix-command-improve-common-build-argument (argument)
179 (guix-command-modify-argument-from-alist
181 (append guix-command-improve-load-path-argument
182 guix-command-improve-substitute-urls-argument
183 guix-command-improve-common-build-argument
)))
185 (guix-command-define-argument-improver
186 guix-command-improve-archive-argument
187 '(("--generate-key" :char ?k
)))
189 (guix-command-define-argument-improver
190 guix-command-improve-build-argument
191 '(("--no-grafts" :char ?g
)
192 ("--root" :fun guix-read-file-name
)
193 ("--sources" :char ?S
:fun guix-read-source-type
:switch? nil
)
194 ("--with-source" :fun guix-read-file-name
)))
196 (guix-command-define-argument-improver
197 guix-command-improve-environment-argument
198 '(("--exec" :fun read-shell-command
)
199 ("--load" :fun guix-read-file-name
)))
201 (guix-command-define-argument-improver
202 guix-command-improve-gc-argument
203 '(("--list-dead" :char ?D
)
204 ("--list-live" :char ?L
)
205 ("--referrers" :char ?f
)
206 ("--verify" :fun guix-read-verify-options-string
)))
208 (guix-command-define-argument-improver
209 guix-command-improve-graph-argument
210 '(("--type" :fun guix-read-graph-type
)))
212 (guix-command-define-argument-improver
213 guix-command-improve-import-argument
214 '(("cran" :char ?r
)))
216 (guix-command-define-argument-improver
217 guix-command-improve-import-elpa-argument
218 '(("--archive" :fun guix-read-elpa-archive
)))
220 (guix-command-define-argument-improver
221 guix-command-improve-lint-argument
222 '(("--checkers" :fun guix-read-lint-checker-names-string
)))
224 (guix-command-define-argument-improver
225 guix-command-improve-package-argument
226 ;; Unlike all other options, --install/--remove do not have a form
227 ;; '--install=foo,bar' but '--install foo bar' instead, so we need
230 :name
"--install " :fun guix-read-package-names-string
231 :switch? nil
:option? t
)
233 :name
"--remove " :fun guix-read-package-names-string
234 :switch? nil
:option? t
)
235 ("--install-from-file" :fun guix-read-file-name
)
236 ("--manifest" :fun guix-read-file-name
)
237 ("--do-not-upgrade" :char ?U
)
238 ("--roll-back" :char ?R
)
239 ("--show" :char ?w
:fun guix-read-package-name
)))
241 (guix-command-define-argument-improver
242 guix-command-improve-refresh-argument
243 '(("--select" :fun guix-read-refresh-subset
)
244 ("--key-server" :char ?S
)))
246 (guix-command-define-argument-improver
247 guix-command-improve-size-argument
248 '(("--map-file" :fun guix-read-file-name
)))
250 (guix-command-define-argument-improver
251 guix-command-improve-system-argument
252 '(("disk-image" :char ?D
)
253 ("vm-image" :char ?V
)
254 ("--on-error" :char ?E
)
255 ("--no-grub" :char ?g
)
256 ("--full-boot" :char ?b
)))
258 (defvar guix-command-argument-improvers
260 guix-command-improve-action-argument
)
262 guix-command-improve-common-build-argument
263 guix-command-improve-target-argument
264 guix-command-improve-system-type-argument
265 guix-command-improve-archive-argument
)
267 guix-command-improve-common-build-argument
268 guix-command-improve-target-argument
269 guix-command-improve-system-type-argument
270 guix-command-improve-build-argument
)
272 guix-command-improve-hash-argument
)
274 guix-command-improve-hash-argument
)
276 guix-command-improve-common-build-argument
277 guix-command-improve-search-paths-argument
278 guix-command-improve-system-type-argument
279 guix-command-improve-environment-argument
)
281 guix-command-improve-gc-argument
)
283 guix-command-improve-graph-argument
)
285 guix-command-improve-import-argument
)
287 guix-command-improve-key-policy-argument
)
289 guix-command-improve-import-elpa-argument
)
291 guix-command-improve-lint-argument
)
293 guix-command-improve-common-build-argument
294 guix-command-improve-search-paths-argument
295 guix-command-improve-package-argument
)
297 guix-command-improve-key-policy-argument
298 guix-command-improve-refresh-argument
)
300 guix-command-improve-system-type-argument
301 guix-command-improve-substitute-urls-argument
302 guix-command-improve-size-argument
)
304 guix-command-improve-common-build-argument
305 guix-command-improve-system-argument
))
306 "Alist of guix commands and argument improvers for them.")
308 (defun guix-command-improve-argument (argument improvers
)
309 "Return ARGUMENT modified with IMPROVERS."
310 (or (cl-some (lambda (improver)
311 (funcall improver argument
))
315 (defun guix-command-improve-arguments (arguments commands
)
316 "Return ARGUMENTS for 'guix COMMANDS ...' modified for popup interface."
317 (let ((improvers (cons 'guix-command-improve-common-argument
318 (guix-assoc-value guix-command-argument-improvers
320 (mapcar (lambda (argument)
321 (guix-command-improve-argument argument improvers
))
324 (defun guix-command-parse-arguments (&optional commands
)
325 "Return a list of parsed 'guix COMMANDS ...' arguments."
327 (insert (guix-help-string commands
))
329 (guix-while-search guix-help-parse-option-regexp
330 (let* ((short (match-string-no-properties 1))
331 (name (match-string-no-properties 2))
332 (arg (match-string-no-properties 3))
333 (doc (match-string-no-properties 4))
335 (elt short
1) ; short option letter
336 (elt name
2))) ; first letter of the long option
337 ;; If "--foo=bar" or "--foo[=bar]" then it is 'option'.
338 (option?
(not (string= "" arg
)))
339 ;; If "--foo" or "--foo[=bar]" then it is 'switch'.
340 (switch?
(or (string= "" arg
)
341 (eq ?\
[ (elt arg
0)))))
342 (push (guix-command-make-argument
349 (guix-while-search guix-help-parse-command-regexp
350 (let* ((name (match-string-no-properties 1))
352 (push (guix-command-make-argument
355 :fun
(guix-command-action-name commands name
)
360 (defun guix-command-rest-argument (&optional commands
)
361 "Return '--' argument for COMMANDS."
362 (cl-flet ((argument (&rest args
)
363 (apply #'guix-command-make-argument
364 :name
"-- " :char ?
= :option? t args
)))
365 (let ((command (car commands
)))
367 ((member command
'("archive" "build" "graph" "edit"
368 "environment" "lint" "refresh"))
369 (argument :doc
"Packages" :fun
'guix-read-package-names-string
))
370 ((string= command
"download")
371 (argument :doc
"URL"))
372 ((string= command
"gc")
373 (argument :doc
"Paths" :fun
'guix-read-file-name
))
374 ((member command
'("hash" "system"))
375 (argument :doc
"File" :fun
'guix-read-file-name
))
376 ((string= command
"size")
377 (argument :doc
"Package" :fun
'guix-read-package-name
))
378 ((equal commands
'("import" "nix"))
379 (argument :doc
"Nixpkgs Attribute"))
380 ;; Other 'guix import' subcommands, but not 'import' itself.
382 (string= command
"import"))
383 (argument :doc
"Package name"))))))
385 (defun guix-command-additional-arguments (&optional commands
)
386 "Return additional arguments for COMMANDS."
387 (let ((rest-arg (guix-command-rest-argument commands
)))
388 (and rest-arg
(list rest-arg
))))
390 ;; Ideally only `guix-command-arguments' function should exist with the
391 ;; contents of `guix-command-all-arguments', but we need to make a
392 ;; special case for `guix-command-complex-with-shared-arguments' commands.
394 (defun guix-command-all-arguments (&optional commands
)
395 "Return list of all arguments for 'guix COMMANDS ...'."
396 (let ((parsed (guix-command-parse-arguments commands
)))
397 (append (guix-command-improve-arguments parsed commands
)
398 (guix-command-additional-arguments commands
))))
400 (guix-memoized-defalias guix-command-all-arguments-memoize
401 guix-command-all-arguments
)
403 (defun guix-command-arguments (&optional commands
)
404 "Return list of arguments for 'guix COMMANDS ...'."
405 (let ((command (car commands
)))
407 guix-command-complex-with-shared-arguments
)
408 ;; Take actions only for 'guix system', and switches+options for
409 ;; 'guix system foo'.
410 (funcall (if (null (cdr commands
))
413 #'guix-command-argument-action?
414 (guix-command-all-arguments-memoize (list command
)))
415 (guix-command-all-arguments commands
))))
417 (defun guix-command-switch->popup-switch
(switch)
418 "Return popup switch from command SWITCH argument."
419 (list (guix-command-argument-char switch
)
420 (or (guix-command-argument-doc switch
)
422 (guix-command-argument-name switch
)))
424 (defun guix-command-option->popup-option
(option)
425 "Return popup option from command OPTION argument."
426 (list (guix-command-argument-char option
)
427 (or (guix-command-argument-doc option
)
429 (let ((name (guix-command-argument-name option
)))
430 (if (string-match-p " \\'" name
) ; ends with space
433 (or (guix-command-argument-fun option
)
434 'read-from-minibuffer
)))
436 (defun guix-command-action->popup-action
(action)
437 "Return popup action from command ACTION argument."
438 (list (guix-command-argument-char action
)
439 (or (guix-command-argument-doc action
)
440 (guix-command-argument-name action
)
442 (guix-command-argument-fun action
)))
444 (defun guix-command-sort-arguments (arguments)
445 "Sort ARGUMENTS by name in alphabetical order."
448 (let ((name1 (guix-command-argument-name a1
))
449 (name2 (guix-command-argument-name a2
)))
450 (cond ((null name1
) nil
)
452 (t (string< name1 name2
)))))))
454 (defun guix-command-switches (arguments)
455 "Return switches from ARGUMENTS."
456 (cl-remove-if-not #'guix-command-argument-switch? arguments
))
458 (defun guix-command-options (arguments)
459 "Return options from ARGUMENTS."
460 (cl-remove-if-not #'guix-command-argument-option? arguments
))
462 (defun guix-command-actions (arguments)
463 "Return actions from ARGUMENTS."
464 (cl-remove-if-not #'guix-command-argument-action? arguments
))
466 (defun guix-command-post-process-args (args)
467 "Adjust appropriately command line ARGS returned from popup command."
468 ;; XXX We need to split "--install foo bar" and similar strings into
469 ;; lists of strings. But some commands (e.g., 'guix hash') accept a
470 ;; file name as the 'rest' argument, and as file names may contain
471 ;; spaces, splitting by spaces will break such names. For example, the
472 ;; following argument: "-- /tmp/file with spaces" will be transformed
473 ;; into the following list: ("--" "/tmp/file" "with" "spaces") instead
474 ;; of the wished ("--" "/tmp/file with spaces").
477 (or "-- " "--install " "--remove ")))
478 (args (mapcar (lambda (arg)
479 (if (string-match-p rx arg
)
480 (progn (push (split-string arg
) rest
)
485 (apply #'append
(delq nil args
) rest
)
489 ;;; 'Execute' actions
491 (defvar guix-command-default-execute-arguments
493 (guix-command-make-argument
494 :name
"repl" :char ?r
:doc
"Run in Guix REPL")
495 (guix-command-make-argument
496 :name
"shell" :char ?s
:doc
"Run in shell")
497 (guix-command-make-argument
498 :name
"copy" :char ?c
:doc
"Copy command line"))
499 "List of default 'execute' action arguments.")
501 (defvar guix-command-additional-execute-arguments
502 (let ((graph-arg (guix-command-make-argument
503 :name
"view" :char ?v
:doc
"View graph")))
505 ,(guix-command-make-argument
506 :name
"log" :char ?l
:doc
"View build log"))
507 (("graph") ,graph-arg
)
509 ,(guix-command-make-argument
510 :name
"view" :char ?v
:doc
"View map"))
511 (("system" "dmd-graph") ,graph-arg
)
512 (("system" "extension-graph") ,graph-arg
)))
513 "Alist of guix commands and additional 'execute' action arguments.")
515 (defun guix-command-execute-arguments (commands)
516 "Return a list of 'execute' action arguments for COMMANDS."
517 (mapcar (lambda (arg)
518 (guix-command-modify-argument arg
520 :fun
(guix-command-action-name
521 commands
(guix-command-argument-name arg
))))
522 (append guix-command-default-execute-arguments
524 guix-command-additional-execute-arguments commands
))))
526 (defvar guix-command-special-executors
528 ("repl" . guix-run-environment-command-in-repl
))
530 ("repl" . guix-run-pull-command-in-repl
))
532 ("log" . guix-run-view-build-log
))
534 ("view" . guix-run-view-graph
))
536 ("view" . guix-run-view-size-map
))
537 (("system" "dmd-graph")
538 ("view" . guix-run-view-graph
))
539 (("system" "extension-graph")
540 ("view" . guix-run-view-graph
)))
541 "Alist of guix commands and alists of special executers for them.
542 See also `guix-command-default-executors'.")
544 (defvar guix-command-default-executors
545 '(("repl" . guix-run-command-in-repl
)
546 ("shell" . guix-run-command-in-shell
)
547 ("copy" . guix-copy-command-as-kill
))
548 "Alist of default executers for action names.")
550 (defun guix-command-executor (commands name
)
551 "Return function to run command line arguments for guix COMMANDS."
552 (or (guix-assoc-value guix-command-special-executors commands name
)
553 (guix-assoc-value guix-command-default-executors name
)))
555 (defun guix-run-environment-command-in-repl (args)
556 "Run 'guix ARGS ...' environment command in Guix REPL."
557 ;; As 'guix environment' usually tries to run another process, it may
558 ;; be fun but not wise to run this command in Geiser REPL.
559 (when (or (member "--dry-run" args
)
560 (member "--search-paths" args
)
562 (format "'%s' command will spawn an external process.
563 Do you really want to execute this command in Geiser REPL? "
564 (guix-command-string args
)))
565 (message "May \"M-x shell-mode\" be with you!")
567 (guix-run-command-in-repl args
)))
569 (defun guix-run-pull-command-in-repl (args)
570 "Run 'guix ARGS ...' pull command in Guix REPL.
571 Perform pull-specific actions after operation, see
572 `guix-after-pull-hook' and `guix-update-after-pull'."
574 (apply #'guix-make-guile-expression
'guix-command args
)
577 (defun guix-run-view-build-log (args)
578 "Add --log-file to ARGS, run 'guix ARGS ...' build command, and
579 open the log file(s)."
580 (let* ((args (if (member "--log-file" args
)
582 (apply #'list
(car args
) "--log-file" (cdr args
))))
583 (output (guix-command-output args
))
584 (files (split-string output
"\n" t
)))
586 (guix-find-file-or-url file
)
587 (guix-build-log-mode))))
589 (defun guix-run-view-graph (args)
590 "Run 'guix ARGS ...' graph command, make the image and open it."
591 (let* ((graph-file (guix-dot-file-name))
592 (dot-args (guix-dot-arguments graph-file
)))
593 (if (guix-eval-read (guix-make-guile-expression
594 'pipe-guix-output args dot-args
))
595 (guix-find-file graph-file
)
596 (error "Couldn't create a graph"))))
598 (defun guix-run-view-size-map (args)
599 "Run 'guix ARGS ...' size command, and open the map file."
600 (let* ((wished-map-file
601 (cl-some (lambda (arg)
602 (and (string-match "--map-file=\\(.+\\)" arg
)
603 (match-string 1 arg
)))
605 (map-file (or wished-map-file
(guix-png-file-name)))
606 (args (if wished-map-file
610 (concat "--map-file=" map-file
)
612 (guix-command-output args
)
613 (guix-find-file map-file
)))
616 ;;; Generating popups, actions, etc.
618 (defmacro guix-command-define-popup-action
(name &optional commands
)
619 "Define NAME function to generate (if needed) and run popup for COMMANDS."
620 (declare (indent 1) (debug t
))
621 (let* ((popup-fun (guix-command-symbol `(,@commands
"popup")))
622 (doc (format "Call `%s' (generate it if needed)."
624 `(defun ,name
(&optional arg
)
627 (unless (fboundp ',popup-fun
)
628 (guix-command-generate-popup ',popup-fun
',commands
))
631 (defmacro guix-command-define-execute-action
(name executor
633 "Define NAME function to execute the current action for guix COMMANDS.
634 EXECUTOR function is called with the current command line arguments."
635 (declare (indent 1) (debug t
))
636 (let* ((arguments-fun (guix-command-symbol `(,@commands
"arguments")))
637 (doc (format "Call `%s' with the current popup arguments."
639 `(defun ,name
(&rest args
)
641 (interactive (,arguments-fun
))
642 (,executor
(append ',commands
643 (guix-command-post-process-args args
))))))
645 (defun guix-command-generate-popup-actions (actions &optional commands
)
646 "Generate 'popup' commands from ACTIONS arguments for guix COMMANDS."
647 (dolist (action actions
)
648 (let ((fun (guix-command-argument-fun action
)))
649 (unless (fboundp fun
)
650 (eval `(guix-command-define-popup-action ,fun
652 (list (guix-command-argument-name action
)))))))))
654 (defun guix-command-generate-execute-actions (actions &optional commands
)
655 "Generate 'execute' commands from ACTIONS arguments for guix COMMANDS."
656 (dolist (action actions
)
657 (let ((fun (guix-command-argument-fun action
)))
658 (unless (fboundp fun
)
659 (eval `(guix-command-define-execute-action ,fun
660 ,(guix-command-executor
661 commands
(guix-command-argument-name action
))
664 (defun guix-command-generate-popup (name &optional commands
)
665 "Define NAME popup with 'guix COMMANDS ...' interface."
666 (let* ((command (car commands
))
667 (man-page (concat "guix" (and command
(concat "-" command
))))
668 (doc (format "Popup window for '%s' command."
669 (guix-concat-strings (cons "guix" commands
)
671 (args (guix-command-arguments commands
))
672 (switches (guix-command-sort-arguments
673 (guix-command-switches args
)))
674 (options (guix-command-sort-arguments
675 (guix-command-options args
)))
676 (popup-actions (guix-command-sort-arguments
677 (guix-command-actions args
)))
678 (execute-actions (unless popup-actions
679 (guix-command-execute-arguments commands
)))
680 (actions (or popup-actions execute-actions
)))
682 (guix-command-generate-popup-actions popup-actions commands
)
683 (guix-command-generate-execute-actions execute-actions commands
))
685 `(guix-define-popup ,name
689 :switches
',(mapcar #'guix-command-switch-
>popup-switch switches
)
690 :options
',(mapcar #'guix-command-option-
>popup-option options
)
691 :actions
',(mapcar #'guix-command-action-
>popup-action actions
)
692 :max-action-columns
4))))
694 ;;;###autoload (autoload 'guix "guix-command" "Popup window for 'guix'." t)
695 (guix-command-define-popup-action guix
)
697 (defalias 'guix-edit-action
#'guix-edit
)
700 (defvar guix-command-font-lock-keywords
703 (group "guix-command-define-"
706 "argument-improver"))
710 (group (one-or-more (or (syntax word
) (syntax symbol
))))))
711 (1 font-lock-keyword-face
)
712 (2 font-lock-function-name-face nil t
)))))
714 (font-lock-add-keywords 'emacs-lisp-mode guix-command-font-lock-keywords
)
716 (provide 'guix-command
)
718 ;;; guix-command.el ends here