aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/sciteco.1.in24
-rw-r--r--doc/sciteco.7.template51
2 files changed, 59 insertions, 16 deletions
diff --git a/doc/sciteco.1.in b/doc/sciteco.1.in
index 0f091db..ef49579 100644
--- a/doc/sciteco.1.in
+++ b/doc/sciteco.1.in
@@ -149,15 +149,27 @@ environment are inserted into the global Q-Register table.
A dollar sign is prepended before each variable name, so that for
instance the variable \(lqHOME\(rq can be examined by macros by
reading the string-content of Q-Register \(lq$HOME\(rq.
-Changes to these Q-Registers are currently not applied to
-the corresponding environment variables.
.LP
-The following environment variables are initialized with default
-values by \*(ST if they are unset:
+Changes to these environment registers are not applied to
+the process environment for technical reasons.
+Nevertheless, \*(ST will always access the environment registers
+instead of the process environment when it needs to evaluate
+an environment variable internally.
+Furthermore, when spawning subprocesses, \*(ST will export
+all Q-Registers beginning with \(lq$\(rq that do not have
+a \(lq=\(rq in their name into the subprocess environment.
+Therefore, the subset of Q-Registers whose name begins with \(lq$\(rq
+can be considered practically identical to the process environment
+and \*(ST macros can access, modify and extend the environment using
+these registers.
+.LP
+The following environment variables and registers are initialized with
+default values by \*(ST if they are unset:
.TP
.B HOME
Home directory of the current user.
-This may be used e.g. by the \fBFG\fP command.
+This may be used e.g. by the \fBFG\fP command and for
+tilde-expansions.
If unset, it defaults to the current user's home directory
as set by
.BR passwd (5)
@@ -191,7 +203,7 @@ defaults to the standard library installation path at
.
.LP
The \fBHOME\fP, \fBSCITECOCONFIG\fP and \fBSCITECOPATH\fP environment
-variables are canonicalized to absolute paths.
+variables and registers are canonicalized to absolute paths.
Therefore it is possible to define them relative to the
working directory of \*(ST when it starts up while macros
can work with the corresponding registers to locate files
diff --git a/doc/sciteco.7.template b/doc/sciteco.7.template
index db31daf..79b2eff 100644
--- a/doc/sciteco.7.template
+++ b/doc/sciteco.7.template
@@ -989,17 +989,26 @@ Macro invocations might create new local Q-Register tables for
the executed code.
\*(ST initializes the Q-Registers \(lqA\(rq to \(lqZ\(rq and
\(lq0\(rq to \(lq9\(rq in every Q-Register table.
-Furthermore \*(ST defines and initializes the following special
-global registers:
+.LP
+There are global Q-Registers with special significance for \*(ST
+because they may be accessed by commands opaquely.
+Some of these registers represent information beyond their
+textual and numeric cells \(em they overwrite default operations
+with custom side-effects in order to support unique idioms.
+Some of the registers with special significance are initialized
+by \*(ST while others must be manually defined.
+The following list is an overview of all special global registers:
.TP 2
.BR _ " (underscore)"
Search string and search condition register.
Also used by the globbing command \fBEN\fP, so it is also
the glob string and condition register.
+It is initialized automatically on startup.
.TP
.BR - " (minus)"
Replacement string register.
Its integer part is currently unused.
+It is initialized automatically on startup.
.TP
.BR * " (asterisk)"
File name (string part) and id (numeric part) of current
@@ -1026,6 +1035,7 @@ temporarily:
.EX
[* ! ...change current buffer... ! ]*
.EE
+The register is initialized automatically on startup.
.TP
.BR $ " (dollar)"
The process' current working directory (string part).
@@ -1047,14 +1057,36 @@ The \(lq$\(rq register may also be edited but changing its
string contents this way has no effect on the current
working directory.
Appending to the \(lq$\(rq register is unsupported.
+The register is initialized automatically on startup.
.TP
.BR $ " (Escape)"
Command-line replacement register.
Its integer part is unused.
+It is initialized automatically on startup.
+.TP
+.BI $ variable
+Global Q-Registers beginning with a dollar sign that
+do not contain any \(lq=\(rq represent the process environment
+(the environment variables).
+The register \(lq$\(rq does \fBnot\fP belong to the process
+environment.
+Some environment variables are initialized with default values
+if the corresponding environment variable is unset and
+some may be accessed internally by \*(ST commands.
+In other respects, the environment registers are ordinary
+non-customized registers that support all operations.
+Their numeric parts are currently unused.
+The mechanisms involved are documented more elaborately in
+.BR sciteco (1).
+.TP
+.BI ^F key
+Function key registers as documented in section
+\fBKEY TRANSLATION\fP.
+Their string-content represents a function key macro
+and their numeric part is a function key mask.
+None of those registers are automatically initialized
+on startup.
.LP
-The \*(ST runtime may access other special Q-Registers
-(e.g. function key macros), but they are not initialized by
-default.
Some commands may create and initialize new registers if
necessary, while it is an error to access undefined registers
for some other commands.
@@ -1297,9 +1329,8 @@ current working directory (as can be set e.g. via the
Nevertheless, \*(ST will function properly after changing
the working directory as \*(ST canonicalizes relative
paths to absolute paths if necessary.
-Both buffer file names and some special environment
-variables (as well as their corresponding Q-Registers)
-documented in
+Both buffer file names and some special Q-Registers
+corresponding to environment variables documented in
.BR sciteco (1)
are canonicalized in this way.
.LP
@@ -1338,7 +1369,7 @@ In \*(ST this expansion takes place \fIafter\fP processing
string building characters.
Unlike the UNIX-shell, \*(ST will only expand the \fIcurrent
user's\fP home directory using the value of the
-\(lqHOME\(rq environment variable.
+\(lq$HOME\(rq environment register.
Thus the \(lq~\fIusername\fP\(rq syntax is \fBnot\fP supported.
.LP
Last but not least, some commands accept glob patterns
@@ -1504,7 +1535,7 @@ Note that, \*(ST itself is designed not to produce non-forward-slash
separators and at least allows the user to generate forward-slashes
in portable macros.
This is not the case, for instance when working with environment
-variables.
+registers.
.TP
.IB n \(dqS
.TQ