emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] 30/35: Delete Frame/Close Emacs for Alt+f4


From: Matthew Fidler
Subject: [elpa] 30/35: Delete Frame/Close Emacs for Alt+f4
Date: Fri, 11 Jul 2014 22:33:31 +0000

mlf176f2 pushed a commit to branch externals/ergoemacs-mode
in repository elpa.

commit 16635db5461a4a925301b3221b0938ae662e4ebf
Author: Matthew L. Fidler <address@hidden>
Date:   Fri Jul 11 07:08:27 2014 -0500

    Delete Frame/Close Emacs for Alt+f4
---
 ergoemacs-functions.el |    8 ++++++++
 ergoemacs-themes.el    |    2 +-
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/ergoemacs-functions.el b/ergoemacs-functions.el
index e430661..f4efb98 100644
--- a/ergoemacs-functions.el
+++ b/ergoemacs-functions.el
@@ -1273,6 +1273,14 @@ Emacs buffers are those whose name starts with *."
     (funcall (and initial-major-mode))
     (setq buffer-offer-save t)))
 
+(defun ergoemacs-delete-frame ()
+  "Deletes frame or closes emacs (with prompt)."
+  (interactive)
+  (unless (ignore-errors (call-interactively 'delete-frame))
+    (when (yes-or-no-p "Do you wish to Close Emacs? ")
+      ;; Bound to C-x C-c
+      (save-buffers-kill-terminal))))
+
 (defcustom ergoemacs-maximum-number-of-file-to-open 5
   "Maximum number of files to open.
 If less than or equal to zero, there is no limit."
diff --git a/ergoemacs-themes.el b/ergoemacs-themes.el
index 23e5adc..8cb6371 100644
--- a/ergoemacs-themes.el
+++ b/ergoemacs-themes.el
@@ -279,7 +279,7 @@
 
   ;; Ergoemacs fixed keys...
   
-  (global-set-key (kbd "<M-f4>") 'delete-frame) ;; Alt+f4 should work.
+  (global-set-key (kbd "<M-f4>") 'ergoemacs-delete-frame) ;; Alt+f4 should 
work.
   
    ; Alt+→
   (global-set-key (kbd "<M-up>") 'ergoemacs-backward-block) ; Alt+↑



reply via email to

[Prev in Thread] Current Thread [Next in Thread]