emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master c47507ec56 3/5: Make rng-blank-p obsolete in favor of string-blan


From: Stefan Kangas
Subject: master c47507ec56 3/5: Make rng-blank-p obsolete in favor of string-blank-p
Date: Tue, 9 Aug 2022 15:58:10 -0400 (EDT)

branch: master
commit c47507ec560a09535a2b5830f1386d9fc9a58442
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Make rng-blank-p obsolete in favor of string-blank-p
    
    * lisp/nxml/rng-util.el (rng-blank-p): Make obsolete in favor of
    string-blank-p.  Update callers.
---
 lisp/nxml/rng-match.el | 2 +-
 lisp/nxml/rng-parse.el | 2 +-
 lisp/nxml/rng-util.el  | 5 +----
 lisp/nxml/rng-valid.el | 4 ++--
 4 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/lisp/nxml/rng-match.el b/lisp/nxml/rng-match.el
index e767a9333b..f3549681f2 100644
--- a/lisp/nxml/rng-match.el
+++ b/lisp/nxml/rng-match.el
@@ -1154,7 +1154,7 @@ list may contain duplicates."
             (if (or (rng--ipattern-nullable
                      (rng-data-deriv child value))
                     (and (rng--ipattern-nullable child)
-                         (rng-blank-p value)))
+                          (string-blank-p value)))
                 (rng--ipattern-after ipattern)
               rng-not-allowed-ipattern)))
          ((eq type 'data)
diff --git a/lisp/nxml/rng-parse.el b/lisp/nxml/rng-parse.el
index 76cb94b144..1c08d77f56 100644
--- a/lisp/nxml/rng-parse.el
+++ b/lisp/nxml/rng-parse.el
@@ -62,7 +62,7 @@ be signaled in the same way as when it is not well-formed."
         (unless (rng-match-element-value (or text ""))
           (cons "Invalid data" (and text 'text))))
        ((and text
-             (not (rng-blank-p text))
+              (not (string-blank-p text))
              (not (rng-match-mixed-text)))
         (cons "Text not allowed" 'text))
        ((not start-tag)
diff --git a/lisp/nxml/rng-util.el b/lisp/nxml/rng-util.el
index 74f405410a..da51e81dbe 100644
--- a/lisp/nxml/rng-util.el
+++ b/lisp/nxml/rng-util.el
@@ -36,8 +36,6 @@
 
 (defconst rng-builtin-datatypes-uri (rng-make-datatypes-uri ""))
 
-(defun rng-blank-p (str) (string-match "\\`[ \t\n\r]*\\'" str))
-
 (defun rng-substq (new old list)
   "Replace first member of LIST (if any) that is `eq' to OLD by NEW.
 LIST is not modified."
@@ -84,13 +82,12 @@ LIST is not modified."
 
 (define-error 'rng-error nil)
 
-;; Obsolete.
-
 (defun rng-uniquify-eq (list)
   (declare (obsolete seq-uniq "28.1"))
   (seq-uniq list #'eq))
 
 (define-obsolete-function-alias 'rng-uniquify-equal #'seq-uniq "28.1")
+(define-obsolete-function-alias 'rng-blank-p #'string-blank-p "29.1")
 
 (provide 'rng-util)
 
diff --git a/lisp/nxml/rng-valid.el b/lisp/nxml/rng-valid.el
index b9c980222e..ad5c9c7a15 100644
--- a/lisp/nxml/rng-valid.el
+++ b/lisp/nxml/rng-valid.el
@@ -1275,7 +1275,7 @@ Return nil at end of buffer, t otherwise."
 
 (defun rng-segment-blank-p (segment)
   (if (car segment)
-      (rng-blank-p (car segment))
+      (string-blank-p (car segment))
     (apply #'rng-region-blank-p
           (cdr segment))))
 
@@ -1303,7 +1303,7 @@ string between START and END."
        ((not (or (and whitespace
                       (or (eq whitespace t)
                           (if value
-                              (rng-blank-p value)
+                               (string-blank-p value)
                             (rng-region-blank-p start end))))
                  (rng-match-mixed-text)))
         (rng-mark-invalid "Text not allowed" start (or end (point))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]