guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/03: build: Set DOT_USER_PROGRAM for Emacs interface.


From: Alex Kost
Subject: 01/03: build: Set DOT_USER_PROGRAM for Emacs interface.
Date: Tue, 20 Oct 2015 14:06:10 +0000

alezost pushed a commit to branch master
in repository guix.

commit 51805219a53311fc56e291b5762860062ef28446
Author: Alex Kost <address@hidden>
Date:   Fri Oct 16 20:34:32 2015 +0300

    build: Set DOT_USER_PROGRAM for Emacs interface.
    
    Suggested by Ludovic Courtès <address@hidden>.
    
    * configure.ac: Set DOT_USER_PROGRAM variable.
    * emacs/guix-config.el.in (guix-config-dot-program): New constant.
    * emacs/guix-external.el (guix-dot-program): Use it.
---
 configure.ac            |    1 +
 emacs/guix-config.el.in |    4 ++++
 emacs/guix-external.el  |    7 ++++++-
 3 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index bb3d947..00e7c7b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -206,6 +206,7 @@ AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env])
 AC_CONFIG_FILES([test-env],     [chmod +x test-env])
 
 dnl Emacs interface.
+AC_PATH_PROG([DOT_USER_PROGRAM], [dot], [dot])
 AM_PATH_LISPDIR
 AM_CONDITIONAL([HAVE_EMACS], [test "x$EMACS" != "xno"])
 
diff --git a/emacs/guix-config.el.in b/emacs/guix-config.el.in
index 16434ce..c7affb8 100644
--- a/emacs/guix-config.el.in
+++ b/emacs/guix-config.el.in
@@ -1,6 +1,7 @@
 ;;; guix-config.el --- Compile-time configuration of Guix.
 
 ;; Copyright © 2015 Mathieu Lirzin <address@hidden>
+;; Copyright © 2015 Alex Kost <address@hidden>
 
 ;; This file is part of GNU Guix.
 
@@ -35,6 +36,9 @@ strings of the form:
 
 Where ARGS is a list of arguments to the guile program.")
 
+(defconst guix-config-dot-program "@DOT_USER_PROGRAM@"
+  "Name of the 'dot' executable defined at configure time.")
+
 (provide 'guix-config)
 
 ;;; guix-config.el ends here
diff --git a/emacs/guix-external.el b/emacs/guix-external.el
index 580676e..cf4bd26 100644
--- a/emacs/guix-external.el
+++ b/emacs/guix-external.el
@@ -23,11 +23,16 @@
 
 ;;; Code:
 
+(require 'guix-config)
+
 (defgroup guix-external nil
   "Settings for external programs."
   :group 'guix)
 
-(defcustom guix-dot-program (executable-find "dot")
+(defcustom guix-dot-program
+  (if (file-name-absolute-p guix-config-dot-program)
+      guix-config-dot-program
+    (executable-find "dot"))
   "Name of the 'dot' executable."
   :type 'string
   :group 'guix-external)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]