From 4012f53ab5a667ca9161a5bcc63d253f12570cb4 Mon Sep 17 00:00:00 2001 From: tmorioka Date: Fri, 28 Feb 1997 04:50:13 +0000 Subject: [PATCH] (call-after-loaded): New function; moved from semi-setup.el. --- mime-def.el | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/mime-def.el b/mime-def.el index 958a37f..7f94bfc 100644 --- a/mime-def.el +++ b/mime-def.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1995,1996,1997 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko -;; Version: $Id: mime-def.el,v 0.29 1997-02-27 08:58:13 tmorioka Exp $ +;; Version: $Id: mime-def.el,v 0.30 1997-02-28 04:50:13 tmorioka Exp $ ;; Keywords: definition, MIME, multimedia, mail, news ;; This file is part of SEMI (SEMI is Emacs MIME Interfaces). @@ -386,6 +386,23 @@ ROT47 will be performed for Japanese text in any case." )) +;;; @ Other Utility +;;; + +(defun call-after-loaded (module func &optional hook-name) + "If MODULE is provided, then FUNC is called. +Otherwise func is set to MODULE-load-hook. +If optional argument HOOK-NAME is specified, +it is used as hook to set." + (if (featurep module) + (funcall func) + (or hook-name + (setq hook-name (intern (concat (symbol-name module) "-load-hook"))) + ) + (add-hook hook-name func) + )) + + ;;; @ end ;;; -- 1.7.10.4