summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2022-08-09 19:54:49 +0200
committerStefan Kangas <stefan@marxist.se>2022-08-09 21:58:00 +0200
commitc47507ec560a09535a2b5830f1386d9fc9a58442 (patch)
treefcde42acf20cadc99dd8bce81f01dbe01ba7e3ec
parent581fa3d958c064e05a8f980472880f153aba30a6 (diff)
downloademacs-c47507ec560a09535a2b5830f1386d9fc9a58442.tar.gz
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.
-rw-r--r--lisp/nxml/rng-match.el2
-rw-r--r--lisp/nxml/rng-parse.el2
-rw-r--r--lisp/nxml/rng-util.el5
-rw-r--r--lisp/nxml/rng-valid.el4
4 files changed, 5 insertions, 8 deletions
diff --git a/lisp/nxml/rng-match.el b/lisp/nxml/rng-match.el
index e767a9333b5..f3549681f25 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 76cb94b144c..1c08d77f56f 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 74f405410ac..da51e81dbe7 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 b9c980222e2..ad5c9c7a15c 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))))))