;; Copyright (C) 1995,1996,1997 Free Software Foundation, Inc.
;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Version: $Id: mime-def.el,v 0.33 1997-02-28 05:01:58 tmorioka Exp $
+;; Version: $Id: mime-def.el,v 0.34 1997-02-28 05:29:00 tmorioka Exp $
;; Keywords: definition, MIME, multimedia, mail, news
;; This file is part of SEMI (SEMI is Emacs MIME Interfaces).
(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
;;;