about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-09-14 16:56:46 -0500
committerCase Duckworth2021-09-14 16:56:46 -0500
commitc5b6a0774db7ecb2920db342abab5dbf5bcad9fb (patch)
tree328f64fa9a8b72d2059a779653403ef8c7676f12
parentEnable edit-server even when not (daemonp) (diff)
downloademacs-c5b6a0774db7ecb2920db342abab5dbf5bcad9fb.tar.gz
emacs-c5b6a0774db7ecb2920db342abab5dbf5bcad9fb.zip
Add fat-finger-exit
-rw-r--r--init.el3
-rw-r--r--lisp/acdw.el12
2 files changed, 13 insertions, 2 deletions
diff --git a/init.el b/init.el index 47ca218..ec5a825 100644 --- a/init.el +++ b/init.el
@@ -781,8 +781,7 @@ AKA, DO NOT USE THIS FUNCTION!!!"
781 "C-x o" #'acdw/other-window-or-switch-buffer 781 "C-x o" #'acdw/other-window-or-switch-buffer
782 "C-x O" #'acdw/other-window-or-switch-buffer-backward 782 "C-x O" #'acdw/other-window-or-switch-buffer-backward
783 "C-c _" #'add-file-local-variable 783 "C-c _" #'add-file-local-variable
784 "C-x C-c" #'delete-frame ; I keep fat-fingering and exiting 784 "C-x C-c" #'acdw/fat-finger-exit)
785 )
786 785
787 (:with-map toggle-map 786 (:with-map toggle-map
788 (:bind "c" #'column-number-mode 787 (:bind "c" #'column-number-mode
diff --git a/lisp/acdw.el b/lisp/acdw.el index 91381da..b8a1906 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el
@@ -632,6 +632,18 @@ This function is internal. Use `acdw/make-password-fetcher' instead."
632 (interactive "p") 632 (interactive "p")
633 (dotimes (or n 1) 633 (dotimes (or n 1)
634 (insert "💩"))) 634 (insert "💩")))
635
636;;; Fat finger solutions
637(defun acdw/fat-finger-exit (&optional prefix)
638 "Delete a frame, or kill Emacs with confirmation.
639When called with PREFIX, just kill Emacs without confirmation."
640 (interactive "P")
641 (if (or prefix
642 (and (= 1 (length (frame-list)))
643 (yes-or-no-p "This is the last frame! Wanna quit?")))
644 (kill-emacs)
645 (ignore-errors
646 (delete-frame))))
635 647
636(provide 'acdw) 648(provide 'acdw)
637;;; acdw.el ends here 649;;; acdw.el ends here