emacs: config: Use "emacs-config-" prefix for constants.

* 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'.
This commit is contained in:
Alex Kost 2015-10-16 20:48:24 +03:00
parent 51805219a5
commit 380566157d
4 changed files with 18 additions and 12 deletions

View File

@ -56,9 +56,10 @@
(require 'geiser-guile) (require 'geiser-guile)
(require 'guix-geiser) (require 'guix-geiser)
(require 'guix-config) (require 'guix-config)
(require 'guix-external)
(require 'guix-emacs) (require 'guix-emacs)
(defvar guix-load-path guix-emacs-interface-directory (defvar guix-load-path guix-config-emacs-interface-directory
"Directory with scheme files for \"guix.el\" package.") "Directory with scheme files for \"guix.el\" package.")
(defvar guix-helper-file (defvar guix-helper-file

View File

@ -20,21 +20,15 @@
;;; Code: ;;; Code:
(defconst guix-emacs-interface-directory (defconst guix-config-emacs-interface-directory
(replace-regexp-in-string "${prefix}" "@prefix@" "@emacsuidir@")) (replace-regexp-in-string "${prefix}" "@prefix@" "@emacsuidir@"))
(defconst guix-state-directory (defconst guix-config-state-directory
;; This must match `NIX_STATE_DIR' as defined in `daemon.am'. ;; This must match `NIX_STATE_DIR' as defined in `daemon.am'.
(or (getenv "NIX_STATE_DIR") "@guix_localstatedir@/guix")) (or (getenv "NIX_STATE_DIR") "@guix_localstatedir@/guix"))
(defvar guix-guile-program "@GUILE@" (defconst guix-config-guile-program "@GUILE@"
"Name of the guile executable used for Guix REPL. "Name of the 'guile' executable defined at configure time.")
May be either a string (the name of the executable) or a list of
strings of the form:
(NAME . ARGS)
Where ARGS is a list of arguments to the guile program.")
(defconst guix-config-dot-program "@DOT_USER_PROGRAM@" (defconst guix-config-dot-program "@DOT_USER_PROGRAM@"
"Name of the 'dot' executable defined at configure time.") "Name of the 'dot' executable defined at configure time.")

View File

@ -29,6 +29,17 @@
"Settings for external programs." "Settings for external programs."
:group 'guix) :group 'guix)
(defcustom guix-guile-program guix-config-guile-program
"Name of the 'guile' executable used for Guix REPL.
May be either a string (the name of the executable) or a list of
strings of the form:
(NAME . ARGS)
Where ARGS is a list of arguments to the guile program."
:type 'string
:group 'guix-external)
(defcustom guix-dot-program (defcustom guix-dot-program
(if (file-name-absolute-p guix-config-dot-program) (if (file-name-absolute-p guix-config-dot-program)
guix-config-dot-program guix-config-dot-program

View File

@ -26,7 +26,7 @@
"User profile.") "User profile.")
(defvar guix-default-profile (defvar guix-default-profile
(concat guix-state-directory (concat guix-config-state-directory
"/profiles/per-user/" "/profiles/per-user/"
(getenv "USER") (getenv "USER")
"/guix-profile") "/guix-profile")