From 64c72f840d56c5f73d519205235d0d93834bae77 Mon Sep 17 00:00:00 2001 From: akr Date: Fri, 11 Jun 1999 11:36:48 +0000 Subject: [PATCH] * static.el (static-defconst): New function. --- ChangeLog | 4 ++++ static.el | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 12e48bb..b7dd688 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +1999-06-11 Tanaka Akira + + * static.el (static-defconst): New function. + 1999-06-04 MORIOKA Tomohiko * pces-xfc.el (insert-file-contents-literally-treats-binary): New diff --git a/static.el b/static.el index 0dde589..a47eb05 100644 --- a/static.el +++ b/static.el @@ -60,6 +60,14 @@ (` ((, (car h)) (quote (progn (,@ (cdr h)))))))) handlers)))))) +(defmacro static-defconst (symbol initvalue docstring) + "`defconst' expression but INITVALUE is evaluated at compile-time. + +The variable SYMBOL can be referenced at either compile-time or run-time." + (let ((value (eval initvalue))) + (eval (` (defconst (, symbol) (quote (, value)) (, docstring)))) + (` (defconst (, symbol) (quote (, value)) (, docstring))))) + ;;; @ end ;;; -- 1.7.10.4