Function: antlr-insert-option-interactive

antlr-insert-option-interactive is a byte-compiled function defined in antlr-mode.el.gz.

Signature

(antlr-insert-option-interactive ARG)

Documentation

Interactive specification for antlr-insert-option.

Use current-prefix-arg for ARG. Return (LEVEL OPTION LOCATION).

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/antlr-mode.el.gz
(defun antlr-insert-option-interactive (arg)
  "Interactive specification for `antlr-insert-option'.
Use `current-prefix-arg' for ARG.  Return \(LEVEL OPTION LOCATION)."
  (barf-if-buffer-read-only)
  (if arg (setq arg (prefix-numeric-value arg)))
  (unless (memq arg '(nil 1 2 3 4))
    (error "Valid prefix args: no=auto, 1=file, 2=grammar, 3=rule, 4=subrule"))
  (let* ((kind (antlr-option-kind arg))
	 (level (car kind)))
    (if (atom (cdr kind))
	(list level nil (cdr kind))
      (let* ((table (elt antlr-options-alists (1- level)))
	     (completion-ignore-case t)	;dynamic
	     (input (completing-read (format "Insert %s option: "
					     (elt antlr-options-headings
						  (1- level)))
				     table)))
	(list level input (cdr kind))))))