* 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-info.el (guix-package-info-fill-heading): New variable.
(guix-package-info-insert-heading): Fill heading if needed.
Co-authored-by: Alex Kost <alezost@gmail.com>
* 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-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.