diff options
-rw-r--r-- | init.el | 3 | ||||
-rw-r--r-- | lisp/acdw.el | 12 |
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. | ||
639 | When 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 |