Hi Jon,
printing quoted text using dbg (not p), the text is automatically
underlined, and the quotes removed. Is this a feature added
recently?
This is, in fact, the official representation of transient symbols.
It is a mechanism called transient symbol markup (TSM), originally
introduced with picoLisp-2.2.2 (March 2006), but then removed in
picoLisp-2.2.6 (Apr 2007).
After lengthy discussions in IRC, we re-introduced it with
picoLisp-3.0.1 (December 2009, see ReleaseNotes).
TSM is controlled by the global variable '*Tsm'. See
doc/ref.html#transient-io and doc/refT.html#*Tsm .
Is this a unique PicoLisp feature, or is it used in other
Lisps/languages? What's the motivation behind it?
It is most probably a unique feature of PicoLisp.
The motivation is to make it visually clear that transient symbols are
_not_ strings, but full-featured symbols. It is just that they can be
used like strings in other languages. Also, as transient symbols are
often used for function parameters and local variables, they look ugly
when shown in double quotes.
Underlines were chosen (above coloring or special fonts etc.) because
they are - perhaps besides reverse graphics - the only terminal markup
that also applies to white space.
tc.rucho made plmod which correctly handles transient symbols in
Emacs.
I have a vim-tsm (not released yet) describing a way to do the same
acceptably in 'vim'. Requires a patch to 'vim', however. Should I
include it into the release?
Up until picoLisp-3.0.2 I had also changed the complete reference
documenation to show transient symbols with u and /u. There were
complaints, however, that this makes copy/paste of the examples
difficult, so I reverted the reference to double quote display.
Cheers,
- Alex
--
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe