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