Add fat-finger-exit
This commit is contained in:
parent
01a8bdd923
commit
c5b6a0774d
3
init.el
3
init.el
|
@ -781,8 +781,7 @@ AKA, DO NOT USE THIS FUNCTION!!!"
|
|||
"C-x o" #'acdw/other-window-or-switch-buffer
|
||||
"C-x O" #'acdw/other-window-or-switch-buffer-backward
|
||||
"C-c _" #'add-file-local-variable
|
||||
"C-x C-c" #'delete-frame ; I keep fat-fingering and exiting
|
||||
)
|
||||
"C-x C-c" #'acdw/fat-finger-exit)
|
||||
|
||||
(:with-map toggle-map
|
||||
(:bind "c" #'column-number-mode
|
||||
|
|
12
lisp/acdw.el
12
lisp/acdw.el
|
@ -632,6 +632,18 @@ This function is internal. Use `acdw/make-password-fetcher' instead."
|
|||
(interactive "p")
|
||||
(dotimes (or n 1)
|
||||
(insert "💩")))
|
||||
|
||||
;;; Fat finger solutions
|
||||
(defun acdw/fat-finger-exit (&optional prefix)
|
||||
"Delete a frame, or kill Emacs with confirmation.
|
||||
When called with PREFIX, just kill Emacs without confirmation."
|
||||
(interactive "P")
|
||||
(if (or prefix
|
||||
(and (= 1 (length (frame-list)))
|
||||
(yes-or-no-p "This is the last frame! Wanna quit?")))
|
||||
(kill-emacs)
|
||||
(ignore-errors
|
||||
(delete-frame))))
|
||||
|
||||
(provide 'acdw)
|
||||
;;; acdw.el ends here
|
||||
|
|
Loading…
Reference in New Issue