* emacs/guix-base.el (guix-pull): Handle prefix argument when it is run
interactively. Use 'guix-command' instead of 'guix-pull' to prevent
REPL exit if 'leave' happens.
* emacs/guix-base.el (guix-apply-manifest): Use 'guix-command' instead
of 'guix-package' to prevent REPL exit if 'leave' happens. Expand
profile and manifest file names, as relative file names lead to an
error.
This is a followup to commit 06d45f4566.
* emacs/guix-base.el (guix-switch-to-generation): Replace
'switch-to-generation' with 'switch-to-generation*'.
* 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.
* emacs/guix-main.scm (output+error): New procedure.
(guix-command-output): Use it.
* emacs/guix-base.el (guix-command-output): Display error output in the
minibuffer.
* emacs/guix.el (guix-faces): New custom group.
* emacs/guix-base.el (guix-operation-option-key): Use it.
(guix-define-buffer-type): Generate faces group.
* emacs/guix-info.el: Adjust faces to use new groups.
(guix-info-faces): New custom group.
* emacs/guix-list.el: Likewise
(guix-list-faces): New custom group.
* emacs/guix-base.el (guix-package-location): New function.
(guix-edit-package): Rename and move to ...
* emacs/guix.el (guix-edit): ...here. Make it interactive.
* emacs/guix-command.el (guix-edit-action): New function (alias to
'guix-edit') to override the popup for edit command in "M-x guix".
* emacs/guix-list.el (guix-list-edit-package): Adjust for 'guix-edit'
renaming.
* emacs/guix-main.scm (package-location-string): Allow to accept package
id or package name as argument.
* emacs/guix-main.scm: Use (guix scripts lint) module.
(lint-checker-names): New procedure.
* emacs/guix-base.el (guix-lint-checker-names): New function.
* emacs/guix-utils.el (guix-concat-strings): New function.
* emacs/guix-pcomplete.el (guix-pcomplete-short-options): Use it.
* emacs/guix-base.el (guix-get-package-strings): Likewise.
* emacs/guix-base.el (guix-define-buffer-type): Move common key bindings
from here...
(guix-root-map): ... to here. New variable.
* emacs/guix-info.el (guix-info-mode-map): Use it.
* emacs/guix-list.el (guix-list-mode-map): Use it.
* doc/emacs.texi (Emacs Keymaps): Document it.
* emacs/guix-base.el (guix-list-or-info-buffer-p): Delete. Replace with...
(guix-buffer-p): ... this. New procedure.
(guix-buffers): Use it. Add 'modes' argument.
(guix-update-buffer): New procedure.
(guix-update-buffers-maybe): Rename to ...
(guix-update-buffers-maybe-after-operation): this. Use
'guix-update-buffer'.
* emacs/guix-base.el (guix-entry-to-specification,
guix-entries-to-specifications): New procedures.
(guix-revert-buffer): Search by name if searching by ID gives no results.
* emacs/guix-base.el (guix-switch-to-generation): New procedure.
* emacs/guix-info.el (guix-generation-info-insert-current): Insert button for
switching to generation.
* emacs/guix-list.el (guix-generation-list-switch): New procedure.
* doc/emacs.texi (emacs List buffer, emacs Info buffer): Document switching
generations.
* doc/emacs.texi (emacs List buffer): Mention new key bindings.
* emacs/guix-base.el (guix-delete-generations): New procedure.
* emacs/guix-info.el (guix-generation-info-insert-number): Use it.
* emacs/guix-list.el (guix-generation-list-mark-delete,
guix-generation-list-execute): New procedures.
* emacs/guix-main.scm (delete-generations*): New procedure.
Avoid breaking highlighting after adding new font-lock keywords.
* emacs/guix-base.el (guix-insert-package-strings): Use 'propertize' instead
of 'guix-get-string'.
* emacs/guix-info.el (guix, guix-action, guix-file, guix-url,
guix-package-location, guix-package-name): New button types.
(guix-info-insert-action-button, guix-info-insert-file-path,
guix-info-insert-url, guix-package-info-insert-location,
guix-package-info-insert-full-names,
guix-package-info-insert-non-unique-text): Adjust for 'guix-insert-button'
and button types.
(guix-package-info-name-button): New face.
(guix-package-info-define-insert-inputs): Use it. Add new button types.
(guix-package-info-insert-full-name): Remove.
* emacs/guix-utils.el (guix-get-string): Replace 'face' with 'font-lock-face'.
(guix-insert-button): Adjust for using button types.
* emacs/guix-base.el: Add and use general functions instead of
specialized functions generated by 'guix-define-buffer-type' macro.
(guix-buffer-type, guix-entry-type): New variables.
(guix-set-vars): Add new variables.
(guix-get-show-entries, guix-show-entries, guix-set-buffer)
(guix-history-call, guix-make-history-item)
(guix-get-params-for-receiving, guix-revert-buffer)
(guix-redisplay-buffer): New functions.
(guix-define-buffer-type): Do not generate specialized functions.
* emacs/guix-info.el (guix-package-info-insert-full-names): Use
'guix-get-show-entries'.
(guix-generation-info-insert-number): Likewise.
* emacs/guix-list.el (guix-list-describe): New function.
(guix-list-define-entry-type): Do not generate specialized one.
(guix-generation-list-show-packages): Use 'guix-get-show-entries'.
* emacs/guix.el (guix-show-generations-function): Remove.
(guix-get-show-packages): Use new functions.
(guix-get-show-generations): Likewise.
* 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.