From ad20f859cc15e249c8d4443d4446c1a4d1cf6b81 Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Sun, 2 Aug 2020 22:56:06 +0800 Subject: [PATCH] [core-utils] define _ for guile-2.2 --- bindings/guile/core-utils.scm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bindings/guile/core-utils.scm b/bindings/guile/core-utils.scm index b64dd80ceb..073a19e892 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))))