Function: antlr-read-value
antlr-read-value is a byte-compiled function defined in
antlr-mode.el.gz.
Signature
(antlr-read-value INITIAL-CONTENTS PROMPT &optional AS-STRING TABLE TABLE-X)
Documentation
Read a string from the minibuffer, possibly with completion.
If INITIAL-CONTENTS is non-nil, insert it in the minibuffer initially. PROMPT is a string to prompt with, normally it ends in a colon and a space. If AS-STRING is non-nil, return printed representation of the user input, otherwise return the user input directly.
If TABLE or TABLE-X is non-nil, read with completion. The completion table is the resulting alist of TABLE-X concatenated with TABLE where TABLE can also be a function evaluation to an alist.
Used inside antlr-options-alists.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/antlr-mode.el.gz
;;;===========================================================================
;;; Insert options: in `antlr-options-alists'
;;;===========================================================================
(defun antlr-read-value ( initial-contents prompt
&optional as-string table table-x)
"Read a string from the minibuffer, possibly with completion.
If INITIAL-CONTENTS is non-nil, insert it in the minibuffer initially.
PROMPT is a string to prompt with, normally it ends in a colon and a
space. If AS-STRING is non-nil, return printed representation of the user
input, otherwise return the user input directly.
If TABLE or TABLE-X is non-nil, read with completion. The completion
table is the resulting alist of TABLE-X concatenated with TABLE where
TABLE can also be a function evaluation to an alist.
Used inside `antlr-options-alists'."
(let* ((completion-ignore-case t) ; dynamic
(table0 (and (or table table-x)
(append table-x
(if (functionp table) (funcall table) table))))
(input (if table0
(completing-read prompt table0 nil nil initial-contents)
(read-from-minibuffer prompt initial-contents))))
(if as-string
;; if necessary, `use print-escape-newlines', `print-escape-nonascii'
;; if strings should be used in v3/v4, write our own (single quote)
(format "%S" input)
input)))