mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-29 12:14:31 -06:00
Improve cond-expand/eval-when usage based on feedback from the guile developers
Basically two things: - whenever eval-when is used, the expand keyword should be added (not yet documented) - eval-when is not needed for use-modules, because use-modules is a macro that performs the eval-when by itself git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23460 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
da57bb7f0b
commit
7581076364
@ -26,7 +26,7 @@
|
||||
(cond-expand
|
||||
(guile-2
|
||||
(eval-when
|
||||
(compile load eval)
|
||||
(compile load eval expand)
|
||||
(gnc:module-load "gnucash/engine" 0)))
|
||||
(else
|
||||
(gnc:module-load "gnucash/engine" 0)))
|
||||
|
@ -11,7 +11,7 @@
|
||||
(cond-expand
|
||||
(guile-2
|
||||
(eval-when
|
||||
(compile load eval)
|
||||
(compile load eval expand)
|
||||
(load-extension "libgnc-core-utils" "scm_init_sw_core_utils_module")))
|
||||
(else
|
||||
(load-extension "libgnc-core-utils" "scm_init_sw_core_utils_module")))
|
||||
|
@ -12,7 +12,7 @@
|
||||
(cond-expand
|
||||
(guile-2
|
||||
(eval-when
|
||||
(compile load eval)
|
||||
(compile load eval expand)
|
||||
(load-extension "libgnc-module" "scm_init_sw_gnc_module_module")))
|
||||
(else
|
||||
(load-extension "libgnc-module" "scm_init_sw_gnc_module_module")))
|
||||
|
@ -13,7 +13,7 @@
|
||||
(cond-expand
|
||||
(guile-2
|
||||
(eval-when
|
||||
(compile load eval)
|
||||
(compile load eval expand)
|
||||
(load-extension "libgnc-gnome" "scm_init_sw_gnome_module")))
|
||||
(else
|
||||
(load-extension "libgnc-gnome" "scm_init_sw_gnome_module")))
|
||||
|
@ -41,9 +41,7 @@
|
||||
(use-modules (ice-9 regex)) ; for regular expressions
|
||||
(cond-expand
|
||||
(guile-2
|
||||
(eval-when
|
||||
(compile load eval)
|
||||
(use-modules (ice-9 local-eval)))) ; for the-environment
|
||||
(use-modules (ice-9 local-eval))) ; for the-environment
|
||||
(else ))
|
||||
(use-modules (srfi srfi-13)) ; for extra string functions
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
(cond-expand
|
||||
(guile-2
|
||||
(eval-when
|
||||
(compile load eval)
|
||||
(compile load eval expand)
|
||||
(define gnc:menuname-business-reports (N_ "_Business"))))
|
||||
(else
|
||||
(define gnc:menuname-business-reports (N_ "_Business"))))
|
||||
|
@ -26,9 +26,7 @@
|
||||
|
||||
(cond-expand
|
||||
(guile-2
|
||||
(eval-when
|
||||
(compile load eval)
|
||||
(use-modules (ice-9 local-eval)))) ; for the-environment
|
||||
(use-modules (ice-9 local-eval))) ; for the-environment
|
||||
(else ))
|
||||
(use-modules (gnucash main))
|
||||
(use-modules (gnucash gnc-module))
|
||||
|
@ -87,9 +87,7 @@
|
||||
(use-modules (ice-9 rdelim)) ; for read-line
|
||||
(cond-expand
|
||||
(guile-2
|
||||
(eval-when
|
||||
(compile load eval)
|
||||
(use-modules (ice-9 local-eval)))) ; for the-environment
|
||||
(use-modules (ice-9 local-eval))) ; for the-environment
|
||||
(else ))
|
||||
(use-modules (gnucash printf))
|
||||
(use-modules (gnucash app-utils)) ; for _
|
||||
|
@ -11,7 +11,7 @@
|
||||
(cond-expand
|
||||
(guile-2
|
||||
(define-syntax-rule (begin-for-syntax form ...)
|
||||
(eval-when (load compile eval) (begin form ...))))
|
||||
(eval-when (load compile eval expand) (begin form ...))))
|
||||
(else
|
||||
(define begin-for-syntax begin)))
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
(cond-expand
|
||||
(guile-2
|
||||
(define-syntax-rule (begin-for-syntax form ...)
|
||||
(eval-when (load compile eval) (begin form ...))))
|
||||
(eval-when (load compile eval expand) (begin form ...))))
|
||||
(else
|
||||
(define begin-for-syntax begin)))
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
(cond-expand
|
||||
(guile-2
|
||||
(define-syntax-rule (begin-for-syntax form ...)
|
||||
(eval-when (load compile eval) (begin form ...))))
|
||||
(eval-when (load compile eval expand) (begin form ...))))
|
||||
(else
|
||||
(define begin-for-syntax begin)))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user