Skip to content

Commit

Permalink
0.7.8.25:
Browse files Browse the repository at this point in the history
	Reimplement DEFMACRO-MUNDANELY as (LET () (SB!XC:DEFMACRO ...)).
		(still doesn't fix the problem of borken macro lambda
		lists as reported by DESCRIBE 'WITH-OPEN-FILE, alas,
		but seems nice for OAOOness)
	added tonyms bug report: :SB-FLUID not working
  • Loading branch information
William Harold Newman committed Oct 10, 2002
1 parent b062a0c commit e317c20
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 18 deletions.
5 changes: 5 additions & 0 deletions BUGS
Expand Up @@ -1236,6 +1236,11 @@ WORKAROUND:
b. The body of (EVAL-WHEN (:COMPILE-TOPLEVEL) ...) is evaluated in
the null lexical environment.

206: ":SB-FLUID feature broken"
(reported by Antonio Martinez-Shotton sbcl-devel 2002-10-07)
Enabling :SB-FLUID in the target-features list in sbcl-0.7.8 breaks
the build.

DEFUNCT CATEGORIES OF BUGS
IR1-#:
These labels were used for bugs related to the old IR1 interpreter.
Expand Down
36 changes: 19 additions & 17 deletions src/code/defmacro.lisp
Expand Up @@ -106,21 +106,23 @@
;;; DEFMACRO-MUNDANELY is like SB!XC:DEFMACRO, except that it doesn't
;;; have any EVAL-WHEN or IR1 magic associated with it, so it only
;;; takes effect in :LOAD-TOPLEVEL or :EXECUTE situations.
;;;
;;; FIXME: It'd probably be good (especially for DEFMACRO)
;;; to make this share more code with DEFMACRO.
(def!macro defmacro-mundanely (name lambda-list &body body)
(let ((whole (gensym "WHOLE-"))
(environment (gensym "ENVIRONMENT-")))
(multiple-value-bind (new-body local-decs doc)
(parse-defmacro lambda-list whole body name 'defmacro
:environment environment)
`(progn
(setf (sb!xc:macro-function ',name)
(lambda (,whole ,environment)
,@local-decs
(block ,name
,new-body)))
(setf (fdocumentation ',name 'macro)
,doc)
',name))))

;; old way:
;;(let ((whole (gensym "WHOLE-"))
;; (environment (gensym "ENVIRONMENT-")))
;; (multiple-value-bind (new-body local-decs doc)
;; (parse-defmacro lambda-list whole body name 'defmacro
;; :environment environment)
;; `(progn
;; (setf (sb!xc:macro-function ',name)
;; (lambda (,whole ,environment)
;; ,@local-decs
;; (block ,name
;; ,new-body)))
;; (setf (fdocumentation ',name 'macro)
;; ,doc)
;; ',name)))

`(let ()
(sb!xc:defmacro ,name ,lambda-list ,@body)))
2 changes: 1 addition & 1 deletion version.lisp-expr
Expand Up @@ -18,4 +18,4 @@
;;; internal versions off the main CVS branch, it gets hairier, e.g.
;;; "0.pre7.14.flaky4.13".)

"0.7.8.24"
"0.7.8.25"

0 comments on commit e317c20

Please sign in to comment.