;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; ;;;; Name: cl-symbols.lisp ;;;; Purpose: Returns all defined Common Lisp symbols ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; ;;;; $Id: cl-symbols.lisp,v 1.2 2002/10/06 13:30:17 kevin Exp $ ;;;; ;;;; This file, part of Kmrcl, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; ;;;; Kmrcl users are granted the rights to distribute and use this software ;;;; as governed by the terms of the GNU General Public License. ;;;; ************************************************************************* (in-package :kmrcl) (defun cl-symbols () (append (cl-variables) (cl-functions))) (defun cl-variables () (let ((vars '())) (do-symbols (s 'common-lisp) (multiple-value-bind (sym status) (find-symbol (symbol-name s) 'common-lisp) (when (and (or (eq status :external) (eq status :internal)) (boundp sym)) (push sym vars)))) (nreverse vars))) (defun cl-functions () (let ((funcs '())) (do-symbols (s 'common-lisp) (multiple-value-bind (sym status) (find-symbol (symbol-name s) 'common-lisp) (when (and (or (eq status :external) (eq status :internal)) (fboundp sym)) (push sym funcs)))) (nreverse funcs)))