The termp Reference Manual

This is the termp Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Jul 13 22:09:34 2025 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 termp

Check if we are in a dumb or real terminal. Provide the termp check and a quit function.

Author

vindarel

License

MIT

Long Description

Are we running inside a real or a dumb terminal window?

Adapt your logic for the terminal or for Slime.

A small utility that I use in [progressons](https://github.com/vindarel/progressons) and that I ~~might~~ re-use.

~~~lisp
(defvar *termp*) ; Unbound by default.

(defun termp (&key force)
"Return T if we run on a terminal.
This must fail on Slime (on Emacs’ default shell prompt) and succeed on a Lisp in a terminal window."
(if (and (not force)
(boundp ’*termp*))
*termp*
(setf *termp* (not (equalp "dumb" (uiop:getenv "TERM"))))))
~~~

There is also ‘termp:quit &optional code‘: quit the Lisp image (‘uiop:quit‘) only if we are in a non-dumb terminal. Helps to test scripts.


## Installation

This library is on [Ultralisp](https://ultralisp.org/github).

## Licence

WTFPL

Version

0.1

Source

termp.asd.

Child Component

termp.lisp (file).


3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 termp/termp.asd

Source

termp.asd.

Parent Component

termp (system).

ASDF Systems

termp.


3.1.2 termp/termp.lisp

Source

termp.asd.

Parent Component

termp (system).

Packages

termp.

Public Interface
Internals

*termp* (special variable).


4 Packages

Packages are listed by definition order.


4.1 termp

Source

termp.lisp.

Use List

common-lisp.

Public Interface
Internals

*termp* (special variable).


5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Ordinary functions

Function: quit (&optional status message)

If we are in a real terminal, really quit. Otherwise, error out.

Package

termp.

Source

termp.lisp.

Function: termp (&key force)

Return T if we run on a terminal.
This must fail on Slime (on Emacs’ default shell prompt) and succeed on a Lisp in a terminal window.

Package

termp.

Source

termp.lisp.


5.2 Internals


5.2.1 Special variables

Special Variable: *termp*
Package

termp.

Source

termp.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions


A.3 Variables

Jump to:   *  
S  
Index Entry  Section

*
*termp*: Private special variables

S
Special Variable, *termp*: Private special variables