summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-02-15 08:01:30 -0800
committerKaz Kylheku <kaz@kylheku.com>2019-02-15 08:01:30 -0800
commit068f93723d37b441234e2315d6c168aeb2854540 (patch)
tree91c51ee31b9b6e4d38c5584c05e49cfafdcd688e
parentfd7012085f0fcd2ccf6e33be3e295b2a29dbd9d2 (diff)
downloadtxr-068f93723d37b441234e2315d6c168aeb2854540.tar.gz
txr-068f93723d37b441234e2315d6c168aeb2854540.tar.bz2
txr-068f93723d37b441234e2315d6c168aeb2854540.zip
txr-exe-path: New variable.
* txr.c (sysroot_init): Make prog_path available via the txr-exe-path variable. The txr-path variable becomes obsolescent. * txr.1: Documented txr-exe-path; removed documentation for txr-path.
-rw-r--r--txr.17
-rw-r--r--txr.c1
2 files changed, 4 insertions, 4 deletions
diff --git a/txr.1 b/txr.1
index 65daf6fa..3922a757 100644
--- a/txr.1
+++ b/txr.1
@@ -56923,11 +56923,10 @@ parsing and processing of a loaded \*(TX source file.
Also, during the processing of the profile file (see Interactive Profile File),
the variable is bound to the name of that file.
-.coNP Variable @ txr-path
+.coNP Variable @ txr-exe-path
.desc
-This variable holds the absolute path name of the directory which
-holds the executable file of the current process. This path includes
-the trailing slash.
+This variable holds the absolute path name of the executable file
+of the running \*(TX instance.
.SS* Function Tracing
diff --git a/txr.c b/txr.c
index be77ca1c..46d0f63e 100644
--- a/txr.c
+++ b/txr.c
@@ -318,6 +318,7 @@ static void sysroot_init(void)
reg_varl(intern(lit("txr-version"), user_package),
toint(lit(TXR_VER), nil));
reg_varl(intern(lit("txr-path"), user_package), prog_dir);
+ reg_varl(intern(lit("txr-exe-path"), user_package), prog_path);
}
static void sysroot_compat_fixup(int compat_ver)