Function: format-read
format-read is a byte-compiled function defined in format.el.gz.
Signature
(format-read &optional PROMPT)
Documentation
Read and return the name of a format.
Return value is a list, like buffer-file-format; it may be nil.
Formats are defined in format-alist. Optional arg is the PROMPT to use.
Source Code
;; Defined in /usr/src/emacs/lisp/format.el.gz
(defun format-read (&optional prompt)
"Read and return the name of a format.
Return value is a list, like `buffer-file-format'; it may be nil.
Formats are defined in `format-alist'. Optional arg is the PROMPT to use."
(let* ((table (mapcar (lambda (x) (list (symbol-name (car x))))
format-alist))
(ans (completing-read (or prompt "Format: ") table nil t)))
(if (not (equal "" ans)) (list (intern ans)))))