Function: reb-change-syntax

reb-change-syntax is an interactive and byte-compiled function defined in re-builder.el.gz.

Signature

(reb-change-syntax &optional SYNTAX)

Documentation

Change the syntax used by the RE Builder.

Optional argument SYNTAX must be specified if called non-interactively.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/re-builder.el.gz
(defun reb-change-syntax (&optional syntax)
  "Change the syntax used by the RE Builder.
Optional argument SYNTAX must be specified if called non-interactively."
  (interactive
   (list (intern
	  (completing-read
	   (format-prompt "Select syntax" reb-re-syntax)
           '(read string rx)
	   nil t nil nil (symbol-name reb-re-syntax)
           'reb-change-syntax-hist))))

  (if (memq syntax '(read string rx))
      (let ((buffer (get-buffer reb-buffer)))
	(setq reb-re-syntax syntax)
	(when buffer
          (with-current-buffer buffer
            (reb-initialize-buffer))
          (message "Switched syntax to `%s'" reb-re-syntax)))
    (error "Invalid syntax: %s" syntax)))