Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the pseudonyms Reference Manual, generated automatically by Declt version 3.0 "Montgomery Scott" on Tue Dec 22 14:45:27 2020 GMT+0.
• Introduction | What pseudonyms is all about | |
• Systems | The systems documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
DON'T USE. Use package-local nicknames instead.
I found that Lisp nicknames, as defined in CLHS, have a few problems that I will count here.
The solution I provide here is a different approach to nicknames that does not use any of the original nickname code, as defined in CLHS.
To begin quickly:
> (pseudonyms:pseudonyms-on)
Pseudonyms, in opposition to nicknames, can be defined by the user inside one's code, like this:
> (defpseudonym :longpackagename "lpn")
And removed like this:
> (pmakunbound "lpn") ;; OR (pmakunbound :longpackagename)
From within the code, one can refer to a pseudonymized package this way:
> $lpn:something
A reader macro will automatically translate it to its normal version of longpackagename:something.
This is usable both within the REPL and within usual code.
The reader macro character is also settable from the default #\$
:
> (set-pseudonym-macro-character #\^)
All pseudonyms are local to the current package: for instance, pseudonyms defined within CL-USER are not usable anywhere outside the CL-USER package.
An utility function print-pseudonyms
will print all pseudonyms for a given package. If not supplied a package name as an argument, it will print all pseudonyms for current package (as shown by the *package*
global variable).
Next: Files, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The pseudonyms system |
Michal "phoe" Herda
FreeBSD (BSD 2-clause)
Relative package nicknames through macros
pseudonyms.asd (file)
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
• The pseudonyms.asd file | ||
• The pseudonyms/package.lisp file | ||
• The pseudonyms/pseudonyms.lisp file |
Next: The pseudonyms/package․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
pseudonyms.asd
pseudonyms (system)
Next: The pseudonyms/pseudonyms․lisp file, Previous: The pseudonyms․asd file, Up: Lisp files [Contents][Index]
pseudonyms (system)
package.lisp
Previous: The pseudonyms/package․lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
pseudonyms (system)
pseudonyms.lisp
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The pseudonyms package |
=== PSEUDONYMS by phoe ===
See attached README.md for documentation.
package.lisp (file)
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 functions |
Next: Exported functions, Previous: Exported definitions, Up: Exported definitions [Contents][Index]
This is a global package-name-indexed hashtable holding package-name-and-pseudonym plists.
pseudonyms.lisp (file)
Previous: Exported special variables, Up: Exported definitions [Contents][Index]
This, given a package name and a pseudonym for it, allows you to use a local pseudonym in
form $pseudonym:symbol instead of name:symbol within your code. This pseudonym is local to the
package you called defpseudonym in (as shown by the global variable *PACKAGE*).
Arguments must be a pair of non-empty non-equal string designators, although I suggest using
a lowercase string for the second argument.
An optional third argument allows you to set a pseudonym for a different package.
This will signal an error whenever a nickname or pseudonym is already taken.
pseudonyms.lisp (file)
This, given either a pseudonym-bound package name or a package name-bound pseudonym, clears
any name-pseudonym pair bound to it.
Argument must be a string designator.
An optional second argument allows you to clear a pseudonym for a different package.
pseudonyms.lisp (file)
This prints all pseudonyms in a fancy manner.
Optional argument designates the package name, from inside which pseudonyms should be printed.
pseudonyms.lisp (file)
This is the reader macro for local pseudonyms.
This function is not meant to be called explicitly, unless you know what you’re doing.
pseudonyms.lisp (file)
Sets the macro character for nickname resolution. By default, it is set to #$.
pseudonyms.lisp (file)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal functions | ||
• Internal types |
Next: Internal types, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
Gimme some sugar, baby.
pseudonyms.lisp (file)
This is a version of getf utilizing string= for comparison. Given a plist and a key, returns a value.
pseudonyms.lisp (file)
This is a version of getf utilizing string= for comparison. Given a plist and a value, returns a key.
pseudonyms.lisp (file)
Previous: Internal functions, Up: Internal definitions [Contents][Index]
pseudonyms.lisp (file)
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 P |
---|
Jump to: | F L P |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | D F P S |
---|
Jump to: | D F P S |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | *
S |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
* | |||
*pseudonym-table* : | Exported special variables | ||
| |||
S | |||
Special Variable, *pseudonym-table* : | Exported special variables | ||
|
Jump to: | *
S |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | P S T |
---|
Jump to: | P S T |
---|