(call-after-loaded): Moved from semi-def.el.
authormorioka <morioka>
Wed, 17 Jun 1998 21:34:18 +0000 (21:34 +0000)
committermorioka <morioka>
Wed, 17 Jun 1998 21:34:18 +0000 (21:34 +0000)
semi-setup.el

index 113606e..e7decc8 100644 (file)
 (require 'semi-def)
 (require 'path-util)
 
+(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 image/* and X-Face
 (defvar mime-setup-enable-inline-image