gnucash maint: [core-utils] define _ for guile-2.2
Christopher Lam
clam at code.gnucash.org
Sun Aug 2 19:11:52 EDT 2020
Updated via https://github.com/Gnucash/gnucash/commit/ad20f859 (commit)
from https://github.com/Gnucash/gnucash/commit/2054e202 (commit)
commit ad20f859cc15e249c8d4443d4446c1a4d1cf6b81
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sun Aug 2 22:56:06 2020 +0800
[core-utils] define _ for guile-2.2
diff --git a/bindings/guile/core-utils.scm b/bindings/guile/core-utils.scm
index b64dd80ce..073a19e89 100644
--- a/bindings/guile/core-utils.scm
+++ b/bindings/guile/core-utils.scm
@@ -44,3 +44,11 @@
(define G_ gnc:gettext)
(define-syntax-rule (N_ x) x)
+;; the following will define _ to call gnc:gettext for guile up to
+;; 2.2. It may be removed in the future when minimum guile is 3.0.
+(cond-expand
+ (guile-3)
+ (guile-2
+ (define (_ x)
+ (issue-deprecation-warning "Using _ to call gettext is disallowed in guile-3 and will be removed in the future. Use G_ instead.")
+ (gnc:gettext x))))
Summary of changes:
bindings/guile/core-utils.scm | 8 ++++++++
1 file changed, 8 insertions(+)
More information about the gnucash-changes
mailing list