Life is very short

2014-07-24

進捗がなかったら, Emacsを終了しない

| 00:23

コード

(defun my/kill-emacs-hook ()
  (let ((progress (read-string "進捗どうですか? " "ダメです")))
    (when (string-match-p "\\(?:ダメ\\|だめ\\|駄目\\)" progress)
      (error "作業してください"))))
(add-hook 'kill-emacs-hook 'my/kill-emacs-hook)

イメージ

f:id:syohex:20140725002154p:image

f:id:syohex:20140725002152p:image


おわりに

めったに終了しないのであまり意味はなさそうです.

トラックバック - http://d.hatena.ne.jp/syohex/20140724/1406215404