summaryrefslogtreecommitdiff
path: root/gnu/packages/aux-files/emacs/guix-emacs.el
AgeCommit message (Expand)Author
2023-09-07gnu: guix-emacs: Reword docstrings....The current documentation strings cause compilation warnings; thus improve them. * gnu/packages/aux-files/emacs/guix-emacs.el (guix-emacs-autoload-regexp) (guix-emacs-find-autoloads, guix-emacs-autoload-packages): Make do without quoting 'autoload'. Reserve quotation to variables and functions. Liliana Marie Prikler
2023-09-07gnu: emacs: Reload subdirs.el files in ‘guix-emacs-autoload-packages’....This fixes a regression introduced with 79cfe30f3 ("build-system: emacs: Use subdirectories again.") which caused the 'guix-emacs-autoload-packages' to no longer be able to autoload all packages. * gnu/packages/aux-files/emacs/guix-emacs.el (guix-emacs-autoload-packages): Reload subdirs.el files unless NO-RELOAD is provided. Update docstring. * doc/guix.texi (Application Setup): Document that ‘guix-emacs-autoload-packages’ can be invoked interactively to auto-reload newly installed Emacs packages. * gnu/packages/emacs.scm (emacs)[arguments]<#:phases>: Call guix-emacs-autoload-packages with an argument in the site-start.el file. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> Maxim Cournoyer
2023-09-07gnu: emacs: Allow producing verbose messages when loading autoloads....* gnu/packages/aux-files/emacs/guix-emacs.el: Expound commentary. (guix-emacs-verbose): New variable. (guix-emacs--load-file-no-error): New procedure. (guix-emacs-autoload-packages): Use it. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> Maxim Cournoyer
2023-09-07gnu: emacs: Factorize a ‘guix-emacs--subdirs-files’ procedure....* gnu/packages/aux-files/emacs/guix-emacs.el (guix-emacs--subdirs-files): New procedure. (guix-emacs-load-package-descriptors): Use it. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> Maxim Cournoyer
2023-09-07gnu: emacs: Use lexical binding for guix-emacs.el startup library....* gnu/packages/aux-files/emacs/guix-emacs.el: Declare LEXCICAL-BINDING file variable to true. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> Maxim Cournoyer
2023-02-11gnu: emacs: Add TREE_SITTER_GRAMMAR_PATH support....gnu/packages/emacs.scm (emacs)[native-search-paths]: Add a search-path for tree-sitter grammars. gnu/packages/aux-files/emacs/guix-emacs.el: Add directories from TREE_SITTER_GRAMMAR_PATH to treesit-extra-load-path. Andrew Tropin
2022-08-03gnu: emacs: Suppress loading messages for guix emacs packages....* gnu/packages/aux-files/emacs/guix-emacs.el (guix-emacs-autoload-packages): Pass NOMESSAGE as t for 'load'. Signed-off-by: 宋文武 <iyzsong@member.fsf.org> André A. Gomes
2021-12-03gnu: emacs: Load package descriptors from packages referenced by subdirs.el...* gnu/packages/aux-files/emacs/guix-emacs.el (guix-emacs--non-core-load-path): New procedure. (guix-emacs-autoload-packages): Use it here. (guix-emacs-load-package-descriptors): New procedure. * gnu/packages/emacs.scm (emacs)[install-site-start]: Install advice to run ‘guix-emacs-load-package-descriptors’. Liliana Marie Prikler
2020-03-22gnu: emacs: Remove obsolete FIXME comment....* gnu/packages/aux-files/emacs/guix-emacs.el: Remove comment. Maxim Cournoyer
2020-02-27emacs-build-system: Byte compile the autoload files....* guix/build/emacs-build-system.scm (enable-autoloads-compilation) (validate-compiled-autoloads): Add procedures. (%standard-phases): Register the new procedures. * gnu/packages/aux-files/emacs/guix-emacs.el (guix-emacs-find-autoloads): Remove duplicates in the list of autoload files found. * guix/build/emacs-utils.scm (expr->string): Add procedure. (emacs-batch-eval, emacs-batch-edit-file): Use it. Maxim Cournoyer
2019-12-04gnu: emacs: Use load-path instead of EMACSLOADPATH....This enables the use of the subdirs.el feature of Emacs, where specifying a directory in EMACSLOADPATH translates into a `load-path' variable containing the directory and all its sub-directories. * gnu/packages/aux-files/emacs/guix-emacs.el (guix-emacs-autoload-packages): Use `load-path' directly instead of parsing EMACSLOADPATH. Reported-by: Leo Prikler <leo.prikler@student.tugraz.at> Signed-off-by: Clément Lassieur <clement@lassieur.org> Maxim Cournoyer
2019-12-04gnu: emacs: Fix guix-emacs.el indentation....* gnu/packages/aux-files/emacs/guix-emacs.el: Fix indentation. Signed-off-by: Clément Lassieur <clement@lassieur.org> Maxim Cournoyer
2019-11-18gnu: emacs: Adapt the autoloads auxiliary code to use EMACSLOADPATH....The Elisp directories to scan for autoloads are now taken from EMACSLOADPATH instead of from the user profile, environment profile or system profile. Manually adding the Elisp directories to the `load-path' is no longer necessary, as this is covered by Emacs when they are in EMACSLOADPATH. The caching logic is also removed, as this code is not typically run often and the gain is marginal (loading autoloads files is cheap). * gnu/packages/aux-files/emacs/guix-emacs.el (guix-emacs-directory) (guix-emacs-subdirs, guix-emacs-directories): Remove procedures. (guix-emacs-find-autoloads): Filter the directory entries by passing the regexp to `directory-files' directly, which is ten times faster. Remove deduplication. (guix-emacs-autoloads-regexp): Remove the group, which used to filter out the file extension; it no longer works this way due to passing the regexp to the `directory-files' procedure directly, which doesn't care about groups. (guix-emacs-autoload-packages): Update doc. Search package directories from EMACSLOADPATH. Do not populate the load-path. Remove cache. Maxim Cournoyer
2017-07-29gnu: emacs: Check GUIX_ENVIRONMENT when autoloading packages....Check the environment profile so that we autoload packages that are given as arguments to "guix environment" but are not in the system or user profile. Note that the union of Emacs packages in the system, user, and environment profiles will be autoloaded even when --pure was passed to "guix environment", because it's not clear how to detect that --pure was given. * gnu/packages/aux-files/emacs/guix-emacs.el (guix-emacs-autoload-packages): Add Emacs packages from GUIX_ENVIRONMENT profile. Signed-off-by: Alex Kost <alezost@gmail.com> Kyle Meyer
2017-02-27gnu: emacs: Simplify "guix-emacs.el"....* gnu/packages/aux-files/emacs/guix-emacs.el: Do not try to require 'guix-profiles'. Do not call 'guix-emacs-autoload-packages' in the top level. (guix-package-enable-at-startup): Remove. This variable can't be set by a user since this file is loaded before user config. (guix-emacs-autoload-packages): Use 'guix-read-package-profile' instead of 'guix-profile-prompt' in interactive clause (it was renamed in Emacs-Guix). * gnu/packages/emacs.scm (emacs)[arguments]: Call 'guix-emacs-autoload-packages' in "site-start.el" after requiring 'guix-emacs'. Alex Kost
2017-02-27gnu: emacs: Move "guix-emacs.el" to "aux-files"....* emacs/guix-emacs.el: Rename to... * gnu/packages/aux-files/emacs/guix-emacs.el: ... this. * Makefile.am (AUX_FILES): Add it. * gnu/packages/emacs.scm (emacs)[inputs]: Remove 'guix' source. [native-inputs]: Add "guix-emacs.el" auxiliary file. [arguments]: Adjust 'install-site-start' phase accordingly. Alex Kost