Do you know where can I get the source of a predicate in Common Lisp? (The content of the predicate, if you prefer.) For example, source code of setq, string= etc.
Thanks !
Common Lisp development environments typically provide a way to look up definitions in the file with the source code.
Alternatively, FUNCTION-LAMBDA-EXPRESSION
might be able to recover the source of a predicate and other functions, if the Lisp environment has been configured to save the definitions.
You can also search in the lisp files of open source lisp implementations. For example, in Clozure CL setq
is defined in the compiler/nx1.lisp file of the distribution. A tip is to place a space in the front of the search word to bypass matches like (setq
.
For at least SBCL, SLIME can look up the definitions by pressing "M-.", however you need to have compiled SBCL from source for this to work, as the path to the source definitions are embedded in the binary, and if you use a binary distribution you are probably not going to have the source files in the same location.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With