;; Copyright (C) 1995,1996,1997 Free Software Foundation, Inc.
;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Version: $Id: mime-def.el,v 0.32 1997-02-28 04:57:30 tmorioka Exp $
+;; Version: $Id: mime-def.el,v 0.35 1997-02-28 06:46:48 tmorioka Exp $
;; Keywords: definition, MIME, multimedia, mail, news
;; This file is part of SEMI (SEMI is Emacs MIME Interfaces).
;;; Code:
+(require 'cl)
+
+
;;; @ variables
;;;
)))
(defun field-unify (a b)
- (let ((sym (intern (concat "field-unifier-for-" (symbol-value (car a))))))
+ (let ((sym (intern (concat "field-unifier-for-" (symbol-name (car a))))))
(or (fboundp sym)
(setq sym (function field-unifier-for-default))
)
(add-hook hook-name func)
))
+(defmacro defun-maybe (name &rest everything-else)
+ (or (and (fboundp name)
+ (not (get name 'defun-maybe))
+ )
+ `(or (fboundp (quote ,name))
+ (progn
+ (defun ,name ,@everything-else)
+ (put (quote ,name) 'defun-maybe t)
+ ))
+ ))
+
+(put 'defun-maybe 'lisp-indent-function 'defun)
+
+(defun-maybe functionp (obj)
+ "Returns t if OBJ is a function, nil otherwise.
+\[XEmacs emulating function]"
+ (or (subrp obj)
+ (byte-code-function-p obj)
+ (and (symbolp obj)(fboundp obj))
+ (and (consp obj)(eq (car obj) 'lambda))
+ ))
+
;;; @ end
;;;