mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-07-04 00:30:30 +02:00
Deprecate srfi-14 in default environment
* libguile/srfi-14.c: * module/srfi/srfi-14.scm: Arrange to define bindings here instead of in the default environment. * libguile/init.c: * libguile/srfi-14.h: Fix so that srfi-14 can register an extension to be loaded later. * libguile/unidata_to_charset.awk: Rename private cs_letter_plus_digit to cs_letter_and_digit. * module/ice-9/deprecated.scm: Add deprecation trampolines for srfi-14. * module/ice-9/sandbox.scm: * module/language/elisp/lexer.scm: * module/language/scheme/decompile-tree-il.scm: * module/rnrs/unicode.scm: * module/sxml/simple.scm: * module/system/base/syntax.scm: * module/system/repl/server.scm: * module/texinfo/serialize.scm: * module/texinfo/string-utils.scm: * module/web/http.scm: * module/web/uri.scm: * test-suite/tests/strings.test: * test-suite/tests/tree-il.test: Adapt for srfi-14 being in a module.
This commit is contained in:
parent
7d899fa7c7
commit
4516119dd1
19 changed files with 330 additions and 148 deletions
|
@ -444,7 +444,7 @@ scm_i_init_guile (struct gc_stack_addr base)
|
||||||
scm_init_read ();
|
scm_init_read ();
|
||||||
scm_init_strorder ();
|
scm_init_strorder ();
|
||||||
scm_init_srfi_13 ();
|
scm_init_srfi_13 ();
|
||||||
scm_init_srfi_14 (); /* Requires smob_prehistory */
|
scm_boot_srfi_14 (); /* Requires smob_prehistory */
|
||||||
scm_init_exceptions ();
|
scm_init_exceptions ();
|
||||||
scm_init_throw (); /* Requires smob_prehistory */
|
scm_init_throw (); /* Requires smob_prehistory */
|
||||||
scm_init_version ();
|
scm_init_version ();
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include "bytevectors-internal.h"
|
#include "bytevectors-internal.h"
|
||||||
#include "chars.h"
|
#include "chars.h"
|
||||||
#include "eval.h"
|
#include "eval.h"
|
||||||
|
#include "extensions.h"
|
||||||
#include "gsubr.h"
|
#include "gsubr.h"
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
#include "modules.h"
|
#include "modules.h"
|
||||||
|
@ -40,6 +41,7 @@
|
||||||
#include "strings.h"
|
#include "strings.h"
|
||||||
#include "symbols.h"
|
#include "symbols.h"
|
||||||
#include "values.h"
|
#include "values.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#include "srfi-14.h"
|
#include "srfi-14.h"
|
||||||
|
|
||||||
|
@ -1971,35 +1973,11 @@ SCM_DEFINE (scm_char_set_diff_plus_intersection_x,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Standard character sets. */
|
|
||||||
|
|
||||||
SCM scm_char_set_lower_case;
|
|
||||||
SCM scm_char_set_upper_case;
|
|
||||||
SCM scm_char_set_title_case;
|
|
||||||
SCM scm_char_set_letter;
|
|
||||||
SCM scm_char_set_digit;
|
|
||||||
SCM scm_char_set_letter_and_digit;
|
|
||||||
SCM scm_char_set_graphic;
|
|
||||||
SCM scm_char_set_printing;
|
|
||||||
SCM scm_char_set_whitespace;
|
|
||||||
SCM scm_char_set_iso_control;
|
|
||||||
SCM scm_char_set_punctuation;
|
|
||||||
SCM scm_char_set_symbol;
|
|
||||||
SCM scm_char_set_hex_digit;
|
|
||||||
SCM scm_char_set_blank;
|
|
||||||
SCM scm_char_set_ascii;
|
|
||||||
SCM scm_char_set_empty;
|
|
||||||
SCM scm_char_set_designated;
|
|
||||||
SCM scm_char_set_full;
|
|
||||||
|
|
||||||
|
|
||||||
/* Create an empty character set and return it after binding it to NAME. */
|
/* Create an empty character set and return it after binding it to NAME. */
|
||||||
static inline SCM
|
static inline SCM
|
||||||
define_charset (const char *name, size_t len, const scm_t_char_range *ranges)
|
define_charset (size_t len, const scm_t_char_range *ranges)
|
||||||
{
|
{
|
||||||
SCM cs = scm_from_charset (make_static_charset (len, ranges));
|
return scm_from_charset (make_static_charset (len, ranges));
|
||||||
scm_c_define (name, cs);
|
|
||||||
return cs;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SCM_DEFINE (scm_sys_char_set_dump, "%char-set-dump", 1, 0, 0, (SCM charset),
|
SCM_DEFINE (scm_sys_char_set_dump, "%char-set-dump", 1, 0, 0, (SCM charset),
|
||||||
|
@ -2058,11 +2036,45 @@ SCM_DEFINE (scm_sys_char_set_dump, "%char-set-dump", 1, 0, 0, (SCM charset),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define DEFINE_CHARSET(name, stem) \
|
#define DECLARE_C_CHARSET(name, stem) \
|
||||||
define_charset ("char-set:" name, cs_##stem##_len, cs_##stem##_ranges)
|
SCM scm_char_set_##stem;
|
||||||
|
#define DEFINE_C_CHARSET(name, stem) \
|
||||||
|
scm_char_set_##stem = define_charset (cs_##stem##_len, cs_##stem##_ranges);
|
||||||
|
#define DEFINE_SCM_CHARSET(name, stem) \
|
||||||
|
scm_c_define ("char-set:" name, scm_char_set_##stem);
|
||||||
|
|
||||||
|
#define FOR_EACH_STANDARD_CHARSET(M) \
|
||||||
|
M ("upper-case", upper_case) \
|
||||||
|
M ("lower-case", lower_case) \
|
||||||
|
M ("title-case", title_case) \
|
||||||
|
M ("letter", letter) \
|
||||||
|
M ("digit", digit) \
|
||||||
|
M ("letter+digit", letter_and_digit) \
|
||||||
|
M ("graphic", graphic) \
|
||||||
|
M ("printing", printing) \
|
||||||
|
M ("whitespace", whitespace) \
|
||||||
|
M ("iso-control", iso_control) \
|
||||||
|
M ("punctuation", punctuation) \
|
||||||
|
M ("symbol", symbol) \
|
||||||
|
M ("hex-digit", hex_digit) \
|
||||||
|
M ("blank", blank) \
|
||||||
|
M ("ascii", ascii) \
|
||||||
|
M ("empty", empty) \
|
||||||
|
M ("designated", designated) \
|
||||||
|
M ("full", full)
|
||||||
|
|
||||||
|
FOR_EACH_STANDARD_CHARSET(DECLARE_C_CHARSET)
|
||||||
|
|
||||||
|
static void
|
||||||
|
scm_init_srfi_14 (void)
|
||||||
|
{
|
||||||
|
FOR_EACH_STANDARD_CHARSET (DEFINE_SCM_CHARSET);
|
||||||
|
|
||||||
|
#include "srfi-14.x"
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
scm_init_srfi_14 (void)
|
scm_boot_srfi_14 (void)
|
||||||
{
|
{
|
||||||
empty_charset_ranges =
|
empty_charset_ranges =
|
||||||
scm_i_make_typed_bytevector (0, SCM_ARRAY_ELEMENT_TYPE_U32);
|
scm_i_make_typed_bytevector (0, SCM_ARRAY_ELEMENT_TYPE_U32);
|
||||||
|
@ -2070,27 +2082,12 @@ scm_init_srfi_14 (void)
|
||||||
scm_tc16_charset_cursor = scm_make_smob_type ("char-set-cursor", 0);
|
scm_tc16_charset_cursor = scm_make_smob_type ("char-set-cursor", 0);
|
||||||
scm_set_smob_print (scm_tc16_charset_cursor, charset_cursor_print);
|
scm_set_smob_print (scm_tc16_charset_cursor, charset_cursor_print);
|
||||||
|
|
||||||
scm_char_set_upper_case = DEFINE_CHARSET ("upper-case", upper_case);
|
FOR_EACH_STANDARD_CHARSET (DEFINE_C_CHARSET);
|
||||||
scm_char_set_lower_case = DEFINE_CHARSET ("lower-case", lower_case);
|
|
||||||
scm_char_set_title_case = DEFINE_CHARSET ("title-case", title_case);
|
|
||||||
scm_char_set_letter = DEFINE_CHARSET ("letter", letter);
|
|
||||||
scm_char_set_digit = DEFINE_CHARSET ("digit", digit);
|
|
||||||
scm_char_set_letter_and_digit = DEFINE_CHARSET ("letter+digit",
|
|
||||||
letter_plus_digit);
|
|
||||||
scm_char_set_graphic = DEFINE_CHARSET ("graphic", graphic);
|
|
||||||
scm_char_set_printing = DEFINE_CHARSET ("printing", printing);
|
|
||||||
scm_char_set_whitespace = DEFINE_CHARSET ("whitespace", whitespace);
|
|
||||||
scm_char_set_iso_control = DEFINE_CHARSET ("iso-control", iso_control);
|
|
||||||
scm_char_set_punctuation = DEFINE_CHARSET ("punctuation", punctuation);
|
|
||||||
scm_char_set_symbol = DEFINE_CHARSET ("symbol", symbol);
|
|
||||||
scm_char_set_hex_digit = DEFINE_CHARSET ("hex-digit", hex_digit);
|
|
||||||
scm_char_set_blank = DEFINE_CHARSET ("blank", blank);
|
|
||||||
scm_char_set_ascii = DEFINE_CHARSET ("ascii", ascii);
|
|
||||||
scm_char_set_empty = DEFINE_CHARSET ("empty", empty);
|
|
||||||
scm_char_set_designated = DEFINE_CHARSET ("designated", designated);
|
|
||||||
scm_char_set_full = DEFINE_CHARSET ("full", full);
|
|
||||||
|
|
||||||
#include "srfi-14.x"
|
scm_c_register_extension ("libguile-" SCM_EFFECTIVE_VERSION,
|
||||||
|
"scm_init_srfi_14",
|
||||||
|
(scm_t_extension_init_func) scm_init_srfi_14,
|
||||||
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* End of srfi-14.c. */
|
/* End of srfi-14.c. */
|
||||||
|
|
|
@ -101,6 +101,6 @@ SCM_API SCM scm_char_set_full;
|
||||||
SCM_INTERNAL int scm_i_char_sets_equal (SCM a, SCM b);
|
SCM_INTERNAL int scm_i_char_sets_equal (SCM a, SCM b);
|
||||||
SCM_INTERNAL int scm_i_print_char_set (SCM charset, SCM port,
|
SCM_INTERNAL int scm_i_print_char_set (SCM charset, SCM port,
|
||||||
scm_print_state *pstate);
|
scm_print_state *pstate);
|
||||||
SCM_INTERNAL void scm_init_srfi_14 (void);
|
SCM_INTERNAL void scm_boot_srfi_14 (void);
|
||||||
|
|
||||||
#endif /* SCM_SRFI_14_H */
|
#endif /* SCM_SRFI_14_H */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# unidata_to_charset.awk --- Compute SRFI-14 charsets from UnicodeData.txt
|
# unidata_to_charset.awk --- Compute SRFI-14 charsets from UnicodeData.txt
|
||||||
#
|
#
|
||||||
# Copyright (C) 2009, 2010, 2022 Free Software Foundation, Inc.
|
# Copyright (C) 2009, 2010, 2022, 2025 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -79,7 +79,7 @@ BEGIN {
|
||||||
all_charsets[all_charsets_count++] = "letter";
|
all_charsets[all_charsets_count++] = "letter";
|
||||||
all_charsets[all_charsets_count++] = "digit";
|
all_charsets[all_charsets_count++] = "digit";
|
||||||
all_charsets[all_charsets_count++] = "hex_digit";
|
all_charsets[all_charsets_count++] = "hex_digit";
|
||||||
all_charsets[all_charsets_count++] = "letter_plus_digit";
|
all_charsets[all_charsets_count++] = "letter_and_digit";
|
||||||
all_charsets[all_charsets_count++] = "graphic";
|
all_charsets[all_charsets_count++] = "graphic";
|
||||||
all_charsets[all_charsets_count++] = "whitespace";
|
all_charsets[all_charsets_count++] = "whitespace";
|
||||||
all_charsets[all_charsets_count++] = "printing";
|
all_charsets[all_charsets_count++] = "printing";
|
||||||
|
@ -203,7 +203,7 @@ category == "Lt" ||
|
||||||
category == "Lm" ||
|
category == "Lm" ||
|
||||||
category == "Lo" {
|
category == "Lo" {
|
||||||
charsets[charset_count++] = "letter";
|
charsets[charset_count++] = "letter";
|
||||||
charsets[charset_count++] = "letter_plus_digit";
|
charsets[charset_count++] = "letter_and_digit";
|
||||||
}
|
}
|
||||||
|
|
||||||
## The digit character set
|
## The digit character set
|
||||||
|
@ -216,7 +216,7 @@ category == "Lo" {
|
||||||
|
|
||||||
category == "Nd" {
|
category == "Nd" {
|
||||||
charsets[charset_count++] = "digit";
|
charsets[charset_count++] = "digit";
|
||||||
charsets[charset_count++] = "letter_plus_digit";
|
charsets[charset_count++] = "letter_and_digit";
|
||||||
}
|
}
|
||||||
|
|
||||||
## The hex_digit character set
|
## The hex_digit character set
|
||||||
|
@ -327,9 +327,9 @@ category !~ /Cs/ {
|
||||||
## Other character sets
|
## Other character sets
|
||||||
#######################
|
#######################
|
||||||
|
|
||||||
# Note that the "letter_plus_digit" and "printing" character sets, which
|
# Note that the "letter_and_digit" and "printing" character sets, which
|
||||||
# are unions of other character sets, are included in the patterns
|
# are unions of other character sets, are included in the patterns
|
||||||
# matching their constituent parts (i.e., the "letter_plus_digit"
|
# matching their constituent parts (i.e., the "letter_and_digit"
|
||||||
# character set is included as part of the "letter" and "digit"
|
# character set is included as part of the "letter" and "digit"
|
||||||
# patterns).
|
# patterns).
|
||||||
#
|
#
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#:use-module (ice-9 source-properties)
|
#:use-module (ice-9 source-properties)
|
||||||
#:use-module (ice-9 weak-tables)
|
#:use-module (ice-9 weak-tables)
|
||||||
#:use-module (ice-9 arrays)
|
#:use-module (ice-9 arrays)
|
||||||
|
#:use-module (srfi srfi-14)
|
||||||
#:export ((make-guardian* . make-guardian)
|
#:export ((make-guardian* . make-guardian)
|
||||||
module-observe-weak
|
module-observe-weak
|
||||||
(make-object-property* . make-object-property)
|
(make-object-property* . make-object-property)
|
||||||
|
@ -44,17 +45,87 @@
|
||||||
(array-index-map!* . array-index-map!)
|
(array-index-map!* . array-index-map!)
|
||||||
(array-equal?* . array-equal?)
|
(array-equal?* . array-equal?)
|
||||||
(array-slice-for-each* . array-slice-for-each)
|
(array-slice-for-each* . array-slice-for-each)
|
||||||
(array-slice-for-each-in-order* . array-slice-for-each-in-order)))
|
(array-slice-for-each-in-order* . array-slice-for-each-in-order)
|
||||||
|
(char-set?* . char-set?)
|
||||||
|
(char-set=* . char-set=)
|
||||||
|
(char-set<=* . char-set<=)
|
||||||
|
(char-set-hash* . char-set-hash)
|
||||||
|
(char-set-cursor* . char-set-cursor)
|
||||||
|
(char-set-ref* . char-set-ref)
|
||||||
|
(char-set-cursor-next* . char-set-cursor-next)
|
||||||
|
(end-of-char-set?* . end-of-char-set?)
|
||||||
|
(char-set-fold* . char-set-fold)
|
||||||
|
(char-set-unfold* . char-set-unfold) char-set-unfold!
|
||||||
|
(char-set-for-each* . char-set-for-each)
|
||||||
|
(char-set-map* . char-set-map)
|
||||||
|
(char-set-copy* . char-set-copy)
|
||||||
|
(char-set* . char-set)
|
||||||
|
(list->char-set* . list->char-set)
|
||||||
|
(list->char-set!* . list->char-set!)
|
||||||
|
(string->char-set* . string->char-set)
|
||||||
|
(string->char-set!* . string->char-set!)
|
||||||
|
(char-set-filter* . char-set-filter)
|
||||||
|
(char-set-filter!* . char-set-filter!)
|
||||||
|
(ucs-range->char-set* . ucs-range->char-set)
|
||||||
|
(ucs-range->char-set!* . ucs-range->char-set!)
|
||||||
|
(->char-set* . ->char-set)
|
||||||
|
(char-set-size* . char-set-size)
|
||||||
|
(char-set-count* . char-set-count)
|
||||||
|
(char-set->list* . char-set->list)
|
||||||
|
(char-set->string* . char-set->string)
|
||||||
|
(char-set-contains?* . char-set-contains?)
|
||||||
|
(char-set-every* . char-set-every)
|
||||||
|
(char-set-any* . char-set-any)
|
||||||
|
(char-set-adjoin* . char-set-adjoin)
|
||||||
|
(char-set-adjoin!* . char-set-adjoin!)
|
||||||
|
(char-set-delete* . char-set-delete)
|
||||||
|
(char-set-delete!* . char-set-delete!)
|
||||||
|
(char-set-complement* . char-set-complement)
|
||||||
|
(char-set-union* . char-set-union)
|
||||||
|
(char-set-intersection* . char-set-intersection)
|
||||||
|
(char-set-difference* . char-set-difference)
|
||||||
|
(char-set-xor* . char-set-xor)
|
||||||
|
(char-set-diff+intersection* . char-set-diff+intersection)
|
||||||
|
(char-set-complement!* . char-set-complement!)
|
||||||
|
(char-set-union!* . char-set-union!)
|
||||||
|
(char-set-intersection!* . char-set-intersection!)
|
||||||
|
(char-set-difference!* . char-set-difference!)
|
||||||
|
(char-set-xor!* . char-set-xor!)
|
||||||
|
(char-set-diff+intersection!* . char-set-diff+intersection!)
|
||||||
|
(char-set:lower-case* . char-set:lower-case)
|
||||||
|
(char-set:upper-case* . char-set:upper-case)
|
||||||
|
(char-set:title-case* . char-set:title-case)
|
||||||
|
(char-set:letter* . char-set:letter)
|
||||||
|
(char-set:digit* . char-set:digit)
|
||||||
|
(char-set:letter+digit* . char-set:letter+digit)
|
||||||
|
(char-set:graphic* . char-set:graphic)
|
||||||
|
(char-set:printing* . char-set:printing)
|
||||||
|
(char-set:whitespace* . char-set:whitespace)
|
||||||
|
(char-set:iso-control* . char-set:iso-control)
|
||||||
|
(char-set:punctuation* . char-set:punctuation)
|
||||||
|
(char-set:symbol* . char-set:symbol)
|
||||||
|
(char-set:hex-digit* . char-set:hex-digit)
|
||||||
|
(char-set:blank* . char-set:blank)
|
||||||
|
(char-set:ascii* . char-set:ascii)
|
||||||
|
(char-set:empty* . char-set:empty)
|
||||||
|
(char-set:full* . char-set:full)))
|
||||||
|
|
||||||
#;
|
(define-syntax define-deprecated/stx
|
||||||
(define-syntax-rule (define-deprecated name message exp)
|
(lambda (stx)
|
||||||
(begin
|
(syntax-case stx ()
|
||||||
(define-syntax rule
|
((_ mod id)
|
||||||
(identifier-syntax
|
(let* ((id* (datum->syntax #'id
|
||||||
(begin
|
(symbol-append (syntax->datum #'id) '*)))
|
||||||
(issue-deprecation-warning message)
|
(msg (string-append
|
||||||
exp)))
|
(symbol->string (syntax->datum #'id))
|
||||||
(export rule)))
|
" in the default environment is deprecated.\n"
|
||||||
|
"Import it from " (object->string (syntax->datum #'mod))
|
||||||
|
" instead.")))
|
||||||
|
#`(define-syntax #,id*
|
||||||
|
(identifier-syntax
|
||||||
|
(begin
|
||||||
|
(issue-deprecation-warning #,msg)
|
||||||
|
#,#'id))))))))
|
||||||
|
|
||||||
(define-syntax define-deprecated-trampoline
|
(define-syntax define-deprecated-trampoline
|
||||||
(lambda (stx)
|
(lambda (stx)
|
||||||
|
@ -138,3 +209,102 @@
|
||||||
(apply array-cell-ref array indices))
|
(apply array-cell-ref array indices))
|
||||||
(define-deprecated-trampoline (((ice-9 arrays) array-cell-set!) array val . indices)
|
(define-deprecated-trampoline (((ice-9 arrays) array-cell-set!) array val . indices)
|
||||||
(apply array-cell-set! array val indices))
|
(apply array-cell-set! array val indices))
|
||||||
|
|
||||||
|
(define-deprecated-trampolines (ice-9 arrays)
|
||||||
|
(array-fill! array fill)
|
||||||
|
(array-copy! src dst)
|
||||||
|
(array-copy-in-order! src dst)
|
||||||
|
(array-index-map! array proc))
|
||||||
|
|
||||||
|
(define-deprecated-trampoline (((srfi srfi-14) char-set=) . char-sets)
|
||||||
|
(apply char-set= char-sets))
|
||||||
|
(define-deprecated-trampoline (((srfi srfi-14) char-set-hash) cs #:optional (bound 871))
|
||||||
|
(char-set-hash cs bound))
|
||||||
|
(define-deprecated-trampoline (((srfi srfi-14) char-set-unfold) p f g seed #:optional (base-cs (char-set)))
|
||||||
|
(char-set-unfold p f g seed base-cs))
|
||||||
|
(define-deprecated-trampoline (((srfi srfi-14) char-set) . chars)
|
||||||
|
(list->char-set chars))
|
||||||
|
(define-deprecated-trampoline (((srfi srfi-14) list->char-set) list #:optional (base-cs (char-set)))
|
||||||
|
(list->char-set list base-cs))
|
||||||
|
(define-deprecated-trampoline (((srfi srfi-14) string->char-set) string #:optional (base-cs (char-set)))
|
||||||
|
(string->char-set string base-cs))
|
||||||
|
(define-deprecated-trampoline (((srfi srfi-14) char-set-filter) pred cs #:optional (base-cs (char-set)))
|
||||||
|
(char-set-filter pred cs base-cs))
|
||||||
|
(define-deprecated-trampoline (((srfi srfi-14) ucs-range->char-set) lower upper
|
||||||
|
#:optional error (base-cs (char-set)))
|
||||||
|
(ucs-range->char-set lower upper error base-cs))
|
||||||
|
(define-deprecated-trampoline (((srfi srfi-14) char-set-adjoin) cs . rest)
|
||||||
|
(apply char-set-adjoin cs rest))
|
||||||
|
(define-deprecated-trampoline (((srfi srfi-14) char-set-delete) cs . rest)
|
||||||
|
(apply char-set-delete cs rest))
|
||||||
|
(define-deprecated-trampoline (((srfi srfi-14) char-set-adjoin!) cs . rest)
|
||||||
|
(apply char-set-adjoin! cs rest))
|
||||||
|
(define-deprecated-trampoline (((srfi srfi-14) char-set-delete!) cs . rest)
|
||||||
|
(apply char-set-delete! cs rest))
|
||||||
|
(define-deprecated-trampoline (((srfi srfi-14) char-set-union) . rest)
|
||||||
|
(apply char-set-union rest))
|
||||||
|
(define-deprecated-trampoline (((srfi srfi-14) char-set-intersection) . rest)
|
||||||
|
(apply char-set-intersection rest))
|
||||||
|
(define-deprecated-trampoline (((srfi srfi-14) char-set-difference) cs . rest)
|
||||||
|
(apply char-set-difference cs rest))
|
||||||
|
(define-deprecated-trampoline (((srfi srfi-14) char-set-xor) . rest)
|
||||||
|
(apply char-set-xor rest))
|
||||||
|
(define-deprecated-trampoline (((srfi srfi-14) char-set-diff+intersection) cs . rest)
|
||||||
|
(apply char-set-diff+intersection cs rest))
|
||||||
|
(define-deprecated-trampoline (((srfi srfi-14) char-set-union!) . rest)
|
||||||
|
(apply char-set-union! rest))
|
||||||
|
(define-deprecated-trampoline (((srfi srfi-14) char-set-intersection!) . rest)
|
||||||
|
(apply char-set-intersection! rest))
|
||||||
|
(define-deprecated-trampoline (((srfi srfi-14) char-set-difference!) cs . rest)
|
||||||
|
(apply char-set-difference! cs rest))
|
||||||
|
(define-deprecated-trampoline (((srfi srfi-14) char-set-xor!) . rest)
|
||||||
|
(apply char-set-xor! rest))
|
||||||
|
(define-deprecated-trampoline (((srfi srfi-14) char-set-diff+intersection!) cs . rest)
|
||||||
|
(apply char-set-diff+intersection! cs rest))
|
||||||
|
(define-deprecated-trampolines (srfi srfi-14)
|
||||||
|
(char-set? x)
|
||||||
|
(char-set-cursor cs)
|
||||||
|
(char-set-ref cs cursor)
|
||||||
|
(char-set-cursor-next cs cursor)
|
||||||
|
(end-of-char-set? cursor)
|
||||||
|
(char-set-fold kons knil cs)
|
||||||
|
(char-set-unfold! p f g seed base-cs)
|
||||||
|
(char-set-for-each proc cs)
|
||||||
|
(char-set-map proc cs)
|
||||||
|
(char-set-copy cs)
|
||||||
|
(list->char-set! list base-cs)
|
||||||
|
(string->char-set! str base-cs)
|
||||||
|
(char-set-filter! pred cs base-cs)
|
||||||
|
(ucs-range->char-set! lower upper error base-cs)
|
||||||
|
(->char-set x)
|
||||||
|
(char-set-size cs)
|
||||||
|
(char-set-count pred cs)
|
||||||
|
(char-set->list cs)
|
||||||
|
(char-set->string cs)
|
||||||
|
(char-set-contains? cs ch)
|
||||||
|
(char-set-every pred cs)
|
||||||
|
(char-set-complement cs))
|
||||||
|
|
||||||
|
(define-syntax-rule (define-deprecated*/stx mod id ...)
|
||||||
|
(begin
|
||||||
|
(define-deprecated/stx mod id)
|
||||||
|
...))
|
||||||
|
(define-deprecated*/stx (srfi srfi-14)
|
||||||
|
;; Standard character sets
|
||||||
|
char-set:lower-case
|
||||||
|
char-set:upper-case
|
||||||
|
char-set:title-case
|
||||||
|
char-set:letter
|
||||||
|
char-set:digit
|
||||||
|
char-set:letter+digit
|
||||||
|
char-set:graphic
|
||||||
|
char-set:printing
|
||||||
|
char-set:whitespace
|
||||||
|
char-set:iso-control
|
||||||
|
char-set:punctuation
|
||||||
|
char-set:symbol
|
||||||
|
char-set:hex-digit
|
||||||
|
char-set:blank
|
||||||
|
char-set:ascii
|
||||||
|
char-set:empty
|
||||||
|
char-set:full)
|
||||||
|
|
|
@ -724,7 +724,7 @@ allocation limit is exceeded, an exception will be thrown to the
|
||||||
string->number)))
|
string->number)))
|
||||||
|
|
||||||
(define char-set-bindings
|
(define char-set-bindings
|
||||||
'(((guile)
|
'(((srfi srfi-14)
|
||||||
->char-set
|
->char-set
|
||||||
char-set
|
char-set
|
||||||
char-set->list
|
char-set->list
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
(define-module (language elisp lexer)
|
(define-module (language elisp lexer)
|
||||||
#:use-module (ice-9 regex)
|
#:use-module (ice-9 regex)
|
||||||
#:use-module (ice-9 source-properties)
|
#:use-module (ice-9 source-properties)
|
||||||
|
#:use-module (srfi srfi-14)
|
||||||
#:export (get-lexer get-lexer/1))
|
#:export (get-lexer get-lexer/1))
|
||||||
|
|
||||||
;;; This is the lexical analyzer for the elisp reader. It is
|
;;; This is the lexical analyzer for the elisp reader. It is
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
;;; Guile VM code converters
|
;;; Guile VM code converters
|
||||||
|
|
||||||
;; Copyright (C) 2001, 2009, 2012, 2013 Free Software Foundation, Inc.
|
;; Copyright (C) 2001, 2009, 2012, 2013, 2025 Free Software Foundation, Inc.
|
||||||
|
|
||||||
;;;; This library is free software; you can redistribute it and/or
|
;;;; This library is free software; you can redistribute it and/or
|
||||||
;;;; modify it under the terms of the GNU Lesser General Public
|
;;;; modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -21,6 +21,7 @@
|
||||||
(define-module (language scheme decompile-tree-il)
|
(define-module (language scheme decompile-tree-il)
|
||||||
#:use-module (language tree-il)
|
#:use-module (language tree-il)
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
|
#:use-module (srfi srfi-14)
|
||||||
#:use-module (srfi srfi-26)
|
#:use-module (srfi srfi-26)
|
||||||
#:use-module (ice-9 receive)
|
#:use-module (ice-9 receive)
|
||||||
#:use-module (ice-9 vlist)
|
#:use-module (ice-9 vlist)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
;;; unicode.scm --- The R6RS Unicode library
|
;;; unicode.scm --- The R6RS Unicode library
|
||||||
|
|
||||||
;; Copyright (C) 2010 Free Software Foundation, Inc.
|
;; Copyright (C) 2010, 2025 Free Software Foundation, Inc.
|
||||||
;;
|
;;
|
||||||
;; This library is free software; you can redistribute it and/or
|
;; This library is free software; you can redistribute it and/or
|
||||||
;; modify it under the terms of the GNU Lesser General Public
|
;; modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -69,9 +69,6 @@
|
||||||
char-upper-case?
|
char-upper-case?
|
||||||
char-lower-case?
|
char-lower-case?
|
||||||
|
|
||||||
char-set-contains?
|
|
||||||
char-set:title-case
|
|
||||||
|
|
||||||
char-general-category
|
char-general-category
|
||||||
|
|
||||||
char-upcase
|
char-upcase
|
||||||
|
@ -92,6 +89,9 @@
|
||||||
string-normalize-nfkd
|
string-normalize-nfkd
|
||||||
string-normalize-nfc
|
string-normalize-nfc
|
||||||
string-normalize-nfkc)
|
string-normalize-nfkc)
|
||||||
|
(only (srfi srfi-14)
|
||||||
|
char-set-contains?
|
||||||
|
char-set:title-case)
|
||||||
(rnrs base (6)))
|
(rnrs base (6)))
|
||||||
|
|
||||||
(define (char-foldcase char)
|
(define (char-foldcase char)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
;;; srfi-14.scm --- Character-set Library
|
;;; srfi-14.scm --- Character-set Library
|
||||||
|
|
||||||
;; Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc.
|
;; Copyright (C) 2001, 2002, 2004, 2006, 2025 Free Software Foundation, Inc.
|
||||||
;;
|
;;
|
||||||
;; This library is free software; you can redistribute it and/or
|
;; This library is free software; you can redistribute it and/or
|
||||||
;; modify it under the terms of the GNU Lesser General Public
|
;; modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -22,77 +22,81 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(define-module (srfi srfi-14))
|
(define-module (srfi srfi-14)
|
||||||
|
;; FIXME: Use #:export instead of #:replace once deprecated bindings
|
||||||
|
;; are removed.
|
||||||
|
#:replace (;; General procedures
|
||||||
|
char-set?
|
||||||
|
char-set=
|
||||||
|
char-set<=
|
||||||
|
char-set-hash
|
||||||
|
|
||||||
(re-export
|
;; Iterating over character sets
|
||||||
;;; General procedures
|
char-set-cursor
|
||||||
char-set?
|
char-set-ref
|
||||||
char-set=
|
char-set-cursor-next
|
||||||
char-set<=
|
end-of-char-set?
|
||||||
char-set-hash
|
char-set-fold
|
||||||
|
char-set-unfold char-set-unfold!
|
||||||
|
char-set-for-each
|
||||||
|
char-set-map
|
||||||
|
|
||||||
;;; Iterating over character sets
|
;; Creating character sets
|
||||||
char-set-cursor
|
char-set-copy
|
||||||
char-set-ref
|
char-set
|
||||||
char-set-cursor-next
|
list->char-set list->char-set!
|
||||||
end-of-char-set?
|
string->char-set string->char-set!
|
||||||
char-set-fold
|
char-set-filter char-set-filter!
|
||||||
char-set-unfold char-set-unfold!
|
ucs-range->char-set ucs-range->char-set!
|
||||||
char-set-for-each
|
->char-set
|
||||||
char-set-map
|
|
||||||
|
|
||||||
;;; Creating character sets
|
;; Querying character sets
|
||||||
char-set-copy
|
char-set-size
|
||||||
char-set
|
char-set-count
|
||||||
list->char-set list->char-set!
|
char-set->list
|
||||||
string->char-set string->char-set!
|
char-set->string
|
||||||
char-set-filter char-set-filter!
|
char-set-contains?
|
||||||
ucs-range->char-set ucs-range->char-set!
|
char-set-every
|
||||||
->char-set
|
char-set-any
|
||||||
|
|
||||||
;;; Querying character sets
|
;; Character set algebra
|
||||||
char-set-size
|
char-set-adjoin char-set-adjoin!
|
||||||
char-set-count
|
char-set-delete char-set-delete!
|
||||||
char-set->list
|
char-set-complement
|
||||||
char-set->string
|
char-set-union
|
||||||
char-set-contains?
|
char-set-intersection
|
||||||
char-set-every
|
char-set-difference
|
||||||
char-set-any
|
char-set-xor
|
||||||
|
char-set-diff+intersection
|
||||||
|
char-set-complement!
|
||||||
|
char-set-union!
|
||||||
|
char-set-intersection!
|
||||||
|
char-set-difference!
|
||||||
|
char-set-xor!
|
||||||
|
char-set-diff+intersection!
|
||||||
|
|
||||||
;;; Character set algebra
|
;; Standard character sets
|
||||||
char-set-adjoin char-set-adjoin!
|
char-set:lower-case
|
||||||
char-set-delete char-set-delete!
|
char-set:upper-case
|
||||||
char-set-complement
|
char-set:title-case
|
||||||
char-set-union
|
char-set:letter
|
||||||
char-set-intersection
|
char-set:digit
|
||||||
char-set-difference
|
char-set:letter+digit
|
||||||
char-set-xor
|
char-set:graphic
|
||||||
char-set-diff+intersection
|
char-set:printing
|
||||||
char-set-complement!
|
char-set:whitespace
|
||||||
char-set-union!
|
char-set:iso-control
|
||||||
char-set-intersection!
|
char-set:punctuation
|
||||||
char-set-difference!
|
char-set:symbol
|
||||||
char-set-xor!
|
char-set:hex-digit
|
||||||
char-set-diff+intersection!
|
char-set:blank
|
||||||
|
char-set:ascii
|
||||||
|
char-set:empty
|
||||||
|
char-set:full))
|
||||||
|
|
||||||
;;; Standard character sets
|
(eval-when (expand load eval)
|
||||||
char-set:lower-case
|
(load-extension (string-append "libguile-" (effective-version))
|
||||||
char-set:upper-case
|
"scm_init_srfi_14"))
|
||||||
char-set:title-case
|
|
||||||
char-set:letter
|
|
||||||
char-set:digit
|
|
||||||
char-set:letter+digit
|
|
||||||
char-set:graphic
|
|
||||||
char-set:printing
|
|
||||||
char-set:whitespace
|
|
||||||
char-set:iso-control
|
|
||||||
char-set:punctuation
|
|
||||||
char-set:symbol
|
|
||||||
char-set:hex-digit
|
|
||||||
char-set:blank
|
|
||||||
char-set:ascii
|
|
||||||
char-set:empty
|
|
||||||
char-set:full)
|
|
||||||
|
|
||||||
(cond-expand-provide (current-module) '(srfi-14))
|
(cond-expand-provide (current-module) '(srfi-14))
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
;;;; (sxml simple) -- a simple interface to the SSAX parser
|
;;;; (sxml simple) -- a simple interface to the SSAX parser
|
||||||
;;;;
|
;;;;
|
||||||
;;;; Copyright (C) 2009, 2010, 2013 Free Software Foundation, Inc.
|
;;;; Copyright (C) 2009, 2010, 2013, 2025 Free Software Foundation, Inc.
|
||||||
;;;; Modified 2004 by Andy Wingo <wingo at pobox dot com>.
|
;;;; Modified 2004 by Andy Wingo <wingo at pobox dot com>.
|
||||||
;;;; Originally written by Oleg Kiselyov <oleg at pobox dot com> as SXML-to-HTML.scm.
|
;;;; Originally written by Oleg Kiselyov <oleg at pobox dot com> as SXML-to-HTML.scm.
|
||||||
;;;;
|
;;;;
|
||||||
|
@ -30,6 +30,7 @@
|
||||||
#:use-module (sxml ssax)
|
#:use-module (sxml ssax)
|
||||||
#:use-module (sxml transform)
|
#:use-module (sxml transform)
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
|
#:use-module (srfi srfi-14)
|
||||||
#:export (xml->sxml sxml->xml sxml->string))
|
#:export (xml->sxml sxml->xml sxml->string))
|
||||||
|
|
||||||
;; Helpers from upstream/SSAX.scm.
|
;; Helpers from upstream/SSAX.scm.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
;;; Guile VM specific syntaxes and utilities
|
;;; Guile VM specific syntaxes and utilities
|
||||||
|
|
||||||
;; Copyright (C) 2001, 2009, 2016, 2019 Free Software Foundation, Inc
|
;; Copyright (C) 2001, 2009, 2016, 2019, 2025 Free Software Foundation, Inc
|
||||||
|
|
||||||
;;; This library is free software; you can redistribute it and/or
|
;;; This library is free software; you can redistribute it and/or
|
||||||
;;; modify it under the terms of the GNU Lesser General Public
|
;;; modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -19,6 +19,7 @@
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(define-module (system base syntax)
|
(define-module (system base syntax)
|
||||||
|
#:use-module (srfi srfi-14)
|
||||||
#:export (%compute-initargs)
|
#:export (%compute-initargs)
|
||||||
#:export-syntax (define-type define-record define-record/keywords
|
#:export-syntax (define-type define-record define-record/keywords
|
||||||
record-case transform-record))
|
record-case transform-record))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
;;; Repl server
|
;;; Repl server
|
||||||
|
|
||||||
;; Copyright (C) 2003,2010,2011,2014,2016,2019,2021 Free Software Foundation, Inc.
|
;; Copyright (C) 2003,2010,2011,2014,2016,2019,2021,2025 Free Software Foundation, Inc.
|
||||||
|
|
||||||
;; This library is free software; you can redistribute it and/or
|
;; This library is free software; you can redistribute it and/or
|
||||||
;; modify it under the terms of the GNU Lesser General Public
|
;; modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -27,6 +27,7 @@
|
||||||
#:use-module (ice-9 iconv)
|
#:use-module (ice-9 iconv)
|
||||||
#:use-module (rnrs bytevectors)
|
#:use-module (rnrs bytevectors)
|
||||||
#:use-module (ice-9 binary-ports)
|
#:use-module (ice-9 binary-ports)
|
||||||
|
#:use-module (srfi srfi-14)
|
||||||
#:use-module (srfi srfi-26) ; cut
|
#:use-module (srfi srfi-26) ; cut
|
||||||
#:export (make-tcp-server-socket
|
#:export (make-tcp-server-socket
|
||||||
make-unix-domain-server-socket
|
make-unix-domain-server-socket
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
;;;; (texinfo serialize) -- rendering stexinfo as texinfo
|
;;;; (texinfo serialize) -- rendering stexinfo as texinfo
|
||||||
;;;;
|
;;;;
|
||||||
;;;; Copyright (C) 2009, 2012, 2013 Free Software Foundation, Inc.
|
;;;; Copyright (C) 2009, 2012, 2013, 2025 Free Software Foundation, Inc.
|
||||||
;;;; Copyright (C) 2003,2004,2009 Andy Wingo <wingo at pobox dot com>
|
;;;; Copyright (C) 2003,2004,2009 Andy Wingo <wingo at pobox dot com>
|
||||||
;;;;
|
;;;;
|
||||||
;;;; This library is free software; you can redistribute it and/or
|
;;;; This library is free software; you can redistribute it and/or
|
||||||
|
@ -31,6 +31,7 @@
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
#:use-module (srfi srfi-13)
|
#:use-module (srfi srfi-13)
|
||||||
|
#:use-module (srfi srfi-14)
|
||||||
#:export (stexi->texi))
|
#:export (stexi->texi))
|
||||||
|
|
||||||
(define (list-intersperse src-l elem)
|
(define (list-intersperse src-l elem)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
;;;; (texinfo string-utils) -- text filling and wrapping
|
;;;; (texinfo string-utils) -- text filling and wrapping
|
||||||
;;;;
|
;;;;
|
||||||
;;;; Copyright (C) 2009, 2013 Free Software Foundation, Inc.
|
;;;; Copyright (C) 2009, 2013, 2025 Free Software Foundation, Inc.
|
||||||
;;;; Copyright (C) 2003 Richard Todd
|
;;;; Copyright (C) 2003 Richard Todd
|
||||||
;;;;
|
;;;;
|
||||||
;;;; This library is free software; you can redistribute it and/or
|
;;;; This library is free software; you can redistribute it and/or
|
||||||
|
@ -24,6 +24,7 @@
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(define-module (texinfo string-utils)
|
(define-module (texinfo string-utils)
|
||||||
|
#:use-module (srfi srfi-14)
|
||||||
#:export (escape-special-chars
|
#:export (escape-special-chars
|
||||||
transform-string
|
transform-string
|
||||||
expand-tabs
|
expand-tabs
|
||||||
|
|
|
@ -36,8 +36,9 @@
|
||||||
#:use-module (ice-9 object-properties)
|
#:use-module (ice-9 object-properties)
|
||||||
#:use-module (ice-9 rdelim)
|
#:use-module (ice-9 rdelim)
|
||||||
#:use-module (ice-9 textual-ports)
|
#:use-module (ice-9 textual-ports)
|
||||||
#:use-module (srfi srfi-19)
|
|
||||||
#:use-module (srfi srfi-9)
|
#:use-module (srfi srfi-9)
|
||||||
|
#:use-module (srfi srfi-14)
|
||||||
|
#:use-module (srfi srfi-19)
|
||||||
#:use-module (web uri)
|
#:use-module (web uri)
|
||||||
#:export (string->header
|
#:export (string->header
|
||||||
header->string
|
header->string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
;;;; (web uri) --- URI manipulation tools
|
;;;; (web uri) --- URI manipulation tools
|
||||||
;;;;
|
;;;;
|
||||||
;;;; Copyright (C) 1997,2001,2002,2010,2011,2012,2013,2014,2019-2021 Free Software Foundation, Inc.
|
;;;; Copyright (C) 1997,2001,2002,2010,2011,2012,2013,2014,2019-2021,2025 Free Software Foundation, Inc.
|
||||||
;;;;
|
;;;;
|
||||||
;;;; This library is free software; you can redistribute it and/or
|
;;;; This library is free software; you can redistribute it and/or
|
||||||
;;;; modify it under the terms of the GNU Lesser General Public
|
;;;; modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
(define-module (web uri)
|
(define-module (web uri)
|
||||||
#:use-module (srfi srfi-9)
|
#:use-module (srfi srfi-9)
|
||||||
|
#:use-module (srfi srfi-14)
|
||||||
#:use-module (ice-9 iconv)
|
#:use-module (ice-9 iconv)
|
||||||
#:use-module (ice-9 regex)
|
#:use-module (ice-9 regex)
|
||||||
#:use-module (ice-9 rdelim)
|
#:use-module (ice-9 rdelim)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
;;;; strings.test --- test suite for Guile's string functions -*- scheme -*-
|
;;;; strings.test --- test suite for Guile's string functions -*- scheme -*-
|
||||||
;;;; Jim Blandy <jimb@red-bean.com> --- August 1999
|
;;;; Jim Blandy <jimb@red-bean.com> --- August 1999
|
||||||
;;;;
|
;;;;
|
||||||
;;;; Copyright (C) 1999,2001,2004-2006,2008-2011,2013,2015,2018,2020,2023
|
;;;; Copyright (C) 1999,2001,2004-2006,2008-2011,2013,2015,2018,2020,2023,2025
|
||||||
;;;; Free Software Foundation, Inc.
|
;;;; Free Software Foundation, Inc.
|
||||||
;;;;
|
;;;;
|
||||||
;;;; This library is free software; you can redistribute it and/or
|
;;;; This library is free software; you can redistribute it and/or
|
||||||
|
@ -21,6 +21,7 @@
|
||||||
(define-module (test-strings)
|
(define-module (test-strings)
|
||||||
#:use-module ((system base compile) #:select (compile))
|
#:use-module ((system base compile) #:select (compile))
|
||||||
#:use-module (test-suite lib)
|
#:use-module (test-suite lib)
|
||||||
|
#:use-module (srfi srfi-14)
|
||||||
#:use-module (ice-9 string-fun))
|
#:use-module (ice-9 string-fun))
|
||||||
|
|
||||||
(define exception:read-only-string
|
(define exception:read-only-string
|
||||||
|
|
|
@ -27,7 +27,8 @@
|
||||||
#:use-module (language tree-il optimize)
|
#:use-module (language tree-il optimize)
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
#:use-module (ice-9 regex)
|
#:use-module (ice-9 regex)
|
||||||
#:use-module (srfi srfi-13))
|
#:use-module (srfi srfi-13)
|
||||||
|
#:use-module (srfi srfi-14))
|
||||||
|
|
||||||
(define-syntax-rule (pass-if-primitives-resolved in expected)
|
(define-syntax-rule (pass-if-primitives-resolved in expected)
|
||||||
(pass-if (format #f "primitives-resolved in ~s" 'in)
|
(pass-if (format #f "primitives-resolved in ~s" 'in)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue