Function: rng-intern-choice-shortcut

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

Signature

(rng-intern-choice-shortcut IPATTERNS)

Documentation

Try to shortcut interning a choice list.

If successful, return the interned pattern. Otherwise return nil.

Source Code

;; Defined in /usr/src/emacs/lisp/nxml/rng-match.el.gz
(defun rng-intern-choice-shortcut (ipatterns)
  "Try to shortcut interning a choice list.
If successful, return the interned pattern.  Otherwise return nil."
  (while (and ipatterns
	      (eq (car ipatterns)
		  rng-not-allowed-ipattern))
    (setq ipatterns (cdr ipatterns)))
  (if ipatterns
      (let ((ret (car ipatterns)))
	(setq ipatterns (cdr ipatterns))
	(while (and ipatterns ret)
	  (or (eq (car ipatterns) rng-not-allowed-ipattern)
	      (eq (car ipatterns) ret)
	      (setq ret nil))
	  (setq ipatterns (cdr ipatterns)))
	ret)
    rng-not-allowed-ipattern))