1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
5 ;;;; Name: cl-symbols.lisp
6 ;;;; Purpose: Returns all defined Common Lisp symbols
7 ;;;; Programmer: Kevin M. Rosenberg
8 ;;;; Date Started: Apr 2000
10 ;;;; $Id: cl-symbols.lisp,v 1.5 2002/12/15 17:10:50 kevin Exp $
12 ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg
14 ;;;; KMRCL users are granted the rights to distribute and use this software
15 ;;;; as governed by the terms of the Lisp Lesser GNU Public License
16 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
17 ;;;; *************************************************************************
22 (append (cl-variables) (cl-functions)))
24 (defun cl-variables ()
26 (do-symbols (s 'common-lisp)
27 (multiple-value-bind (sym status)
28 (find-symbol (symbol-name s) 'common-lisp)
29 (when (and (or (eq status :external)
30 (eq status :internal))
35 (defun cl-functions ()
37 (do-symbols (s 'common-lisp)
38 (multiple-value-bind (sym status)
39 (find-symbol (symbol-name s) 'common-lisp)
40 (when (and (or (eq status :external)
41 (eq status :internal))
48 (defun concat-symbol-pkg (pkg &rest args)
49 (declare (dynamic-extent args))
50 (flet ((stringify (arg)
56 (let ((str (apply #'concatenate 'string (mapcar #'stringify args))))
57 (intern #-case-sensitive (string-upcase str)
59 (if pkg pkg *package*)))))
62 (defun concat-symbol (&rest args)
63 (apply #'concat-symbol-pkg nil args))
65 (defun ensure-keyword (name)
66 "Returns keyword for a name"
69 (string (intern #-case-sensitive (string-upcase name)
72 (symbol (intern (symbol-name name) :keyword))))