All Manuals > LispWorks® User Guide and Reference Manual > 37 The HCL Package

current-function-name Function

Summary

Return the name of the currently executing function as a string.

Package

hcl

Signature

current-function-name => name

Values
name
A string or nil.
Description

The function current-function-name returns the name of the currently executing function as a string.

name is a string representing the name of the function from which current-function-name is called. The result is generated by prin1-to-string with the variable *package* bound to the KEYWORD package.

Notes

current-function-name is for use in debugging, for example to give more context in a run time error message that is produced by a macroexpansion.

The result when current-function-name is called outside a function (in a Listener or at the top level of a file) is not well defined. It is either nil or a name of some internally generated function.


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:35