From 75534f83032853dfc2a23b2a1781f6223843f47a Mon Sep 17 00:00:00 2001 From: tmorioka Date: Thu, 27 Feb 1997 08:18:16 +0000 Subject: [PATCH] (call-after-loaded): New function; imported from tl-misc.el; Don't require tl-misc. --- semi-setup.el | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/semi-setup.el b/semi-setup.el index 66309d3..30095d1 100644 --- a/semi-setup.el +++ b/semi-setup.el @@ -1,9 +1,9 @@ -;;; mime-setup.el --- setup file for MIME-View. +;;; semi-setup.el --- setup file for MIME-View. ;; Copyright (C) 1994,1995,1996,1997 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko -;; Version: $Id: semi-setup.el,v 0.2 1997-02-21 06:44:40 tmorioka Exp $ +;; Version: $Id: semi-setup.el,v 0.3 1997-02-27 08:18:16 tmorioka Exp $ ;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word ;; This file is part of SEMI (SEMI is Emacs MIME Interfaces). @@ -25,7 +25,21 @@ ;;; Code: -(require 'tl-misc) +;;; @ 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) + )) ;;; @ for mime-view -- 1.7.10.4