2016-07-05 emacs lispでyes/noの入力をうけつける emacs emacsでyes/noを入力させる方法です。 実際のところ (defun hoge () (interactive) (setq val (y-or-n-p "yes or no?")) (if (eq val t) (print "true") (print "false"))) (hoge) ;yes or no? (y or n) n ;"false" 他にも、タイムアウトを設定するy-or-n-with-timeoutがあります。