X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fsafe-utility-defs.scm;h=9591edb4f55ba43820447c7c5f3f4d37372227d3;hb=47db9a3883d726ca53e2133a3b2298f78dd6a32e;hp=57941b2b9ab5ec3b2b77e1a96282736ea6c90642;hpb=07f7ea94c774c7b746a0e7b703bc4a709b73eabf;p=lilypond.git diff --git a/scm/safe-utility-defs.scm b/scm/safe-utility-defs.scm index 57941b2b9a..9591edb4f5 100644 --- a/scm/safe-utility-defs.scm +++ b/scm/safe-utility-defs.scm @@ -1,6 +1,6 @@ ;;;; This file is part of LilyPond, the GNU music typesetter. ;;;; -;;;; Copyright (C) 1998--2012 Jan Nieuwenhuizen +;;;; Copyright (C) 1998--2015 Jan Nieuwenhuizen ;;;; Han-Wen Nienhuys ;;;; ;;;; LilyPond is free software: you can redistribute it and/or modify @@ -19,12 +19,16 @@ ;;; Author Ian Hulin ;;; Date 16 October 2011 ;;; - + (define-module (scm safe-utility-defs) -#:use-module (ice-9 optargs) -#:export (safe-objects) -#:export-syntax (define-safe-public) -#:re-export-syntax (define*-public)) + #:use-module (ice-9 optargs) + #:export (safe-objects) + #:export-syntax (define-safe-public) + #:re-export-syntax (define*-public)) + +(if (string>? (version) "1.9.10") + (use-modules (ice-9 curried-definitions))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Safe definitions utility @@ -44,8 +48,9 @@ LilyPond safe mode. The syntax is the same as `define*-public'." (let ((safe-symbol (get-symbol arglist))) `(begin - (define*-public ,arglist + (define* ,arglist ,@body) (set! safe-objects (cons (cons ',safe-symbol ,safe-symbol) safe-objects)) + (export ,safe-symbol) ,safe-symbol)))