Function: rng-intern-optional

rng-intern-optional is a byte-compiled function defined in rng-match.el.gz.

Signature

(rng-intern-optional IPATTERN)

Source Code

;; Defined in /usr/src/emacs/lisp/nxml/rng-match.el.gz
(defun rng-intern-optional (ipattern)
  (cond ((rng--ipattern-nullable ipattern) ipattern)
	((eq ipattern rng-not-allowed-ipattern) rng-empty-ipattern)
	(t (rng-intern-choice1
	    ;; This is sorted since the empty pattern
	    ;; is before everything except not allowed.
	    ;; It cannot have a duplicate empty pattern,
	    ;; since it is not nullable.
	    (cons rng-empty-ipattern
		  (if (eq (rng--ipattern-type ipattern) 'choice)
		      (rng--ipattern-child ipattern)
		    (list ipattern)))
	    t))))