[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/03: emacs: config: Use "emacs-config-" prefix for constants.
From: |
Alex Kost |
Subject: |
02/03: emacs: config: Use "emacs-config-" prefix for constants. |
Date: |
Tue, 20 Oct 2015 14:06:11 +0000 |
alezost pushed a commit to branch master
in repository guix.
commit 380566157de6b0f3ec952c768fac5baafac602f0
Author: Alex Kost <address@hidden>
Date: Fri Oct 16 20:48:24 2015 +0300
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'.
---
emacs/guix-backend.el | 3 ++-
emacs/guix-config.el.in | 14 ++++----------
emacs/guix-external.el | 11 +++++++++++
emacs/guix-profiles.el | 2 +-
4 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/emacs/guix-backend.el b/emacs/guix-backend.el
index 412d648..e7c158b 100644
--- a/emacs/guix-backend.el
+++ b/emacs/guix-backend.el
@@ -56,9 +56,10 @@
(require 'geiser-guile)
(require 'guix-geiser)
(require 'guix-config)
+(require 'guix-external)
(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.")
(defvar guix-helper-file
diff --git a/emacs/guix-config.el.in b/emacs/guix-config.el.in
index c7affb8..bd82159 100644
--- a/emacs/guix-config.el.in
+++ b/emacs/guix-config.el.in
@@ -20,21 +20,15 @@
;;; Code:
-(defconst guix-emacs-interface-directory
+(defconst guix-config-emacs-interface-directory
(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'.
(or (getenv "NIX_STATE_DIR") "@guix_localstatedir@/guix"))
-(defvar guix-guile-program "@GUILE@"
- "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.")
+(defconst guix-config-guile-program "@GUILE@"
+ "Name of the 'guile' executable defined at configure time.")
(defconst guix-config-dot-program "@DOT_USER_PROGRAM@"
"Name of the 'dot' executable defined at configure time.")
diff --git a/emacs/guix-external.el b/emacs/guix-external.el
index cf4bd26..c80b363 100644
--- a/emacs/guix-external.el
+++ b/emacs/guix-external.el
@@ -29,6 +29,17 @@
"Settings for external programs."
: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
(if (file-name-absolute-p guix-config-dot-program)
guix-config-dot-program
diff --git a/emacs/guix-profiles.el b/emacs/guix-profiles.el
index 1a41745..2c19368 100644
--- a/emacs/guix-profiles.el
+++ b/emacs/guix-profiles.el
@@ -26,7 +26,7 @@
"User profile.")
(defvar guix-default-profile
- (concat guix-state-directory
+ (concat guix-config-state-directory
"/profiles/per-user/"
(getenv "USER")
"/guix-profile")