Function: rx--charset-p
rx--charset-p is a byte-compiled function defined in rx.el.gz.
Signature
(rx--charset-p FORM)
Documentation
Whether FORM looks like a charset, only consisting of character intervals and set operations.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/rx.el.gz
(defun rx--charset-p (form)
"Whether FORM looks like a charset, only consisting of character intervals
and set operations."
(or (and (consp form)
(or (and (memq (car form) '(any in char))
(rx--every (lambda (x) (not (symbolp x))) (cdr form)))
(and (memq (car form) '(not or | intersection))
(rx--every #'rx--charset-p (cdr form)))))
(characterp form)
(and (stringp form) (= (length form) 1))
(and (or (symbolp form) (consp form))
(let ((expanded (rx--expand-def form)))
(and expanded
(rx--charset-p expanded))))))