From: Alex Kost <alezost@gmail.com>
To: Mathieu Lirzin <mthl@openmailbox.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 3/4] emacs: Move guix-guile-program to 'guix-config'.
Date: Wed, 29 Jul 2015 11:36:27 +0300 [thread overview]
Message-ID: <87oaivl5ro.fsf@gmail.com> (raw)
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")
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.
next prev parent reply other threads:[~2015-07-29 8:36 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-27 21:48 [PATCH 0/4] Emacs Interface build system Mathieu Lirzin
2015-07-27 21:48 ` [PATCH 1/4] build: Add more variables to (guix config) Mathieu Lirzin
2015-07-29 8:35 ` Alex Kost
2015-08-06 17:38 ` Mathieu Lirzin
2015-08-18 15:15 ` Ludovic Courtès
2015-08-25 21:14 ` Mathieu Lirzin
2015-07-27 21:48 ` [PATCH 2/4] build: Produce 'guix-config' instead of using compile-time tricks Mathieu Lirzin
2015-07-27 21:56 ` Mathieu Lirzin
2015-07-29 8:35 ` Alex Kost
2015-08-06 17:50 ` Mathieu Lirzin
2015-08-13 8:04 ` Alex Kost
2015-08-25 21:16 ` Mathieu Lirzin
2015-08-26 10:51 ` Alex Kost
2015-08-30 17:55 ` Mathieu Lirzin
2015-08-30 19:03 ` Alex Kost
2015-07-27 21:48 ` [PATCH 3/4] emacs: Move guix-guile-program to 'guix-config' Mathieu Lirzin
2015-07-29 8:36 ` Alex Kost [this message]
2015-08-06 17:55 ` Mathieu Lirzin
2015-08-07 7:21 ` Alex Kost
2015-08-25 21:18 ` Mathieu Lirzin
2015-08-30 17:32 ` Ludovic Courtès
2015-08-30 19:03 ` Alex Kost
2015-08-30 20:54 ` Mathieu Lirzin
2015-07-27 21:48 ` [PATCH 4/4] emacs: Use only one guix-load-path variable Mathieu Lirzin
2015-07-29 8:36 ` Alex Kost
2015-08-06 17:58 ` Mathieu Lirzin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87oaivl5ro.fsf@gmail.com \
--to=alezost@gmail.com \
--cc=guix-devel@gnu.org \
--cc=mthl@openmailbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.