4
|
1 ;;; tl-atype.el --- atype functions
|
|
2
|
|
3 ;; Copyright (C) 1994,1995,1996 Free Software Foundation, Inc.
|
155
|
4 ;; Copyright (C) 1997 MORIOKA Tomohiko
|
4
|
5
|
|
6 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
|
155
|
7 ;; Version: $Id: tl-atype.el,v 1.3 1997/06/06 00:57:42 steve Exp $
|
4
|
8 ;; Keywords: atype
|
|
9
|
155
|
10 ;; This file is part of XEmacs.
|
4
|
11
|
|
12 ;; This program is free software; you can redistribute it and/or
|
|
13 ;; modify it under the terms of the GNU General Public License as
|
|
14 ;; published by the Free Software Foundation; either version 2, or (at
|
|
15 ;; your option) any later version.
|
|
16
|
|
17 ;; This program is distributed in the hope that it will be useful, but
|
|
18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
20 ;; General Public License for more details.
|
|
21
|
|
22 ;; You should have received a copy of the GNU General Public License
|
|
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
|
|
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
25 ;; Boston, MA 02111-1307, USA.
|
|
26
|
|
27 ;;; Code:
|
|
28
|
|
29 (require 'tl-list)
|
155
|
30 (require 'atype)
|
4
|
31
|
|
32
|
|
33 ;;; @ field
|
|
34 ;;;
|
|
35
|
|
36 (defalias 'fetch-field 'assoc)
|
|
37 (defalias 'fetch-field-value 'assoc-value)
|
|
38 (defalias 'put-field 'put-alist)
|
|
39 (defalias 'delete-field 'del-alist)
|
|
40
|
|
41 (defun put-fields (tp c)
|
|
42 (catch 'tag
|
|
43 (let ((r tp) f ret)
|
|
44 (while r
|
|
45 (setq f (car r))
|
|
46 (if (not (if (setq ret (fetch-field (car f) c))
|
|
47 (equal (cdr ret)(cdr f))
|
|
48 (setq c (cons f c))
|
|
49 ))
|
|
50 (throw 'tag 'error))
|
|
51 (setq r (cdr r))
|
|
52 ))
|
|
53 c))
|
|
54
|
|
55
|
|
56 ;;; @ end
|
|
57 ;;;
|
|
58
|
|
59 (provide 'tl-atype)
|
|
60
|
|
61 ;;; tl-atype.el ends here
|