X-Git-Url: http://git.kpe.io/?p=kmrcl.git;a=blobdiff_plain;f=cl-symbols.lisp;fp=cl-symbols.lisp;h=0000000000000000000000000000000000000000;hp=ab709f6a76ac7b9734186a850567c47ef93ac205;hb=4de7f25a69c218303f170314ac26217770a531ed;hpb=aa610805927518a648eb0da6a8713cd0a83337df diff --git a/cl-symbols.lisp b/cl-symbols.lisp deleted file mode 100644 index ab709f6..0000000 --- a/cl-symbols.lisp +++ /dev/null @@ -1,72 +0,0 @@ -;;;; -*- 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.5 2002/12/15 17:10:50 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 Lisp Lesser GNU Public License -;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL. -;;;; ************************************************************************* - -(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))) - -;;; Symbol functions - -(defun concat-symbol-pkg (pkg &rest args) - (declare (dynamic-extent args)) - (flet ((stringify (arg) - (etypecase arg - (string - (string-upcase arg)) - (symbol - (symbol-name arg))))) - (let ((str (apply #'concatenate 'string (mapcar #'stringify args)))) - (intern #-case-sensitive (string-upcase str) - #+case-sensitive str - (if pkg pkg *package*))))) - - -(defun concat-symbol (&rest args) - (apply #'concat-symbol-pkg nil args)) - -(defun ensure-keyword (name) - "Returns keyword for a name" - (etypecase name - (keyword name) - (string (intern #-case-sensitive (string-upcase name) - #+case-sensitive name - :keyword)) - (symbol (intern (symbol-name name) :keyword))))