Function: org-read-function

org-read-function is a byte-compiled function defined in org-macs.el.gz.

Signature

(org-read-function PROMPT &optional ALLOW-EMPTY?)

Documentation

Prompt for a function.

If ALLOW-EMPTY? is non-nil, return nil rather than raising an error when the user input is empty.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-macs.el.gz
;;; Input

(defun org-read-function (prompt &optional allow-empty?)
  "Prompt for a function.
If ALLOW-EMPTY? is non-nil, return nil rather than raising an
error when the user input is empty."
  (let ((func (completing-read prompt obarray #'fboundp t)))
    (cond ((not (string= func ""))
	   (intern func))
	  (allow-empty? nil)
	  (t (user-error "Empty input is not valid")))))