* guix/gexp.scm (<gexp>)[modules]: New field.
(gexp-modules): New procedure.
(gexp->derivation): Use it and append the result to %MODULES.
Update docstring to mark #:modules as deprecated.
(current-imported-modules, with-imported-modules): New macros.
(gexp): Pass CURRENT-IMPORTED-MODULES as second argument to 'gexp'.
(gexp->script): Use and honor 'gexp-modules'; define '%modules'.
* tests/gexp.scm ("gexp->derivation & with-imported-modules")
("gexp->derivation & nested with-imported-modules")
("gexp-modules & ungexp", "gexp-modules & ungexp-splicing"):
New tests.
("program-file"): Use 'with-imported-modules'. Remove #:modules
argument to 'program-file'.
* doc/guix.texi (G-Expressions): Document 'with-imported-modules'.
Mark #:modules of 'gexp->derivation' as deprecated.
* emacs/guix-devel.el: Add syntax for 'with-imported-modules'.
(guix-devel-keywords): Add it.
* .dir-locals.el: Likewise.
* gnu/services.scm (%modify-service, modify-services): New macros.
* gnu/services/base.scm (mingetty-service-type, guix-service-type):
Export.
* emacs/guix-devel.el (guix-devel-keywords): Add 'modify-services'.
Ditto in 'guix-devel-scheme-indent' call.
* doc/guix.texi (Using the Configuration System): Give an example of
'modify-services'.
(Service Reference): Document it.
Suggested by Ludovic Courtès <ludo@gnu.org>.
* emacs/guix-devel.el: Add indentation rules for Guix macros/procedures.
(guix-devel-scheme-indent): New macro.
(guix-devel-indent-package): New function.
Suggested by Ludovic Courtès <ludo@gnu.org>.
* guix/scripts.scm (build-package-source): New procedure.
* emacs/guix-devel.el (guix-devel-build-package-source): New command.
(guix-devel-keys-map): Add key binding for it.
* doc/emacs.texi (Emacs Development): Document it.
Suggested by Ludovic Courtès <ludo@gnu.org>.
* emacs/guix-devel.el (guix-devel-setup-repl): Add a workaround for
'guix-warning-port'.
(guix-devel-lint-package): New command.
(guix-devel-keys-map): Add key binding for it.
* doc/emacs.texi (Emacs Development): Document it.
* emacs/guix-devel.el (guix-devel-with-definition): New macro.
(guix-devel-build-package-definition): Use it.
(guix-devel-emacs-font-lock-keywords): New variable.
Setting up guix ports needs to be done in Geiser REPL synchronously,
otherwise this operation may not be finished before the further
evaluating of guile code.
* emacs/guix-guile.el (guix-guile-prompt?): New function.
* emacs/guix-geiser.el (guix-geiser-eval-in-repl-synchronously): New
function.
* emacs/guix-devel.el (guix-devel-setup-repl): Use it.
* emacs/guix-guile.el (guix-guile-keyword-regexp): New function.
* emacs/guix-devel.el (guix-devel-faces): New custom group.
(guix-devel-modify-phases-keyword): New face.
(guix-devel-modify-phases-keyword-regexp,
guix-devel-font-lock-keywords): New variables.
(guix-devel-modify-phases-font-lock-matcher,
guix-devel-modify-phases-font-lock-pre): New functions.
(guix-devel-mode): Adjust to add/remove font-lock-keywords.
Suggested by Ludovic Courtès <ludo@gnu.org>.
* emacs/guix-guile.el (guix-guile-definition-regexp): New variable.
(guix-guile-current-definition, guix-guile-boolean): New functions.
* emacs/guix-devel.el: Require 'guix-base'.
(guix-devel-repl-processes): New variable.
(guix-devel-setup-repl, guix-devel-setup-repl-maybe): New functions.
(guix-devel-build-package-definition): New command.
* doc/emacs.texi (Emacs Development): Document it.
* emacs/guix-guile.el (guix-guile-current-module): New function.
* emacs/guix-devel.el: New file.
* emacs.am (ELFILES): Add it.
* doc/emacs.texi (Emacs Development): New node.
(Emacs Interface): Add it.
* doc/contributing.texi (The Perfect Setup): Mention it.
* doc/guix.texi (Top): Add it.
* emacs/guix-init.el: Add 'guix-devel-activate-mode-maybe' to
'scheme-mode-hook'.