mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
deprecation: Add a two-element form for simple aliases.
* guix/deprecation.scm (define-deprecated): Add a two-element form for simple aliases: (define-deprecated old new).
This commit is contained in:
parent
6b9839e29a
commit
6e36f1cabd
1 changed files with 6 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -44,6 +44,7 @@ (define-syntax define-deprecated
|
|||
"Define a deprecated variable or procedure, along these lines:
|
||||
|
||||
(define-deprecated foo bar 42)
|
||||
(define-deprecated old new)
|
||||
(define-deprecated (baz x y) qux (qux y x))
|
||||
|
||||
This will write a deprecation warning to GUIX-WARNING-PORT."
|
||||
|
@ -73,7 +74,10 @@ (define-syntax variable
|
|||
#'(real args (... ...)))
|
||||
(id
|
||||
(identifier? #'id)
|
||||
#'real))))))))))
|
||||
#'real)))))))
|
||||
((_ variable alias)
|
||||
(identifier? #'alias)
|
||||
#'(define-deprecated variable alias alias)))))
|
||||
|
||||
(define-syntax-rule (define-deprecated/alias deprecated replacement)
|
||||
"Define as an alias a deprecated variable, procedure, or macro, along
|
||||
|
|
Loading…
Reference in a new issue