broken.el (check-broken-facility): New macro.
authorakr <akr>
Sat, 17 Oct 1998 08:48:31 +0000 (08:48 +0000)
committerakr <akr>
Sat, 17 Oct 1998 08:48:31 +0000 (08:48 +0000)
ChangeLog
broken.el

index 897f4ae..a61639d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+1998-10-17  Tanaka Akira  <morioka@jaist.ac.jp>
+
+       * broken.el (check-broken-facility): New macro.
+
 1998-10-16  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
 
        * poe.el (define-obsolete-function-alias): New function.
index 553f6bd..af91df2 100644 (file)
--- a/broken.el
+++ b/broken.el
@@ -80,6 +80,17 @@ If ASSERTION is not ommited and evaluated to nil and NO-NOTICE is nil, it is not
   (unless (broken-p facility)
     `(progn . ,body)))
 
+(defmacro check-broken-facility (facility)
+  "Check FACILITY is broken or not. If the status is different on
+compile(macro expansion) time and run time, warn it."
+  `(if-broken ,facility
+       (unless (broken-p ',facility)
+        (message "COMPILE TIME ONLY BROKEN FACILITY DETECTED: %s" 
+                 (broken-facility-description ',facility)))
+     (when (broken-p ',facility)
+       (message "RUN TIME ONLY BROKEN FACILITY DETECTED: %s" 
+               (broken-facility-description ',facility)))))
+
 
 ;;; @ end
 ;;;