1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-02 04:40:29 +02:00

handle pre-module macro procedures correctly

* module/ice-9/psyntax.scm (chi-macro): It's possible for a macro
  procedure to have no module, if the procedure was made before modules
  were booted.

* module/ice-9/psyntax-pp.scm: Regenerated.
This commit is contained in:
Andy Wingo 2009-04-24 19:59:42 +02:00
parent 6e26b23c5d
commit 34ad4f83ca
2 changed files with 19 additions and 12 deletions

File diff suppressed because one or more lines are too long

View file

@ -1206,7 +1206,14 @@
(if rib
(cons rib (cons 'shift s))
(cons 'shift s)))
(cons 'hygiene (module-name (procedure-module p)))))))) ;; hither the hygiene
(let ((pmod (procedure-module p)))
(if pmod
;; hither the hygiene
(cons 'hygiene (module-name pmod))
;; but it's possible for the proc to have
;; no mod, if it was made before modules
;; were booted
'(hygiene guile))))))))
((vector? x)
(let* ((n (vector-length x)) (v (make-vector n)))
(do ((i 0 (fx+ i 1)))