Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the net.didierverna.clon Reference Manual, generated automatically by Declt version 3.0 "Montgomery Scott" on Tue Dec 22 12:09:02 2020 GMT+0.
• Introduction | What net.didierverna.clon is all about | |
• Systems | The systems documentation | |
• Modules | The modules documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
-*- outline -*- * Copyright (C) 2010, 2011, 2015 Didier Verna This file is part of Clon. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. * Introduction In the Lisp family of languages, one of the key components is the so-called REPL, the Read-Eval-Print Loop, which blends the runtime, compilation and development phases together, allowing for a very high level of interaction with the program. The importance of this paradigm explains why it is still rare to find "standalone" applications written in Lisp: most Lisp application clients are lispers themselves, and they prefer to live in the REPL. On the other hand, many contemporary Common Lisp compilers provide ways of creating standalone Common Lisp programs, using either shebang technology or by directly dumping executables. This process is getting easier to achieve every day. For instance, with SBCL, all it takes is one function call (save-lisp-and-die) and one command-line option to the compiler (--script). The (big) size of a Lisp image has been considered a showstopper in creating standalone applications for a long time, but nowadays, it doesn't really matter anymore (if you are not convinced, just figure out the average size of an application bundle under Mac OS X). This, along with the fact that Common Lisp compilers can generate very efficient code today, makes the perspective of standalone Common Lisp applications very tempting again. When it comes to preserving interaction with the user, one of the key components in a standalone application is the handling of the command-line. Clon is a library designed to do just that. * Overview Clon provides traditional features one might expect from a command-line options management library, but what makes it somewhat unique in its conception is that it has been designed with both the application developer and the application user in mind: many aspects of the command-line management usually imposed by the program are in fact under the control of the application user. The idea is that all Clon-enabled applications behave in a uniform way, and that it is the user who gets to decide, not the developper. The most important features of Clon are listed below. ** Command-Line Syntax Clon imposes a particular yet flexible syntax for the command-line. Options have short and/or long names, beginning with either one or two dashes. Options may take an argument. In that case, the argument may be optional or mandatory. Option names may be abbreviated and one-character options may be grouped together in a single call. There is an additional call syntax for Boolean or Boolean-based options. Finally, the command-line may have a "postfix", that is, a non-option part. ** Option Types Clon comes with a set of predefined option types, including "flags" (option without arguments), "switches" (Boolean options), simple Lisp objects, simple strings, enumerations, pathnames etc. Clon is also extensible: it is possible to define new option types, either from scratch or by subclassing an existing one. ** Value Retrieval The traditional approach to command-line analysis is to process it sequentially, and Clon lets you do that. However, Clon also provides an explicit retrieval mechanism by which you can directly request the value of a specific option, regardless of its position, or even its presence on the command-line. An option's value can be retrieved from different sources: a command-line argument, a "fallback" value (for optional arguments), a default value or an environment variable associated with the option. The retrieval process is completely automated, hence removing this burden from the developer's shoulders. ** Error Management Another cumbersome task already taken care of is error management. Clon provides two built-in error management schemes, in case something is wrong on the command-line. The simplest one is to quit the application with an informative error message. The other one is to enter an interactive dialog with the user, in which it is possible to fix the problem (correct a typo, discard an option call, provide a missing argument or value etc.). A unique feature of Clon is that the application user may choose his or her preferred error management scheme. ** Help String Contents The "help string" is typically what you expect from the output of a --help option. Maintaining an up-to-date help string is a very boring task, so Clon completely automates this for you (another burden removed from the developer's shoulders). However, the application programmer still has control over the help string's contents, notably the order in which options are displayed, and also by having the possibility of grouping options together and inserting arbitrary text in the output. ** Help String Format Clon also completely automates the help string typesetting process. For instance, it can automatically format the output for 80 columns, but it is also aware of the tty geometry and will use it when appropriate. Clon also supports help string "fontification" (or "highlighting") through ISO/IEC 6429 SGR escape sequences on tty's that support it. Another unique feature of Clon is that the exact format and highlight specification for the help string is under the control of the application user, via the notion of "theme". Clon comes with a set of predefined themes (for instance, standard, with heavy fontification, refcard for quick reference etc.) and application users can define their own. As a matter of fact, a theme not only controls the format and highlight of the help string, but also its contents.
Next: Modules, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
Next: The net․didierverna․clon․termio system, Previous: Systems, Up: Systems [Contents][Index]
Didier Verna <didier@didierverna.net>
Didier Verna <didier@didierverna.net>
BSD
The Command-Line Options Nuker
Clon is a library for command-line option management.
It is intended to ease the creation of standalone Common Lisp applications by
providing a powerful and uniform command-line option interface.
The most important features of Clon are the following.
- [from the programmer’s point of view] Centralized command-line options
specification and management, including automatic generation of help
strings, conversion from command-line / environment strings to
application-level option values, global or on-demand option retrieval, and
extensibility (the programmer can define his own option types).
- [from the end-user’s point of view] Uniform command-line option syntax
across Clon applications, customization of the help strings layout
(with optional ISO6429 coloring on terminals that support it),
possibly abbreviated option calls and short/long syntax.
net.didierverna.clon.asd (file)
Next: The net․didierverna․clon․setup/termio system, Previous: The net․didierverna․clon system, Up: Systems [Contents][Index]
Didier Verna <didier@didierverna.net>
Didier Verna <didier@didierverna.net>
BSD
The Command-Line Options Nuker, termio feature
Clon is a library for command-line option management.
The termio feature provides ISO6429 coloring on terminals that support it.
For a more complete description of Clon, see the net.didierverna.clon system.
net.didierverna.clon.termio
Next: The net․didierverna․clon․core system, Previous: The net․didierverna․clon․termio system, Up: Systems [Contents][Index]
net.didierverna.clon.setup (system)
Next: The net․didierverna․clon․setup system, Previous: The net․didierverna․clon․setup/termio system, Up: Systems [Contents][Index]
Didier Verna <didier@didierverna.net>
Didier Verna <didier@didierverna.net>
BSD
The Command-Line Options Nuker, core library
Clon is a library for command-line option management.
The core library provides the platform/feature independent part.
For a more complete description of Clon, see the net.didierverna.clon system.
Previous: The net․didierverna․clon․core system, Up: Systems [Contents][Index]
setup.lisp (file)
Modules are listed depth-first from the system components tree.
• The net.didierverna.clon.core/src module | ||
• The net.didierverna.clon.core/src/options module | ||
• The net.didierverna.clon.core/src/retrieval module | ||
• The net.didierverna.clon.core/src/output module |
Next: The net․didierverna․clon․core/src/options module, Previous: Modules, Up: Modules [Contents][Index]
meta.lisp (file)
net.didierverna.clon.core (system)
core/src/
Next: The net․didierverna․clon․core/src/retrieval module, Previous: The net․didierverna․clon․core/src module, Up: Modules [Contents][Index]
text.lisp (file)
src (module)
core/src/options/
Next: The net․didierverna․clon․core/src/output module, Previous: The net․didierverna․clon․core/src/options module, Up: Modules [Contents][Index]
options (module)
src (module)
core/src/retrieval/
Previous: The net․didierverna․clon․core/src/retrieval module, Up: Modules [Contents][Index]
src (module)
core/src/output/
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
Next: The net․didierverna․clon․termio․asd file, Previous: Lisp files, Up: Lisp files [Contents][Index]
net.didierverna.clon.asd
net.didierverna.clon (system)
Next: The net․didierverna․clon․core․asd file, Previous: The net․didierverna․clon․asd file, Up: Lisp files [Contents][Index]
termio/net.didierverna.clon.termio.asd
net.didierverna.clon.termio (system)
Next: The net․didierverna․clon․setup․asd file, Previous: The net․didierverna․clon․termio․asd file, Up: Lisp files [Contents][Index]
core/net.didierverna.clon.core.asd
net.didierverna.clon.core (system)
Next: The net․didierverna․clon․termio/sbcl/constants․lisp file, Previous: The net․didierverna․clon․core․asd file, Up: Lisp files [Contents][Index]
setup/net.didierverna.clon.setup.asd
Next: The net․didierverna․clon․termio/termio․lisp file, Previous: The net․didierverna․clon․setup․asd file, Up: Lisp files [Contents][Index]
sbcl
net.didierverna.clon.termio (system)
termio/sbcl/constants.lisp
Next: The net․didierverna․clon․core/meta․lisp file, Previous: The net․didierverna․clon․termio/sbcl/constants․lisp file, Up: Lisp files [Contents][Index]
sbcl/constants.lisp (file)
net.didierverna.clon.termio (system)
termio/termio.lisp
Next: The net․didierverna․clon․core/src/util․lisp file, Previous: The net․didierverna․clon․termio/termio․lisp file, Up: Lisp files [Contents][Index]
net.didierverna.clon.core (system)
core/meta.lisp
nickname-package (function)
Next: The net․didierverna․clon․core/src/item․lisp file, Previous: The net․didierverna․clon․core/meta․lisp file, Up: Lisp files [Contents][Index]
src (module)
core/src/util.lisp
Next: The net․didierverna․clon․core/src/text․lisp file, Previous: The net․didierverna․clon․core/src/util․lisp file, Up: Lisp files [Contents][Index]
util.lisp (file)
src (module)
core/src/item.lisp
Next: The net․didierverna․clon․core/src/options/option․lisp file, Previous: The net․didierverna․clon․core/src/item․lisp file, Up: Lisp files [Contents][Index]
item.lisp (file)
src (module)
core/src/text.lisp
make-text (function)
Next: The net․didierverna․clon․core/src/options/flag․lisp file, Previous: The net․didierverna․clon․core/src/text․lisp file, Up: Lisp files [Contents][Index]
options (module)
core/src/options/option.lisp
Next: The net․didierverna․clon․core/src/options/valued․lisp file, Previous: The net․didierverna․clon․core/src/options/option․lisp file, Up: Lisp files [Contents][Index]
option.lisp (file)
options (module)
core/src/options/flag.lisp
make-flag (function)
Next: The net․didierverna․clon․core/src/options/negatable․lisp file, Previous: The net․didierverna․clon․core/src/options/flag․lisp file, Up: Lisp files [Contents][Index]
option.lisp (file)
options (module)
core/src/options/valued.lisp
Next: The net․didierverna․clon․core/src/options/switch-base․lisp file, Previous: The net․didierverna․clon․core/src/options/valued․lisp file, Up: Lisp files [Contents][Index]
valued.lisp (file)
options (module)
core/src/options/negatable.lisp
Next: The net․didierverna․clon․core/src/options/switch․lisp file, Previous: The net․didierverna․clon․core/src/options/negatable․lisp file, Up: Lisp files [Contents][Index]
negatable.lisp (file)
options (module)
core/src/options/switch-base.lisp
Next: The net․didierverna․clon․core/src/options/stropt․lisp file, Previous: The net․didierverna․clon․core/src/options/switch-base․lisp file, Up: Lisp files [Contents][Index]
switch-base.lisp (file)
options (module)
core/src/options/switch.lisp
make-switch (function)
Next: The net․didierverna․clon․core/src/options/lispobj․lisp file, Previous: The net․didierverna․clon․core/src/options/switch․lisp file, Up: Lisp files [Contents][Index]
valued.lisp (file)
options (module)
core/src/options/stropt.lisp
make-stropt (function)
Next: The net․didierverna․clon․core/src/options/path․lisp file, Previous: The net․didierverna․clon․core/src/options/stropt․lisp file, Up: Lisp files [Contents][Index]
valued.lisp (file)
options (module)
core/src/options/lispobj.lisp
make-lispobj (function)
Next: The net․didierverna․clon․core/src/options/enum-base․lisp file, Previous: The net․didierverna․clon․core/src/options/lispobj․lisp file, Up: Lisp files [Contents][Index]
valued.lisp (file)
options (module)
core/src/options/path.lisp
make-path (function)
Next: The net․didierverna․clon․core/src/options/enum․lisp file, Previous: The net․didierverna․clon․core/src/options/path․lisp file, Up: Lisp files [Contents][Index]
options (module)
core/src/options/enum-base.lisp
Next: The net․didierverna․clon․core/src/options/xswitch․lisp file, Previous: The net․didierverna․clon․core/src/options/enum-base․lisp file, Up: Lisp files [Contents][Index]
options (module)
core/src/options/enum.lisp
make-enum (function)
Next: The net․didierverna․clon․core/src/container․lisp file, Previous: The net․didierverna․clon․core/src/options/enum․lisp file, Up: Lisp files [Contents][Index]
options (module)
core/src/options/xswitch.lisp
make-xswitch (function)
Next: The net․didierverna․clon․core/src/group․lisp file, Previous: The net․didierverna․clon․core/src/options/xswitch․lisp file, Up: Lisp files [Contents][Index]
options (module)
src (module)
core/src/container.lisp
Next: The net․didierverna․clon․core/src/retrieval/cmdline․lisp file, Previous: The net․didierverna․clon․core/src/container․lisp file, Up: Lisp files [Contents][Index]
container.lisp (file)
src (module)
core/src/group.lisp
Next: The net․didierverna․clon․core/src/retrieval/environ․lisp file, Previous: The net․didierverna․clon․core/src/group․lisp file, Up: Lisp files [Contents][Index]
retrieval (module)
core/src/retrieval/cmdline.lisp
Next: The net․didierverna․clon․core/src/synopsis․lisp file, Previous: The net․didierverna․clon․core/src/retrieval/cmdline․lisp file, Up: Lisp files [Contents][Index]
retrieval (module)
core/src/retrieval/environ.lisp
Next: The net․didierverna․clon․core/src/output/face․lisp file, Previous: The net․didierverna․clon․core/src/retrieval/environ․lisp file, Up: Lisp files [Contents][Index]
group.lisp (file)
src (module)
core/src/synopsis.lisp
Next: The net․didierverna․clon․core/src/output/sheet․lisp file, Previous: The net․didierverna․clon․core/src/synopsis․lisp file, Up: Lisp files [Contents][Index]
output (module)
core/src/output/face.lisp
Next: The net․didierverna․clon․core/src/context․lisp file, Previous: The net․didierverna․clon․core/src/output/face․lisp file, Up: Lisp files [Contents][Index]
face.lisp (file)
output (module)
core/src/output/sheet.lisp
Next: The net․didierverna․clon․setup/setup․lisp file, Previous: The net․didierverna․clon․core/src/output/sheet․lisp file, Up: Lisp files [Contents][Index]
output (module)
src (module)
core/src/context.lisp
Previous: The net․didierverna․clon․core/src/context․lisp file, Up: Lisp files [Contents][Index]
net.didierverna.clon.setup (system)
setup/setup.lisp
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The net.didierverna.clon package | ||
• The net.didierverna.clon.setup package |
Next: The net․didierverna․clon․setup package, Previous: Packages, Up: Packages [Contents][Index]
The Command-Line Options Nuker package.
meta.lisp (file)
Previous: The net․didierverna․clon package, Up: Packages [Contents][Index]
The Command-Line Options Nuker, setup.
setup.lisp (file)
common-lisp
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported special variables | ||
• Exported macros | ||
• Exported functions |
Next: Exported macros, Previous: Exported definitions, Up: Exported definitions [Contents][Index]
The current context.
context.lisp (file)
The major level of this release.
setup.lisp (file)
The minor level of this release.
setup.lisp (file)
The name of this release.
setup.lisp (file)
The status of this release.
setup.lisp (file)
The status level of this release.
setup.lisp (file)
The current synopsis.
synopsis.lisp (file)
The Clon configuration settings.
This variable contains a property list of configuration options.
Current options are:
- :swank-eval-in-emacs (Boolean)
- :restricted (Boolean)
- :dump (Boolean)
See section A.1 of the user manual for more information.
setup.lisp (file)
Next: Exported functions, Previous: Exported special variables, Up: Exported definitions [Contents][Index]
Define a new group.
KEYS are initargs to MAKE-GROUP (currently, only :header).
Each form in FORMS will be treated as a new :item.
The CAR of each form is the name of the operation to perform: TEXT, GROUP, or
an option class name. The rest are the arguments to the MAKE-<OP> function or
the DEFGROUP macro.
group.lisp (file)
Define a new synopsis.
synopsis.lisp (file)
Evaluate BODY over all command-line options in CONTEXT.
OPTION, NAME and VALUE are bound to each option’s object, name used on the
command-line and retrieved value.
context.lisp (file)
Dump a standalone executable named NAME starting with FUNCTION.
ARGS may be any arguments understood by the underlying implementation’s
dumping facility. They will simply be passed along. Note that DUMP already
passes some such arguments. Some of them are critical for the dumping facility
(e.g. :executable) and cannot be overridden. Some others, however, will be if
you provide them as well (e.g. :load-init-file).
Since executable dumping is not available in all supported implementations,
this function behaves differently in some cases, as described below.
- ECL doesn’t create executables by dumping a Lisp image, but relies on having
toplevel code to execute instead, so this macro simply expands to a call to
FUNCTION. This also means that ARGS is unused.
- ABCL can’t dump executables at all because of the underlying Java
implementation, so this macro expands to just (PROGN) but creates a Java
class file with a main function that creates an interpreter, loads
the file in which this macro call appears and calls FUNCTION. This also
means that ARGS is unused.
util.lisp (file)
Get the next command-line option in CONTEXT. and evaluate BODY. OPTION, NAME and VALUE are bound to the values returned by GETOPT-CMDLINE. BODY is executed only if there is a next command-line option.
context.lisp (file)
Execute BODY with *context* bound to CONTEXT.
context.lisp (file)
Previous: Exported macros, Up: Exported definitions [Contents][Index]
Get the current application’s command-line.
This command-line is not supposed to contain any Lisp implementation specific
option; only user-level ones. When a standalone executable is dumped, this is
always the case. When used interactively, this depends on the underlying Lisp
implementation. See appendix A.5 of the user manual for more information.
util.lisp (file)
Return T if CONTEXT has any unprocessed options left.
context.lisp (file)
Return T if CONTEXT has anything on its command-line.
context.lisp (file)
Return KEY’s value in the current Clon configuration.
setup.lisp (file)
Set KEY to VALUE in the current Clon configuration.
setup.lisp (file)
Quit the current application with STATUS.
util.lisp (file)
Get an option’s value in CONTEXT.
The option can be specified either by SHORT-NAME, LONG-NAME, or directly via
an OPTION object.
Return two values:
- the retrieved value,
- the value’s source.
context.lisp (file)
Get the next command-line option in CONTEXT.
When there is no next command-line option, return nil.
Otherwise, return four values:
- the option object,
- the option’s name used on the command-line,
- the retrieved value,
- the value source.
context.lisp (file)
Print CONTEXT’s help.
context.lisp (file)
Make a new context.
- SYNOPSIS is the program synopsis to use in that context.
It defaults to *SYNOPSIS*.
- CMDLINE is the argument list (strings) to process.
It defaults to a POSIX conformant argv.
- If MAKE-CURRENT, make the new context current.
context.lisp (file)
Make a new enum option.
- SHORT-NAME is the option’s short name (without the dash).
It defaults to nil.
- LONG-NAME is the option’s long name (without the double-dash).
It defaults to nil.
- DESCRIPTION is the option’s description appearing in help strings.
It defaults to nil.
- ARGUMENT-NAME is the option’s argument name appearing in help strings.
- ARGUMENT-TYPE is one of :required, :mandatory or :optional (:required and
:mandatory are synonyms).
It defaults to :optional.
- ENUM is the set of possible values.
- ENV-VAR is the option’s associated environment variable.
It defaults to nil.
- FALLBACK-VALUE is the option’s fallback value (for missing optional
arguments), if any.
- DEFAULT-VALUE is the option’s default value, if any.
- When HIDDEN, the option doesn’t appear in help strings.
enum.lisp (file)
Make a new flag.
- SHORT-NAME is the option’s short name (without the dash).
It defaults to nil.
- LONG-NAME is the option’s long name (without the double-dash).
It defaults to nil.
- DESCRIPTION is the option’s description appearing in help strings.
It defaults to nil.
- ENV-VAR is the flag’s associated environment variable.
It defaults to nil.
- When HIDDEN, the option doesn’t appear in help strings.
flag.lisp (file)
Make a new group.
group.lisp (file)
Make a new lispobj option.
- SHORT-NAME is the option’s short name (without the dash).
It defaults to nil.
- LONG-NAME is the option’s long name (without the double-dash).
It defaults to nil.
- DESCRIPTION is the option’s description appearing in help strings.
It defaults to nil.
- ARGUMENT-NAME is the option’s argument name appearing in help strings.
- ARGUMENT-TYPE is one of :required, :mandatory or :optional (:required and
:mandatory are synonyms).
It defaults to :optional.
- ENV-VAR is the option’s associated environment variable.
It defaults to nil.
- TYPESPEC is a type specifier the option’s value should satisfy.
- FALLBACK-VALUE is the option’s fallback value (for missing optional
arguments), if any.
- DEFAULT-VALUE is the option’s default value, if any.
- When HIDDEN, the option doesn’t appear in help strings.
lispobj.lisp (file)
Make a new path option.
- SHORT-NAME is the option’s short name (without the dash).
It defaults to nil.
- LONG-NAME is the option’s long name (without the double-dash).
It defaults to nil.
- DESCRIPTION is the option’s description appearing in help strings.
It defaults to nil.
- ARGUMENT-NAME is the option’s argument name appearing in help strings.
- ARGUMENT-TYPE is one of :required, :mandatory or :optional (:required and
:mandatory are synonyms).
It defaults to :optional.
- ENV-VAR is the option’s associated environment variable.
It defaults to nil.
- FALLBACK-VALUE is the option’s fallback value (for missing optional
arguments), if any.
- DEFAULT-VALUE is the option’s default value, if any.
- TYPE is the pathname type. It can be one of :file, :directory, :file-list,
:directory-list or nil meaning that everything is allowed.
- When HIDDEN, the option doesn’t appear in help strings.
path.lisp (file)
Make a new string option.
- SHORT-NAME is the option’s short name (without the dash).
It defaults to nil.
- LONG-NAME is the option’s long name (without the double-dash).
It defaults to nil.
- DESCRIPTION is the option’s description appearing in help strings.
It defaults to nil.
- ARGUMENT-NAME is the option’s argument name appearing in help strings.
- ARGUMENT-TYPE is one of :required, :mandatory or :optional (:required and
:mandatory are synonyms).
It defaults to :optional.
- ENV-VAR is the option’s associated environment variable.
It defaults to nil.
- FALLBACK-VALUE is the option’s fallback value (for missing optional
arguments), if any.
- DEFAULT-VALUE is the option’s default value, if any.
- When HIDDEN, the option doesn’t appear in help strings.
stropt.lisp (file)
Make a new switch.
- SHORT-NAME is the switch’s short name (without the dash).
It defaults to nil.
- LONG-NAME is the switch’s long name (without the double-dash).
It defaults to nil.
- DESCRIPTION is the switch’s description appearing in help strings.
It defaults to nil.
- ARGUMENT-STYLE is the switch’s argument display style. It can be one of
:yes/no, :on/off, :true/false, :yup/nope or :yeah/nah.
It defaults to :yes/no.
- ARGUMENT-TYPE is one of :required, :mandatory or :optional (:required and
:mandatory are synonyms).
It defaults to :optional.
- ENV-VAR is the switch’s associated environment variable.
It defaults to nil.
- DEFAULT-VALUE is the switch’s default value, if any.
- When HIDDEN, the option doesn’t appear in help strings.
switch.lisp (file)
Make a new SYNOPSIS.
- POSTFIX is a string to append to the program synopsis, in case it accepts a
remainder.
- If MAKE-DEFAULT, make the new synopsis the default one.
synopsis.lisp (file)
Make a new text.
- CONTENTS is the actual text to display.
- When HIDDEN, the text doesn’t appear in help strings.
text.lisp (file)
Make a new xswitch.
- SHORT-NAME is the xswitch’s short name (without the dash).
It defaults to nil.
- LONG-NAME is the xswitch’s long name (without the double-dash).
It defaults to nil.
- DESCRIPTION is the xswitch’s description appearing in help strings.
It defaults to nil.
- ARGUMENT-NAME is the option’s argument name appearing in help strings.
- ARGUMENT-TYPE is one of :required, :mandatory or :optional (:required and
:mandatory are synonyms).
It defaults to :optional.
- ENUM is the set of possible non-boolean values.
- ENV-VAR is the xswitch’s associated environment variable.
It defaults to nil.
- DEFAULT-VALUE is the xswitch’s default value, if any.
- When HIDDEN, the option doesn’t appear in help strings.
xswitch.lisp (file)
Add NICKNAME (:CLON by default) to the :NET.DIDIERVERNA.CLON package.
meta.lisp (file)
Return CONTEXT’s program name.
context.lisp (file)
Return CONTEXT’s remainder.
context.lisp (file)
Autodetect termio support.
Update Clon configuration and *FEATURES* accordingly.
setup.lisp (file)
Return the current version of Clon.
TYPE can be one of :number, :short or :long.
A version number is computed as major*10000 + minor*100 + patchlevel, leaving
two digits for each level. Alpha, beta and rc status are ignored in version
numbers.
A short version is something like 1.3{a,b,rc}4, or 1.3.4 for patchlevel.
Alpha, beta or rc levels start at 1. Patchlevels start at 0 but are ignored
in the output, so that 1.3.0 appears as just 1.3.
A long version is something like
1.3 {alpha,beta,release candidate,patchlevel} 4 "Michael Brecker". As for
the short version, a patchlevel of 0 is ignored in the output.
setup.lisp (file)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal special variables | ||
• Internal macros | ||
• Internal functions | ||
• Internal generic functions | ||
• Internal conditions | ||
• Internal structures | ||
• Internal classes |
Next: Internal macros, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
Whether the current Lisp image is a standalone executable dumped by Clon. This information is needed in some implementations that treat their command-line differently in dumped images.
util.lisp (file)
The highlight face properties.
face.lisp (file)
The list of defined item names.
valued.lisp (file)
The Clon readtable.
meta.lisp (file)
Next: Internal functions, Previous: Internal special variables, Up: Internal definitions [Contents][Index]
Define a new group.
group.lisp (file)
Accumulate BODY forms in a list beginning with INITIAL-VALUE.
INITIAL-VALUE is not evaluated. BODY forms are accumulated only when their
value is non-nil.
If nothing to accumulate, then return nil instead of the list of
INITIAL-VALUE.
util.lisp (file)
Validate SUPERCLASS classes for CLASS classes.
util.lisp (file)
Like DEFCLASS, but define an abstract class.
util.lisp (file)
Set SYMBOL’s indentation to INDENT in (X)Emacs.
SYMBOL and INDENT need not be quoted.
See CLINDENT for more information.
meta.lisp (file)
Create a new option CLASS and register it with Clon.
valued.lisp (file)
Execute BODY with OPT bound to every option in THERE.
synopsis.lisp (file)
Like COND, but signal an error if no clause evaluates to t.
util.lisp (file)
Like push, but at the end.
util.lisp (file)
Create an ECASE form to extract PROPERTY’s VALUE escape sequence.
Each clause looks like: (PROPERTY-NAME (VALUE-OR-VALUE-LIST ESCAPE-SEQUENCE)*).
The value-matching part will itself be enclosed in an ECASE expression.
In addition, the special clause syntax (BOOLEAN <PROPERTY-NAME> <YES> <NO>)
is a shortcut for: (PROPERTY-NAME ((on t) YES) ((off nil) NO)).
sheet.lisp (file)
Set the current readtable to the value of NAME::*READTABLE*.
meta.lisp (file)
Map FUNCTION over SHEET’s frames. If REVERSE, map in reverse order.
sheet.lisp (file)
Pop OPTION’s argument from CMDLINE if needed. If so, store it in CMDLINE-ARGUMENT.
cmdline.lisp (file)
Like push, but only if OBJECT is non-nil.
util.lisp (file)
Replace every occurrence of THE-KEY in KEYS with FORM.
At every KEYS round, KEY and VAL are bound to the current key-value pair.
FORM is evaluated each time and should return a key-value list.
util.lisp (file)
Restartably throw an invalid-negated-syntax error.
The error relates to the command-line use of OPTION.
BODY constitutes the body of the only restart available,
use-short-call, and should act as if OPTION had been normally called by short
name.
cmdline.lisp (file)
Restartably throw a spurious-cmdline-argument error.
The error relates to the command-line use of OPTION called by NAME with
ARGUMENT.
BODY constitutes the body of the only restart available, discard-argument, and
should act as if ARGUMENT had not been provided.
cmdline.lisp (file)
Execute BODY with CONTEXT’s error handler bound for CONDITION.
context.lisp (file)
Next: Internal generic functions, Previous: Internal macros, Up: Internal definitions [Contents][Index]
setup.lisp (file)
Add SUBFACE to FACE’s subfaces and return it.
face.lisp (file)
Return true if the first CMDLINE item is an argument.
cmdline.lisp (file)
Create a copy of FACE-TREE, attach it to FACE and return it.
Apart from the parenting information, the copied faces share slot values with
the original ones.
face.lisp (file)
Return SHEET’s available right margin.
This margin is the first non-self margin specified by a frame. All inner self
frames can potentially write until the available right margin.
sheet.lisp (file)
Check that STRING starts with BEGINNING. If IGNORE-CASE, well, ignore case.
util.lisp (file)
Set SYMBOL’s indentation to INDENT in (X)Emacs.
This function sets SYMBOL’s common-lisp-indent-function property.
If INDENT is a symbol, use its indentation definition.
Otherwise, INDENT is considered as an indentation definition.
meta.lisp (file)
Close all frames on SHEET’s current line and go to next line.
sheet.lisp (file)
Close SHEET’s current sface.
sheet.lisp (file)
Return the LIST element closest to MATCH, or nil.
If IGNORE-CASE, well, ignore case.
KEY should provide a way to get a string from each LIST element.
util.lisp (file)
Convert CMDLINE-ARGUMENT to VALUED-OPTION’s value.
This function is used when the conversion comes from a command-line usage of
VALUED-OPTION, called by CMDLINE-NAME, and intercepts invalid-argument errors
to raise the higher level invalid-cmdline-argument error instead.
cmdline.lisp (file)
context.lisp (file)
context.lisp (file)
context.lisp (file)
context.lisp (file)
context.lisp (file)
Complete BEGINNING with the rest of COMPLETE in parentheses. For instance, completing ’he’ with ’help’ will produce ’he(lp)’.
util.lisp (file)
context.lisp (file)
sheet.lisp (file)
sheet.lisp (file)
sheet.lisp (file)
Return SHEET’s current frame.
sheet.lisp (file)
Return SHEET’s current left margin.
sheet.lisp (file)
Return SHEET’s current right margin.
sheet.lisp (file)
Return SHEET’s current sface or nil.
sheet.lisp (file)
Return true if PATHNAME denotes a directory.
path.lisp (file)
Convert ENV-VAL to VALUED-OPTION’s value.
This function is used when the conversion comes from an environment variable
associated with VALUED-OPTION, and intercepts invalid-argument errors
to raise the higher level invalid-environment-value error instead.
environ.lisp (file)
Print ERROR on *ERROR-OUTPUT* and exit with status code 1.
context.lisp (file)
Return t if PROPERTY is set explicitely in FACE.
face.lisp (file)
Return PROPERTY’s value in FACE.
Since faces inherit highlight properties, the actual value might come from one
of FACE’s ancestors.
if PROPERTY is not et, return nil.
face.lisp (file)
Find an sface starting at SFACE named NAME.
If the sface can’t be found in SFACE’s face tree, find one in SFACE’s sibling
instead, and make a copy of it.
sheet.lisp (file)
Flush SHEET.
sheet.lisp (file)
sheet.lisp (file)
sheet.lisp (file)
sheet.lisp (file)
sheet.lisp (file)
Return top padding of the next item in ITEMS that will print under SFACE.
sheet.lisp (file)
Get environment VARIABLE’s value. VARIABLE may be null.
util.lisp (file)
Return t if at least one of ITEMS will print under SFACE.
sheet.lisp (file)
sheet.lisp (file)
sheet.lisp (file)
sheet.lisp (file)
sheet.lisp (file)
sheet.lisp (file)
Return highlight property INSTANCE’s escape sequence.
sheet.lisp (file)
sheet.lisp (file)
sheet.lisp (file)
sheet.lisp (file)
Return user’s home directory in canonical form.
If the user’s home directory cannot be computed, signal a warning and return
NIL.
util.lisp (file)
Read an argument list for the DEFINDENT macro.
meta.lisp (file)
Return a SEPARATOR-separated string of all LIST elements.
- KEY should provide a way to get a string from each LIST element.
- SEPARATOR is the string to insert between elements.
util.lisp (file)
Return t if running on Mac OS.
util.lisp (file)
context.lisp (file)
sheet.lisp (file)
sheet.lisp (file)
sheet.lisp (file)
Make a new internal (Clon-specific) enum option.
- LONG-NAME is the option’s long-name, sans the ’clon-’ prefix.
(Internal options don’t have short names.)
- DESCRIPTION is the options’s description.
- ARGUMENT-NAME is the option’s argument name appearing in help strings.
- ARGUMENT-TYPE is one of :required, :mandatory or :optional (:required and
:mandatory are synonyms).
It defaults to :optional.
- ENUM is the set of possible values.
- ENV-VAR is the option’s associated environment variable, sans the ’CLON_’
prefix. It defaults to nil.
- FALLBACK-VALUE is the option’s fallback value (for missing optional
arguments), if any.
- DEFAULT-VALUE is the option’s default value, if any.
- When HIDDEN, the option doesn’t appear in help strings.
enum.lisp (file)
Make a new internal (Clon-specific) flag.
- LONG-NAME is the flag’s long-name, sans the ’clon-’ prefix.
(Internal options don’t have short names.)
- DESCRIPTION is the flag’s description.
- ENV-VAR is the flag’s associated environment variable, sans the ’CLON_’
prefix. It default to nil.
- When HIDDEN, the option doesn’t appear in help strings.
flag.lisp (file)
Make a new internal (Clon-specific) string option.
- LONG-NAME is the option’s long-name, sans the ’clon-’ prefix.
(Internal options don’t have short names.)
- DESCRIPTION is the options’s description.
- ARGUMENT-NAME is the option’s argument name appearing in help strings.
- ARGUMENT-TYPE is one of :required, :mandatory or :optional (:required and
:mandatory are synonyms).
It defaults to :optional.
- ENV-VAR is the option’s associated environment variable, sans the ’CLON_’
prefix. It defaults to nil.
- TYPESPEC is a type specifier the option’s value should satisfy.
- FALLBACK-VALUE is the option’s fallback value (for missing optional
arguments), if any.
- DEFAULT-VALUE is the option’s default value, if any.
- When HIDDEN, the option doesn’t appear in help strings.
lispobj.lisp (file)
Make a new internal (Clon-specific) path option.
- LONG-NAME is the option’s long-name, sans the ’clon-’ prefix.
(Internal options don’t have short names.)
- DESCRIPTION is the options’s description.
- ARGUMENT-NAME is the option’s argument name appearing in help strings.
- ARGUMENT-TYPE is one of :required, :mandatory or :optional (:required and
:mandatory are synonyms).
It defaults to :optional.
- ENV-VAR is the option’s associated environment variable, sans the ’CLON_’
prefix. It defaults to nil.
- FALLBACK-VALUE is the option’s fallback value (for missing optional
arguments), if any.
- DEFAULT-VALUE is the option’s default value, if any.
- TYPE is the pathname type. It can be one of :file, :directory, :file-list,
:directory-list or nil meaning that everything is allowed.
- When HIDDEN, the option doesn’t appear in help strings.
path.lisp (file)
Make a new internal (Clon-specific) string option.
- LONG-NAME is the option’s long-name, sans the ’clon-’ prefix.
(Internal options don’t have short names.)
- DESCRIPTION is the options’s description.
- ARGUMENT-NAME is the option’s argument name appearing in help strings.
- ARGUMENT-TYPE is one of :required, :mandatory or :optional (:required and
:mandatory are synonyms).
It defaults to :optional.
- ENV-VAR is the option’s associated environment variable, sans the ’CLON_’
prefix. It defaults to nil.
- FALLBACK-VALUE is the option’s fallback value (for missing optional
arguments), if any.
- DEFAULT-VALUE is the option’s default value, if any.
- When HIDDEN, the option doesn’t appear in help strings.
stropt.lisp (file)
Make a new internal (Clon-specific) switch.
- LONG-NAME is the switch’s long-name, sans the ’clon-’ prefix.
(Internal options don’t have short names.)
- DESCRIPTION is the switch’s description.
- ARGUMENT-STYLE is the switch’s argument display style. It can be one of
:yes/no, :on/off, :true/false, :yup/nope or :yeah/nah.
It defaults to :yes/no.
- ARGUMENT-TYPE is one of :required, :mandatory or :optional (:required and
:mandatory are synonyms).
It defaults to :optional.
- ENV-VAR is the switch’s associated environment variable, sans the ’CLON_’
prefix. It defaults to nil.
- DEFAULT-VALUE is the switch’s default value, if any.
- When HIDDEN, the option doesn’t appear in help strings.
switch.lisp (file)
text.lisp (file)
Make a new internal (Clon-specific) xswitch.
- LONG-NAME is the xswitch’s long-name, sans the ’clon-’ prefix.
(Internal options don’t have short names.)
- DESCRIPTION is the xswitch’s description.
- ARGUMENT-NAME is the option’s argument name appearing in help strings.
- ARGUMENT-TYPE is one of :required, :mandatory or :optional (:required and
:mandatory are synonyms).
It defaults to :optional.
- ENUM is the set of possible non-boolean values.
- ENV-VAR is the xswitch’s associated environment variable, sans the ’CLON_’
prefix. It defaults to nil.
- DEFAULT-VALUE is the xswitch’s default value, if any.
- When HIDDEN, the option doesn’t appear in help strings.
xswitch.lisp (file)
Make a raw (boring yet functional) face tree.
face.lisp (file)
Return a new SFace based on SIBLING.
This function does not consider SIBLING as a face tree:
only face properties are copied; the face parent and children are set to nil.
sheet.lisp (file)
Make a new SHEET.
sheet.lisp (file)
Try to match OPTION against SHORT-NAME, LONG-NAME. If OPTION matches, return the name that matched.
option.lisp (file)
Open all frames on SHEET’s current line.
sheet.lisp (file)
Close SHEET’s current line and open the next one.
sheet.lisp (file)
Create a frame for SFACE and open it.
sheet.lisp (file)
Return the distance between OPTION’s long name and PARTIAL-NAME. If PARTIAL-NAME does not abbreviate OPTION’s long name, return MOST-POSITIVE-FIXNUM.
option.lisp (file)
Return true if STR looks like an option call.
cmdline.lisp (file)
Return FACE’s parent generation for PARENT-NAME.
That is, 1 if PARENT-NAME names FACE’s parent, 2 if it names its grand-parent
etc. If PARENT-NAME does not name one of FACE’s ancestors, trigger an error.
face.lisp (file)
Return true if COMPONENT is either null or :unspecific.
path.lisp (file)
Pop SHEET’s current frame.
sheet.lisp (file)
Return OPTION’s potential pack character, if any. If AS-STRING, return a string of that character.
option.lisp (file)
Princ CHAR on SHEET’s stream and increment the column position.
The effect of printing CHAR must be exactly to move right by one column, so
control characters, as well as newlines and tabs are forbidden here.
sheet.lisp (file)
Princ highlight proeprty INSTANCES on SHEET’s stream.
sheet.lisp (file)
Princ NUMBER spaces to SHEET’s stream and update the column position.
sheet.lisp (file)
Princ STRING on SHEET’s stream and update the column position.
The effect of printing STRING must be exactly to move right by the
corresponding string length, so control characters, as well as newlines and
tabs are forbidden here.
sheet.lisp (file)
Print ERROR on *ERROR-OUTPUT*.
When INTERACTIVEP, print on *QUERY-IO* instead.
context.lisp (file)
Print all help specification ITEMS on SHEET with SFACE.
sheet.lisp (file)
Open the toplevel help face and print HELP on SHEET with it.
sheet.lisp (file)
Output STRING to SHEET.
STRING is output within the current frame’s bounds.
Spacing characters are honored but newlines might replace spaces when the
output reaches the rightmost bound.
sheet.lisp (file)
Push a new frame to SHEET’s frames.
sheet.lisp (file)
Set environment VARIABLE to VALUE.
util.lisp (file)
Reach COLUMN on SHEET by princ’ing spaces.
sheet.lisp (file)
Read an option argument from standard input.
valued.lisp (file)
Read an option’s call or pack from standard input.
If NEGATED, read a negated call or pack. Otherwise, read a short call or pack.
context.lisp (file)
Read ENV-VAR’s new value from standard input.
environ.lisp (file)
Read an option’s long name from standard input.
context.lisp (file)
Read an sface tree from PATHNAME.
sheet.lisp (file)
Read an option value from standard input.
valued.lisp (file)
setup.lisp (file)
Return a new property list from KEYS without REMOVED ones.
util.lisp (file)
Return a new property list from KEYS with REPLACEMENT.
REPLACEMENT can take the following forms:
- :KEY
The effect is to remove :KEY from KEYS, as per REMOVE-KEYS.
- (:KEY :NEW-KEY)
The effect is to replace :KEY with :NEW-KEY, leaving the values unchanged.
- (:KEY :NEW-KEY (VAL-OR-VALS NEW-VAL)*), with VAL-OR-VALS being
either a value or a list of values. The effect is to replace :KEY with
:NEW-KEY and a value matching one of the VAL-OR-VALS with the
corresponding NEW-VAL. Values not matching any VAL-OR-VALS remain unchanged.
- (:KEY (VAL-OR-VALS :NEW-KEY NEW-VAL...)*), with VAL-OR-VALS as above. The
effect is the same as above, but :NEW-KEY additionally depends on the
matched value. If multiple :NEW-KEY NEW-VAL couples are provided, that many
new keys are inserted along with their values. For values not matching any
VAL-OR-VALS, :KEY and its value remain unchanged.
util.lisp (file)
Return a new property list from KEYS with REPLACEMENTS.
See REPLACE-KEY for more information on the replacement syntax.
util.lisp (file)
Print ERROR and offer available restarts on *QUERY-IO*.
context.lisp (file)
Restartably check that VALUE is valid for VALUED-OPTION.
The only restart available, use-value, offers to try a different value from
the one that was provided.
valued.lisp (file)
Restartably convert CMDLINE-ARGUMENT to VALUED-OPTION’s value.
This function is used when the conversion comes from a command-line usage of
VALUED-OPTION, called by CMDLINE-NAME.
As well as conversion errors, this function might raise a
missing-cmdline-argument error if CMDLINE-ARGUMENT is nil and an argument is
required.
Available restarts are (depending on the context):
- use-fallback-value: return FALLBACK-VALUE,
- use-default-value: return VALUED-OPTION’s default value,
- use-value: return another (already converted) value,
- use-argument: return the conversion of another argument.
Return two values: VALUED-OPTION’s value and the actual value source. The value source may be :cmdline, :fallback or :default.
cmdline.lisp (file)
context.lisp (file)
Restartably convert ARGUMENT to VALUED-OPTION’s value.
Available restarts are:
- use-default-value: return OPTION’s default value,
- use-value: return another (already converted) value,
- use-argument: return the conversion of another argument.
valued.lisp (file)
Restartably convert ENV-VAL to VALUED-OPTION’s value.
This function is used when the conversion comes from an environment variable
associated with VALUED-OPTION.
Available restarts are:
- use-default-value: return VALUED-OPTION’s default value,
- use-value: return another (already converted) value,
- use-argument: return the conversion of another argument,
- modify-env: modify the environment variable’s value.
environ.lisp (file)
Put Clon in restricted mode because of REASON.
setup.lisp (file)
Return either MARGIN or a safe value instead.
To be safe, margin must be greater than the current left margin and smaller
than the currently available margin.
sheet.lisp (file)
Return either MARGIN or a safe value instead.
To be safe, margin must be greater than LEFT-MARGIN and smaller
than the currently available right margin.
sheet.lisp (file)
Search for a branch of faces named NAMES starting at FACE.
The branch is searched for as a direct subbranch of FACE, or as a direct
subbranch of FACE’s ancestors.
If a branch is found, return its leaf face. Otherwise return nil.
face.lisp (file)
Search for a face named NAME starting at FACE.
The face is looked for as a direct subface of FACE (in which case it is simply
returned), or up in the hierarchy and by successive upper branches (in which
case it is copied and attached to FACE).
If ERROR-ME, trigger an error if no face is found; otherwise, return nil.
face.lisp (file)
Search for an option in CONTEXT.
The search is done with SHORT-NAME, LONG-NAME, or PARTIAL-NAME.
In case of a PARTIAL-NAME search, look for an option the long name of which
begins with it.
In case of multiple matches by PARTIAL-NAME, the longest match is selected.
When such an option exists, return wo values:
- the option itself,
- the name used to find the option, possibly completed if partial.
context.lisp (file)
Search for option abbreviated with PARTIAL-NAME in CONTEXT.
When such an option exists, return two values:
- the option itself,
- the completed name.
context.lisp (file)
Search for option with either SHORT-NAME or LONG-NAME in CONTEXT.
When such an option exists, return two values:
- the option itself,
- the name that matched.
context.lisp (file)
Search for a sticky option in CONTEXT, matching NAMEARG.
NAMEARG is the concatenation of the option’s short name and its argument.
In case of multiple matches, the option with the longest name is selected.
When such an option exists, return two values:
- the option itself,
- the argument part of NAMEARG.
context.lisp (file)
Return a new property list from KEYS with only SELECTED ones.
util.lisp (file)
Split PATH into a list of directories.
path.lisp (file)
Read a series of ~"string" to be concatenated together.
meta.lisp (file)
Read an sface tree from PATHNAME if it exists or return nil.
sheet.lisp (file)
Read a theme from PATHNAME or PATHNAME.cth if it exists or return nil.
sheet.lisp (file)
Next: Internal conditions, Previous: Internal functions, Up: Internal definitions [Contents][Index]
context.lisp (file)
cmdline.lisp (file)
valued.lisp (file)
The option’s argument display name.
valued.lisp (file)
Whether the option’s argument is required.
valued.lisp (file)
The selected argument style.
switch-base.lisp (file)
The possible argument styles.
The position of every argument style in the list must correspond to the
position of the associated strings in the yes-values and no-values slots.
switch-base.lisp (file)
The face background.
face.lisp (file)
The face’s blink speed.
face.lisp (file)
The face bottom padding.
This property can take the following forms:
- nil: the next output can start right at the end of this face’s,
- 0: the next output should start on the next line,
- N>0: there should be N empty lines before the next output.
face.lisp (file)
Check that VALUE is valid for VALUED-OPTION.
If VALUE is valid, return it. Otherwise, raise an invalid-value error.
valued.lisp (file)
Check that VALUE is valid for XSWITCH.
xswitch.lisp (file)
Check that VALUE is valid for ENUM.
enum.lisp (file)
Check that VALUE is valid for PATH.
path.lisp (file)
Check that VALUE is valid for LISPOBJ.
lispobj.lisp (file)
Check that VALUE is valid for STROPT.
stropt.lisp (file)
Check that VALUE is valid for SWITCH.
switch.lisp (file)
Check for name clash between ITEM1’s options and ITEM2’s options.
option.lisp (file)
Check for name clash between CONTAINER1’s options and CONTAINER2’s ones.
container.lisp (file)
Check for name clash between ITEM1’s options and CONTAINER’s ones.
container.lisp (file)
Check for name clash between CONTAINER’s options and ITEM2’s ones.
container.lisp (file)
Do nothing (no name clash with a text object.
Do nothing (no name clash with a text object.
Ensure that there is no name clash between OPTION1 and OPTION2.
Return the Clon options group of CONTEXT’s synopsis.
context.lisp (file)
The Clon options group.
synopsis.lisp (file)
Close FRAME on SHEET.
sheet.lisp (file)
progn (short method combination)
Options: :most-specific-last
Reach FRAME’s right margin if it has one.
Restore the upper frame’s highlight properties.
The options from the command-line.
context.lisp (file)
The sheet’s current column.
sheet.lisp (file)
valued.lisp (file)
valued.lisp (file)
The face’s concealed status.
face.lisp (file)
The actual text string.
text.lisp (file)
Convert ARGUMENT to VALUED-OPTION’s value.
If ARGUMENT is invalid, raise an invalid-argument error.
valued.lisp (file)
Convert ARGUMENT to an XSWITCH value.
xswitch.lisp (file)
Convert ARGUMENT to an ENUM value.
enum.lisp (file)
Convert ARGUMENT to a PATH value.
path.lisp (file)
Convert ARGUMENT to a LISPOBJ value.
lispobj.lisp (file)
Convert ARGUMENT to an STROPT value.
stropt.lisp (file)
Convert ARGUMENT to a SWITCH value.
switch.lisp (file)
Return a copy of INSTANCE.
Copy is either an object of INSTANCE’s class, or INSTANCE’s SUBCLASS if given.
util.lisp (file)
Return a copy of INSTANCE.
Both instances share the same slot values.
The face’s crossed out status.
face.lisp (file)
The option’s default value.
valued.lisp (file)
The option’s description.
option.lisp (file)
The set of possible values.
enum-base.lisp (file)
environ.lisp (file)
environ.lisp (file)
The option’s associated environment variable.
option.lisp (file)
The behavior to adopt on option retrieval errors.
context.lisp (file)
util.lisp (file)
The option’s fallback value.
valued.lisp (file)
The face foreground.
face.lisp (file)
The face’s framed status.
face.lisp (file)
The stack of currently open frames.
sheet.lisp (file)
Get HELP-SPEC’s bottom-padding under SFACE.
sheet.lisp (file)
Basic help specifications (chars, strings etc) don’t provide a bottom padding.
Return the bottom padding of HELP-SPEC’s face.
The group’s header.
group.lisp (file)
Return ITEM’s help specification.
item.lisp (file)
Return SYNOPSIS’s help specification.
synopsis.lisp (file)
Return GROUP’s help specification.
group.lisp (file)
Return CONTAINER’s help specification.
container.lisp (file)
Return OPTION’s help specification.
valued.lisp (file)
Return OPTION’s help specification.
option.lisp (file)
Return TEXT’s help specification.
text.lisp (file)
Call the actual method only when ITEM is not hidden or UNHIDE.
Return t if HELP-SPEC will print under FACE.
sheet.lisp (file)
Basic help specifications (chars, strings etc) do print.
Return t if HELP-SPEC’s items will print under HELP-SPEC’s face.
Whether the item is hidden in help strings.
item.lisp (file)
Clon’s output highlight mode.
context.lisp (file)
Whether to highlight SHEET’s output.
sheet.lisp (file)
The face intensity.
face.lisp (file)
The face’s inverse video status.
face.lisp (file)
The face’s italic status.
face.lisp (file)
cmdline.lisp (file)
The face item separator.
face.lisp (file)
The items in the container.
container.lisp (file)
context.lisp (file)
The face left padding.
This property can take the following forms:
- <NUMBER>: the padding is relative to the enclosing face,
- SELF: the padding is set to wherever the face happens to be opened,
- (<NUMBER> ABSOLUTE): the padding is set in absolute value,
- (<NUMBER> :RELATIVE-TO <FACE-NAME>): the padding is set relatively to a
parent face named FACE-NAME.
face.lisp (file)
The line width for help display.
context.lisp (file)
The sheet’s line width.
sheet.lisp (file)
The option’s long name.
option.lisp (file)
Make a FACE-CLASS face tree from DEFINITION.
face.lisp (file)
Make a FACE-CLASS face tree from a list of face name and initargs.
Create a face named NAME.
Map FUNC over all options in THERE.
synopsis.lisp (file)
Map FUNC over all options in CONTEXT synopsis.
context.lisp (file)
Do nothing by default.
Mark TRAVERSABLE as traversed.
Map FUNC over all containers or options in CONTAINER.
Call FUNC on OPTION.
context.lisp (file)
The face name.
face.lisp (file)
cmdline.lisp (file)
context.lisp (file)
Return the negated pack of CONTEXT’s synopsis.
context.lisp (file)
The negated pack string.
synopsis.lisp (file)
Return OPTION’s negated pack character, if any. If AS-STRING, return a string of that character.
option.lisp (file)
Return NEGATABLE’s negated pack character, if any.
negatable.lisp (file)
Return nil (only the switch hierarchy is negated-pack’able).
The possible ’no’ values.
switch-base.lisp (file)
Open FRAME on SHEET.
sheet.lisp (file)
progn (short method combination)
Options: :most-specific-last
Reach the frame’s left margin.
Reach the frame’s left margin and output its highlight properties.
option.lisp (file)
Try to match OPTION’s short name with a sticky argument against NAMEARG. If OPTION matches, return the length of OPTION’s short name; otherwise 0.
option.lisp (file)
Try to match OPTION’s short name with a sticky argument against NAMEARG. If OPTION matches, return its short name’s length; otherwise 0.
valued.lisp (file)
Return 0 (non-valued options don’t take any argument, sticky or not).
The sheet’s output stream.
sheet.lisp (file)
The face parent.
face.lisp (file)
The path type.
path.lisp (file)
Return the postfix of CONTEXT’s synopsis.
context.lisp (file)
A postfix to the program synopsis.
synopsis.lisp (file)
The potential pack string.
synopsis.lisp (file)
Return t if PACK is a potential pack in THERE.
synopsis.lisp (file)
Return t if PACK (a string) is a potential pack in CONTEXT.
context.lisp (file)
Return t if PACK is a potential pack for SYNOPSIS.
Print HELP-SPEC on SHEET.
sheet.lisp (file)
Print CHAR on SHEET with the current face.
Print CHAR-VECTOR on SHEET with the current face.
Print STRING on SHEET with the current face.
Open HELP-SPEC’s face and print all of its items with it.
Retrieve OPTION’s value from the environment.
ENV-VAL is the value stored in the associated environment variable.
environ.lisp (file)
Assert that ENV-VAL is not null.
Retrieve OPTION’s value from a long call.
CMDLINE-NAME is the name used on the command-line.
CMDLINE-ARGUMENT is a potentially already parsed cmdline argument.
Otherwise, CMDLINE is where to find an argument.
This function returns three values:
- the retrieved value,
- the value source,
- the new command-line (possibly with the first item popped if the option
requires an argument).
cmdline.lisp (file)
Retrieve OPTION’s value from a negated call.
cmdline.lisp (file)
Retrieve OPTION’s value from a short call.
CMDLINE-ARGUMENT is a potentially already parsed cmdline argument.
Otherwise, CMDLINE is where to find an argument.
This function returns three values:
- the retrieved value,
- the value source,
- the new command-line (possibly with the first item popped if the option
requires an argument).
cmdline.lisp (file)
The face right padding.
This property can take the following forms:
- <NUMBER>: the padding is relative to the enclosing face,
- SELF: the padding is set to wherever the face happens to be closed,
- (<NUMBER> ABSOLUTE): the padding is set in absolute value,
- (<NUMBER> :RELATIVE-TO <FACE-NAME>): the padding is set relatively to a
parent face named FACE-NAME.
face.lisp (file)
The search path for Clon files.
context.lisp (file)
The sheet’s sface tree.
sheet.lisp (file)
context.lisp (file)
The option’s short name.
option.lisp (file)
Return the short pack of CONTEXT’s synopsis.
context.lisp (file)
The short pack string.
synopsis.lisp (file)
Return OPTION’s short pack character, if any. If AS-STRING, return a string of that character.
option.lisp (file)
Return OPTION’s short pack character if OPTION’s argument is optional.
valued.lisp (file)
Return OPTION’s potential pack character.
Return the help specification prefix for OPTION’s short call.
valued.lisp (file)
negatable.lisp (file)
The SFace’s raw sibling.
sheet.lisp (file)
Transform VALUED-OPTION’s VALUE into an argument. This is the opposite of argument conversion.
valued.lisp (file)
Transform XSWITCH’s VALUE into an argument.
xswitch.lisp (file)
Transform ENUM’s VALUE into an argument.
enum.lisp (file)
Transform PATH’s VALUE into an argument.
path.lisp (file)
Transform LISPOBJ’s VALUE into an argument.
lispobj.lisp (file)
Transform STROPT’s VALUE into an argument.
stropt.lisp (file)
Transform SWITCH’s VALUE into an argument.
switch.lisp (file)
Return subface of FACE named NAME(S) or nil.
If a list of names is provided instead of a single one, follow a subface
branch matching those names to find the leaf face.
face.lisp (file)
Return FACE’subface named NAME, or nil.
Return the leaf face from FACE’subbranch matching NAMES, or nil.
The face children.
face.lisp (file)
The program synopsis.
context.lisp (file)
The theme filename.
context.lisp (file)
sheet.lisp (file)
sheet.lisp (file)
The face top padding.
This property can take the following forms:
- nil: the output can start right away,
- 0: the output should start on the next line,
- N>0: there should be N empty lines before the output.
face.lisp (file)
The item’s traversal state.
item.lisp (file)
A type specifier the option’s value should satisfy.
lispobj.lisp (file)
The face’s underline level.
face.lisp (file)
Reset ITEM’s traversal state, and return ITEM.
item.lisp (file)
Untraverse CONTEXT synopsis.
context.lisp (file)
Untraverse all CONTAINER items.
container.lisp (file)
OPTION is a terminal object: just return it.
option.lisp (file)
TEXT is a terminal object: just return it.
text.lisp (file)
Mark ITEM as untraversed.
valued.lisp (file)
Whether the face is visible.
face.lisp (file)
The possible ’yes’ values.
switch-base.lisp (file)
Next: Internal structures, Previous: Internal generic functions, Up: Internal definitions [Contents][Index]
An error related to a command-line item.
cmdline.lisp (file)
error (condition)
item (method)
The concerned command-line item.
:item
item (generic function)
An error related to a command-line piece of junk.
context.lisp (file)
cmdline-error (condition)
junk (method)
The piece of junk appearing on the command-line.
:junk, :item
junk (generic function)
An error related to a command-line (known) option.
cmdline.lisp (file)
name (method)
The option’s name as it appears on the command-line.
:name, :item
name (generic function)
An error related to an environment variable.
environ.lisp (file)
error (condition)
environmental-option-error (condition)
env-var (method)
The concerned environment variable.
:env-var
env-var (generic function)
An error related to an option’s environment variable.
environ.lisp (file)
invalid-environment-value (condition)
util.lisp (file)
warning (condition)
:error-string
error-string (generic function)
(setf error-string) (generic function)
An invalid argument error.
valued.lisp (file)
option-error (condition)
The invalid argument.
:argument
argument (generic function)
An additional comment about the error.
:comment
comment (generic function)
An invalid command-line argument error.
cmdline.lisp (file)
An invalid environment variable’s value error.
environ.lisp (file)
env-val (method)
The invalid environment variable value.
:env-val, :argument
env-val (generic function)
An error related to a negated-equal syntax.
context.lisp (file)
cmdline-error (condition)
An invalid negated syntax error.
cmdline.lisp (file)
cmdline-option-error (condition)
An error related to a short-equal syntax.
context.lisp (file)
cmdline-error (condition)
An invalid value error.
valued.lisp (file)
option-error (condition)
The invalid value.
:value
value (generic function)
An additional comment about the error.
:comment
comment (generic function)
A missing command-line argument error.
cmdline.lisp (file)
cmdline-option-error (condition)
An error related to an option.
option.lisp (file)
error (condition)
option (method)
The concerned option.
:option
option (generic function)
A spurious command-line argument error.
cmdline.lisp (file)
cmdline-option-error (condition)
argument (method)
The spurious argument.
:argument
argument (generic function)
An error related to an unknown command-line option.
context.lisp (file)
cmdline-error (condition)
The option’s name as it appears on the command-line.
:name, :item
name (generic function)
The option’s command-line argument.
:argument
argument (generic function)
An error related to an unrecognized negated call.
context.lisp (file)
cmdline-error (condition)
negated-call (method)
The unrecognized negated call on the command-line.
:negated-call, :item
negated-call (generic function)
An error related to an unrecognized short call.
context.lisp (file)
cmdline-error (condition)
short-call (method)
The unrecognized short call on the command-line.
:short-call, :item
short-call (generic function)
Next: Internal classes, Previous: Internal conditions, Up: Internal definitions [Contents][Index]
context.lisp (file)
structure-object (structure)
cmdline-option-name (function)
(setf cmdline-option-name) (function)
cmdline-option-option (function)
(setf cmdline-option-option) (function)
cmdline-option-value (function)
(setf cmdline-option-value) (function)
cmdline-option-source (function)
(setf cmdline-option-source) (function)
The FRAME structure.
This structure hold layout properties used for printing.
sheet.lisp (file)
structure-object (structure)
highlight-frame (structure)
frame-sface (function)
(setf frame-sface) (function)
frame-left-margin (function)
(setf frame-left-margin) (function)
frame-right-margin (function)
(setf frame-right-margin) (function)
The HIGHLIGHT-FRAME structure.
This structure holds both layout and highlight properties used for printing.
sheet.lisp (file)
frame (structure)
highlight-frame-highlight-property-instances (function)
(setf highlight-frame-highlight-property-instances) (function)
The HIGHLIGHT-PROPERTY-INSTANCE structure.
sheet.lisp (file)
structure-object (structure)
highlight-property-instance-name (function)
(setf highlight-property-instance-name) (function)
highlight-property-instance-value (function)
(setf highlight-property-instance-value) (function)
Previous: Internal structures, Up: Internal definitions [Contents][Index]
The ABSTRACT-CLASS class.
This is the meta-class for abstract classes.
util.lisp (file)
standard-class (class)
The CONTAINER class.
This class is a mixin used in synopsis and groups to represent the program’s
command-line hierarchy.
container.lisp (file)
item (class)
The items in the container.
list
:items
items (generic function)
The CONTEXT class.
This class represents the associatiion of a synopsis and a set of command-line
options based on it.
context.lisp (file)
standard-object (class)
The program synopsis.
net.didierverna.clon::synopsis
:synopsis
net.didierverna.clon:*synopsis*
synopsis (generic function)
The program name as it appears on the command-line.
string
The options from the command-line.
list
cmdline-options (generic function)
(setf cmdline-options) (generic function)
The non-Clon part of the command-line.
list
The search path for Clon files.
search-path (generic function)
The theme filename.
theme (generic function)
The line width for help display.
line-width (generic function)
Clon’s output highlight mode.
highlight (generic function)
The behavior to adopt on option retrieval errors.
symbol
:quit
error-handler (generic function)
Initarg | Value |
---|---|
:cmdline | (net.didierverna.clon:cmdline) |
The ENUM class.
This class implements options whose values belong to a set of keywords.
enum.lisp (file)
"type"
The ENUM-BASE abstract class.
This class provides support for options including enumerated values.
enum-base.lisp (file)
standard-object (class)
The set of possible values.
:enum
enum (generic function)
The FACE class.
face.lisp (file)
standard-object (class)
sface (class)
The face name.
:name
name (generic function)
Whether the face is visible.
:visible
t
visiblep (generic function)
The face left padding.
This property can take the following forms:
- <NUMBER>: the padding is relative to the enclosing face,
- SELF: the padding is set to wherever the face happens to be opened,
- (<NUMBER> ABSOLUTE): the padding is set in absolute value,
- (<NUMBER> :RELATIVE-TO <FACE-NAME>): the padding is set relatively to a
parent face named FACE-NAME.
:padding-left
0
left-padding (generic function)
The face right padding.
This property can take the following forms:
- <NUMBER>: the padding is relative to the enclosing face,
- SELF: the padding is set to wherever the face happens to be closed,
- (<NUMBER> ABSOLUTE): the padding is set in absolute value,
- (<NUMBER> :RELATIVE-TO <FACE-NAME>): the padding is set relatively to a
parent face named FACE-NAME.
:padding-right
(quote net.didierverna.clon::self)
right-padding (generic function)
The face top padding.
This property can take the following forms:
- nil: the output can start right away,
- 0: the output should start on the next line,
- N>0: there should be N empty lines before the output.
:padding-top
top-padding (generic function)
The face bottom padding.
This property can take the following forms:
- nil: the next output can start right at the end of this face’s,
- 0: the next output should start on the next line,
- N>0: there should be N empty lines before the next output.
:padding-bottom
bottom-padding (generic function)
The face item separator.
:item-separator
#\
item-separator (generic function)
The face intensity.
:intensity
intensity (generic function)
The face’s italic status.
:italic
italicp (generic function)
The face’s underline level.
:underline
underline (generic function)
The face’s blink speed.
:blink
blink (generic function)
The face’s inverse video status.
:inverse
inversep (generic function)
The face’s concealed status.
:concealed
concealedp (generic function)
The face’s crossed out status.
:crossed-out
crossed-out-p (generic function)
The face’s framed status.
:framed
framedp (generic function)
The face foreground.
:foreground
foreground (generic function)
The face background.
:background
background (generic function)
The face children.
:subfaces
subfaces (generic function)
The face parent.
parent (generic function)
The FLAG class.
This class implements options that don’t take any argument.
flag.lisp (file)
option (class)
retrieve-from-environment (method)
The GROUP class.
This class groups other groups, options or strings together, effectively
implementing hierarchical program command-line.
group.lisp (file)
container (class)
The group’s header.
:header
header (generic function)
The ITEM class.
This class is the base class for all synopsis items.
item.lisp (file)
standard-object (class)
The item’s traversal state.
traversedp (generic function)
(setf traversedp) (generic function)
Whether the item is hidden in help strings.
:hidden
hiddenp (generic function)
The LISPOBJ class.
This class implements read-from-string options.
lispobj.lisp (file)
valued-option (class)
"obj"
A type specifier the option’s value should satisfy.
:typespec
t
typespec (generic function)
The NEGATABLE Class.
This class implements the negated syntax for the switch-based hierarchy.
negatable.lisp (file)
standard-object (class)
switch-base (class)
The OPTION class.
This is the base class for all options.
option.lisp (file)
item (class)
The option’s short name.
(or null string)
:short-name
short-name (generic function)
The option’s long name.
(or null string)
:long-name
long-name (generic function)
The option’s description.
(or null string)
:description
description (generic function)
The option’s associated environment variable.
(or null string)
:env-var
env-var (generic function)
Initarg | Value |
---|---|
:internal | nil |
The PATH class.
This class implements options whose values are (colon-separated lists of)
pathnames.
path.lisp (file)
valued-option (class)
"path"
The path type.
:type
path-type (generic function)
The SFACE class.
An SFace is the association of a face and its raw sibling. The sibling is used
to create subfaces which would be missing from the original, user defined one.
sheet.lisp (file)
face (class)
sibling (method)
The SFace’s raw sibling.
sibling (generic function)
The SHEET class.
This class implements the notion of sheet for printing Clon help.
sheet.lisp (file)
standard-object (class)
The sheet’s output stream.
stream
:output-stream
output-stream (generic function)
The sheet’s line width.
(integer 1)
:line-width
line-width (generic function)
Whether to highlight SHEET’s output.
:highlightp
highlightp (generic function)
The sheet’s sface tree.
sface-tree (generic function)
The sheet’s current column.
(integer 0)
0
column (generic function)
(setf column) (generic function)
The stack of currently open frames.
list
frames (generic function)
(setf frames) (generic function)
The STROPT class.
This class implements options the values of which are strings.
stropt.lisp (file)
valued-option (class)
"str"
The SWITCH class.
This class implements boolean options.
switch.lisp (file)
The SWITCH-BASE abstract class.
This class provides support for options including boolean values.
switch-base.lisp (file)
negatable (class)
The possible argument styles.
The position of every argument style in the list must correspond to the
position of the associated strings in the yes-values and no-values slots.
list
:argument-styles
argument-styles (generic function)
(setf argument-styles) (generic function)
The possible ’yes’ values.
list
:yes-values
yes-values (generic function)
(setf yes-values) (generic function)
The possible ’no’ values.
list
:no-values
no-values (generic function)
(setf no-values) (generic function)
The selected argument style.
keyword
:argument-style
:yes/no
argument-style (generic function)
Initarg | Value |
---|---|
:argument-type | :optional |
:argument-styles | (quote (:yes/no :on/off :true/false :yup/nope :yeah/nah)) |
:yes-values | (quote ("yes" "on" "true" "yup" "yeah")) |
:no-values | (quote ("no" "off" "false" "nope" "nah")) |
The SYNOPSIS class.
This class handles the description of the program’s command-line options.
synopsis.lisp (file)
container (class)
A postfix to the program synopsis.
(or null string)
:postfix
postfix (generic function)
The short pack string.
(or null string)
short-pack (generic function)
The negated pack string.
(or null string)
negated-pack (generic function)
The potential pack string.
(or null string)
potential-pack (generic function)
The Clon options group.
net.didierverna.clon::group
:clon-options-group
clon-options-group (generic function)
The TEXT class.
This class implements plain text objects appearing in a synopsis.
text.lisp (file)
item (class)
The actual text string.
string
:contents
contents (generic function)
The VALUED-OPTION class.
This is the base class for options accepting arguments.
valued.lisp (file)
option (class)
The option’s argument display name.
:argument-name
"arg"
argument-name (generic function)
Whether the option’s argument is required.
argument-required-p (generic function)
The option’s fallback value.
:fallback-value
fallback-value (generic function)
The option’s default value.
:default-value
default-value (generic function)
Initarg | Value |
---|---|
:argument-type | :required |
The XSWITCH class.
This class merges the functionalities of switches and enumerations.
As such, the negated syntax is available for extended xswitches.
xswitch.lisp (file)
The set of possible non-boolean values.
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | F L M N |
---|
Jump to: | F L M N |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | %
(
A B C D E F G H I J L M N O P R S T U V W Y |
---|
Jump to: | %
(
A B C D E F G H I J L M N O P R S T U V W Y |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | *
A B C D E F H I L N O P R S T U V Y |
---|
Jump to: | *
A B C D E F H I L N O P R S T U V Y |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | A C E F G H I L M N O P S T U V X |
---|
Jump to: | A C E F G H I L M N O P S T U V X |
---|