Function: rx--make-binding
rx--make-binding is a byte-compiled function defined in rx.el.gz.
Signature
(rx--make-binding NAME TAIL)
Documentation
Make a definitions entry out of TAIL.
TAIL is on the form ([ARGLIST] DEFINITION).
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/rx.el.gz
(defun rx--make-binding (name tail)
"Make a definitions entry out of TAIL.
TAIL is on the form ([ARGLIST] DEFINITION)."
(unless (symbolp name)
(error "Bad `rx' definition name: %S" name))
;; FIXME: Consider using a hash table or symbol property, for speed.
(when (memq name rx--builtin-names)
(error "Cannot redefine built-in rx name `%s'" name))
(pcase tail
(`(,def)
(list def))
(`(,args ,def)
(unless (and (listp args) (rx--every #'symbolp args))
(error "Bad argument list for `rx' definition %s: %S" name args))
(list args def))
(_ (error "Bad `rx' definition of %s: %S" name tail))))