emacs - Add prompt for exit
It will only continue if you type out "yes". Everything else is ignored.
This commit is contained in:
parent
258c3d5046
commit
7bbcc270cf
1 changed files with 9 additions and 0 deletions
|
@ -8,6 +8,15 @@
|
|||
;; Change all prompts to y or n
|
||||
(fset 'yes-or-no-p 'y-or-n-p)
|
||||
|
||||
;; my prompt
|
||||
(defun my/yes-or-whatever-p (prompt)
|
||||
(string= "yes"
|
||||
(downcase
|
||||
(read-from-minibuffer
|
||||
(concat prompt "(yes or whatever) ")))))
|
||||
;; Ask if you want to quit emacs
|
||||
(setq confirm-kill-emacs 'my/yes-or-whatever-p)
|
||||
|
||||
;; Nope function
|
||||
(defun nope ()
|
||||
(interactive)
|
||||
|
|
Loading…
Reference in a new issue