From: akr Date: Fri, 11 Jun 1999 11:36:48 +0000 (+0000) Subject: * static.el (static-defconst): New function. X-Git-Tag: apel-9_20~29 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64c72f840d56c5f73d519205235d0d93834bae77;p=elisp%2Fapel.git * static.el (static-defconst): New function. --- 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 ;;;