初稿: 2018-08-09 Thu 14:04
最終更新日: 2018-12-14 Fri 20:44
ホーム | 文書トップ | 目次

org-read-function
エラー処理付きのプロンプトを表示する

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

日付: 2018-08-09 Thu 14:04

著者: conao

Created: 2018-12-14 Fri 21:04

Validate