diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-11-20 21:31:51 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-11-20 21:31:51 -0800 |
commit | d613cde8a2579f8e40248dc3839c39c89de4009e (patch) | |
tree | 4b1e25ae19d7ea812aaa0cef465d9a332ee9a30b /txr.1 | |
parent | 2c679f9bd0abcd8412b9162c74a58ba1eace3ed5 (diff) | |
download | txr-d613cde8a2579f8e40248dc3839c39c89de4009e.tar.gz txr-d613cde8a2579f8e40248dc3839c39c89de4009e.tar.bz2 txr-d613cde8a2579f8e40248dc3839c39c89de4009e.zip |
Revive -b option for binding Lisp variables.
* txr.c (txr_main): Implement -b option that takes an
argument. Ensure that -b produces an error if clumped with
other options.
* txr.1: Documented -b var=val.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 30 |
1 files changed, 24 insertions, 6 deletions
@@ -482,12 +482,30 @@ of this function. Verbose operation. Detailed logging is enabled. .coIP -b -This is a deprecated option, which is silently ignored. In \*(TX versions -prior to 90, the printing of variable bindings (see -.code -B -option) was -implicit behavior which was automatically suppressed in certain situations. -The -b option suppressed it unconditionally. +This option binds a Lisp global lexical variable (as if by the +.code defparml +function) to an object described by Lisp syntax. It requires an argument +of the form +.meta sym=value +where +.code sym +must be, syntactically, a token denoting a bindable symbol, and +.meta value +is arbitrary \*(TL syntax. The +.meta sym +syntax is converted to the symbol it denotes, which is bound as a global +lexical variable, if it is not already a variable. +The +.meta value +syntax is parsed to the Lisp object it denotes. This object is not subject +to evaluation; the object itself is stored into the variable binding denoted +by +.metn sym . +Note that if +.meta sym +already exists as a global variable, then it is simply overwritten. If +.meta sym +is marked special, then it stays special. .coIP -B If the query is successful, print the variable bindings as a sequence |