* emacs/guix-config.el.in (guix-emacs-interface-directory,
guix-state-directory): Rename to ...
(guix-config-emacs-interface-directory, guix-config-state-directory):
...this.
(guix-config-guile-program): New constant.
(guix-guile-program): Move to ...
* emacs/guix-external.el (guix-guile-program): ...here. Make it a
'defcustom'.
* emacs/guix-profiles.el (guix-default-profile): Use
'guix-config-state-directory'.
* emacs/guix-backend.el (guix-load-path): Use
'guix-config-emacs-interface-directory'.
* emacs/guix-backend.el (guix-make-guile-expression): Move to...
* emacs/guix-guile.el: ... here. New file.
* emacs/guix-base.el: Use it.
* emacs/guix-command.el: Use it.
* emacs.am (ELFILES): Add it.
Fixes <http://bugs.gnu.org/21127>.
* emacs/guix-backend.el: Use guix-config.
(guix-guile-program): Move to ...
* emacs/guix-config.el.in (guix-guile-program): ... here. Use Guile
program file name from compile-time instead of depending on PATH.
* emacs/guix-backend.el (guix-start-process-maybe): Add 'start-msg' and
'end-msg' optional arguments.
(guix-start-repl-maybe): Likewise. Do not kill buffer with a dead process.
(guix-repl-exit): New procedure.
(guix-eval-in-repl): Use 'geiser-repl--send'.
* emacs/guix-backend.el (guix-repl-operation-type): New variable.
(guix-repl-output-filter): Run type hooks after performing an operation.
(guix-eval-read): Add 'operation-type' argument.
* emacs/guix-backend.el (guix-before-repl-operation-hook,
guix-after-repl-operation-hook, guix-repl-operation-p): New variables.
(guix-repl-operation-success-message, guix-repl-output-filter): New
procedures.
(guix-start-repl): Adjust for using 'guix-repl-output-filter'.
(guix-eval-in-repl): Honor 'guix-before-repl-operation-hook'.
* configure.ac (emacsuidir): New variable.
(AC_CONFIG_FILES): Add 'emacs/guix-init.el', 'emacs/guix-helper.scm'.
* Makefile.am: Include 'emacs.am'.
* emacs.am: New file.
* doc/emacs.texi: New file.
* doc/guix.texi: Include 'emacs.texi'.
* emacs/guix-backend.el: New file.
* emacs/guix-base.el: New file.
* emacs/guix-helper.scm.in: New file.
* emacs/guix-history.el: New file.
* emacs/guix-info.el: New file.
* emacs/guix-init.el.in: New file.
* emacs/guix-list.el: New file.
* emacs/guix-main.scm: New file.
* emacs/guix-utils.el: New file.
* emacs/guix.el: New file.