Fix bug: two copies of unicode-char? were causing confusion.
authorChris Hanson <org/chris-hanson/cph>
Sat, 13 Jan 2018 21:07:38 +0000 (13:07 -0800)
committerChris Hanson <org/chris-hanson/cph>
Sat, 13 Jan 2018 21:07:38 +0000 (13:07 -0800)
doc/ref-manual/characters.texi
src/runtime/char.scm
src/runtime/chrset.scm
src/runtime/runtime.pkg

index 63783ba3cbfba1d7ec74cb35d1c1d18e5430414b..17938c6ff7e9d61bc5e880bfbe0201ce9e17a220 100644 (file)
@@ -438,13 +438,9 @@ it returns @code{#f}.
 @end deffn
 
 @deffn procedure unicode-char? object
-Returns @code{#t} if @var{object} is a character corresponding to a
-Unicode scalar value, otherwise it returns @code{#f}.  In other words,
-it is true for any character for which @code{char->integer} returns a
-value satisfying @code{unicode-scalar-value?}.
-
-Note that this is a bit of a misnomer since characters corresponding
-to Unicode ``noncharacter'' scalar values satisfy this predicate.
+Returns @code{#t} if @var{object} is any ``bitless'' character
+corresponding to a Unicode code point, except for those with general
+category @code{other:surrogate} or @code{other:not-assigned}.
 @end deffn
 
 @deffn procedure char-general-category char
index 3d52e11ac88660b05a3947a1da51fb779be19edf..333cef28629d2f033e7a8eb83b5d276f2d9eb4a4 100644 (file)
@@ -364,12 +364,6 @@ USA.
 \f
 ;;;; Unicode characters
 
-(define (unicode-char? object)
-  (and (char? object)
-       (let ((cp (char->integer object)))
-        (and (fix:< cp char-code-limit)
-             (not (utf16-surrogate? cp))))))
-
 (define (unicode-scalar-value? object)
   (and (unicode-code-point? object)
        (not (utf16-surrogate? object))))
index eb4934e6496146ef2e675a113298847593c5a13b..efc7827b372c899804196335277aa79ce594fc30 100644 (file)
@@ -54,7 +54,8 @@ USA.
                   (lambda (char)
                     (and (bitless-char? char)
                          (char-in-set? char char-set)))))
-             (register-predicate! predicate 'char-set-predicate '<= char?)
+             (register-predicate! predicate 'char-set-predicate
+                                  '<= bitless-char?)
              predicate)))))
     char-set))
 
index dcfc4bc73a27a10e85d12c0a918485dd178400aa..2111df025f9d4d8f1f53860990b5481d53f13236 100644 (file)
@@ -1226,8 +1226,7 @@ USA.
   (files "char")
   (parent (runtime))
   (export () deprecated:character
-         (code->char integer->char)
-         (wide-char? unicode-char?))
+         (code->char integer->char))
   (export ()
          8-bit-char?
          ascii-char?