home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / lisp / ilisp / ilisp-sym.el < prev    next >
Encoding:
Text File  |  1995-01-26  |  1.4 KB  |  49 lines

  1. ;;; -*- Mode: Emacs-Lisp -*-
  2.  
  3. ;;; ilisp-sym.el --
  4.  
  5. ;;; This file is part of ILISP.
  6. ;;; Version: 5.7
  7. ;;;
  8. ;;; Copyright (C) 1990, 1991, 1992, 1993 Chris McConnell
  9. ;;;               1993, 1994 Ivan Vasquez
  10. ;;;               1994, 1995 Marco Antoniotti and Rick Busdiecker
  11. ;;;
  12. ;;; Other authors' names for which this Copyright notice also holds
  13. ;;; may appear later in this file.
  14. ;;;
  15. ;;; Send mail to 'ilisp-request@lehman.com' to be included in the
  16. ;;; ILISP mailing list. 'ilisp@lehman.com' is the general ILISP
  17. ;;; mailing list were bugs and improvements are discussed.
  18. ;;;
  19. ;;; ILISP is freely redistributable under the terms found in the file
  20. ;;; COPYING.
  21.  
  22.  
  23.  
  24. ;;;
  25. ;;; ILISP Lisp symbol utils.
  26. ;;;
  27.  
  28. ;;;%%Symbol
  29. (defun lisp-symbol (package delimiter name)
  30.   "Create a LISP symbol."
  31.   (list package (if package (or delimiter "::")) name))
  32. (defun lisp-symbol-name (symbol)
  33.   "Return the name of SYMBOL."
  34.   (car (cdr (cdr symbol))))
  35. (defun lisp-symbol-package (symbol)
  36.   "Return the package of SYMBOL."
  37.   (car symbol))
  38. (defun lisp-symbol-delimiter (symbol)
  39.   "Return the qualifier of SYMBOL."
  40.   (car (cdr symbol)))
  41.  
  42. ;;;
  43. (defun lisp-symbol= (symbol1 symbol2)
  44.   "Return T is SYMBOL1 is equal to SYMBOL2."
  45.   (and (string= (lisp-symbol-name symbol1) (lisp-symbol-name symbol2))
  46.        (string= (lisp-symbol-package symbol1) (lisp-symbol-package symbol2))
  47.        (string= (lisp-symbol-delimiter symbol1)
  48.         (lisp-symbol-delimiter symbol2))))
  49.