1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-02 21:10:27 +02:00

deprecate has-suffix?

* module/ice-9/boot-9.scm:
* module/ice-9/deprecated.scm (has-suffix?): Deprecate.

* test-suite/guile-test:
* benchmark-suite/guile-benchmark: Fix uses of deprecated has-suffix?.
This commit is contained in:
Andy Wingo 2010-06-11 01:35:41 +02:00
parent 02b582cef5
commit 010b159f56
4 changed files with 12 additions and 7 deletions

View file

@ -592,6 +592,8 @@ If there is no handler at all, Guile prints an error and then exits."
;;; {Keywords}
;;;
;;; It's much better if you can use lambda* / define*, of course.
(define (kw-arg-ref args kw)
(let ((rem (member kw args)))
(and rem (pair? (cdr rem)) (cadr rem))))
@ -833,9 +835,6 @@ If there is no handler at all, Guile prints an error and then exits."
(if port (begin (close-port port) #t)
#f)))))
(define (has-suffix? str suffix)
(string-suffix? suffix str))
(define (system-error-errno args)
(if (eq? (car args) 'system-error)
(car (list-ref args 4))

View file

@ -42,7 +42,8 @@
error-catching-loop
error-catching-repl
scm-style-repl
apply-to-args)
apply-to-args
has-suffix?)
#:replace (module-ref-submodule module-define-submodule!))
@ -395,3 +396,8 @@ better yet, use the repl from `(system repl repl)'.")
(issue-deprecation-warning
"`apply-to-args' is deprecated. Include a local copy in your program.")
(apply fn args))
(define (has-suffix? str suffix)
(issue-deprecation-warning
"`has-suffix?' is deprecated. Use `string-suffix?' instead (args reversed).")
(string-suffix? suffix str))