From 551b53f0a6ebb72eeb165c63a4db635121650fb5 Mon Sep 17 00:00:00 2001 From: gerd <gerd> Date: Wed, 5 Feb 2003 12:33:12 +0000 Subject: [PATCH] Add a hook for use by PCL. * compiler/proclaim.lisp (*proclaimation-hooks*): New variable. (proclaim): Call hooks. --- compiler/proclaim.lisp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/compiler/proclaim.lisp b/compiler/proclaim.lisp index 133debe3a..7dc1455df 100644 --- a/compiler/proclaim.lisp +++ b/compiler/proclaim.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/proclaim.lisp,v 1.38 2003/02/05 11:08:42 gerd Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/proclaim.lisp,v 1.39 2003/02/05 12:33:12 gerd Exp $") ;;; ;;; ********************************************************************** ;;; @@ -325,6 +325,8 @@ (defun %declaim (x) (proclaim x)) +(defvar *proclamation-hooks* nil) + ;;; PROCLAIM -- Public ;;; ;;; This function is the guts of proclaim, since it does the global @@ -333,6 +335,10 @@ (defun proclaim (form) (unless (consp form) (error "Malformed PROCLAIM spec: ~S." form)) + + (when (boundp '*proclamation-hooks*) + (dolist (hook *proclamation-hooks*) + (funcall hook form))) (let ((kind (first form)) (args (rest form))) -- GitLab