From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: [PATCH 3/4] emacs: Move guix-guile-program to 'guix-config'. Date: Wed, 29 Jul 2015 11:36:27 +0300 Message-ID: <87oaivl5ro.fsf@gmail.com> References: <1438033720-30958-1-git-send-email-mthl@openmailbox.org> <1438033720-30958-4-git-send-email-mthl@openmailbox.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54089) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKMqp-0004JT-Ec for guix-devel@gnu.org; Wed, 29 Jul 2015 04:36:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZKMqk-0008C2-8n for guix-devel@gnu.org; Wed, 29 Jul 2015 04:36:35 -0400 Received: from mail-lb0-x235.google.com ([2a00:1450:4010:c04::235]:33116) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKMqk-0008Bo-27 for guix-devel@gnu.org; Wed, 29 Jul 2015 04:36:30 -0400 Received: by lbbyj8 with SMTP id yj8so2149366lbb.0 for ; Wed, 29 Jul 2015 01:36:29 -0700 (PDT) In-Reply-To: <1438033720-30958-4-git-send-email-mthl@openmailbox.org> (Mathieu Lirzin's message of "Mon, 27 Jul 2015 23:48:39 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Mathieu Lirzin Cc: guix-devel@gnu.org Mathieu Lirzin (2015-07-28 00:48 +0300) wrote: [...] > diff --git a/emacs/guix-config.el.in b/emacs/guix-config.el.in > index 542de15..ed2e846 100644 > --- a/emacs/guix-config.el.in > +++ b/emacs/guix-config.el.in > @@ -19,6 +19,15 @@ > > ;;; Code: > > +(defconst 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.") The potential problem with 'defconst', is that it overrides the current value if it already exists. For example, evaluate the following: (setq a 1) (defconst a 2) (setq b 1) (defvar b 2) As you can see the value of 'a' is 2, while the value of 'b' is 1. So if a user sets 'guix-guile-program' before (require 'guix-init), the final value will be what is defined by 'defconst', not what is set by a user. That's why I think it is better to use 'defvar' for 'guix-guile-program'. -- Alex, who hates 'defconst's and 'defsubst's.