[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r106001: New option frame-auto-hide-f
From: |
martin rudalics |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r106001: New option frame-auto-hide-function replacing frame-auto-delete. |
Date: |
Wed, 05 Oct 2011 08:49:53 +0200 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 106001
committer: martin rudalics <address@hidden>
branch nick: trunk
timestamp: Wed 2011-10-05 08:49:53 +0200
message:
New option frame-auto-hide-function replacing frame-auto-delete.
* window.el (frame-auto-hide-function): New option replacing
frame-auto-delete. Suggested by Stefan Monnier.
(window--delete): Call frame-auto-hide-function instead of
investigating frame-auto-delete.
modified:
lisp/ChangeLog
lisp/window.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-10-05 05:30:03 +0000
+++ b/lisp/ChangeLog 2011-10-05 06:49:53 +0000
@@ -1,3 +1,10 @@
+2011-10-05 Martin Rudalics <address@hidden>
+
+ * window.el (frame-auto-hide-function): New option replacing
+ frame-auto-delete. Suggested by Stefan Monnier.
+ (window--delete): Call frame-auto-hide-function instead of
+ investigating frame-auto-delete.
+
2011-10-05 Stefan Monnier <address@hidden>
* emacs-lisp/edebug.el: Heed checkdoc recommendations.
=== modified file 'lisp/window.el'
--- a/lisp/window.el 2011-10-04 15:28:25 +0000
+++ b/lisp/window.el 2011-10-05 06:49:53 +0000
@@ -2738,13 +2738,18 @@
(set-buffer-major-mode scratch)
scratch)))
-(defcustom frame-auto-delete nil
- "Non-nil means automatically delete frames.
-The default value nil means to iconify frames instead. Functions
-affected by this variable are `quit-window' (when burying the
-window's buffer) and `bury-buffer'."
- :type 'boolean
- :group 'windows)
+(defcustom frame-auto-hide-function #'iconify-frame
+ "Function called to automatically hide frames.
+The function is called with one argument - a frame.
+
+Functions affected by this option are those that bury a buffer
+shown in a separate frame like `quit-window' and `bury-buffer'."
+ :type '(choice (const :tag "Iconify" iconify-frame)
+ (const :tag "Delete" delete-frame)
+ (const :tag "Do nothing" ignore)
+ function)
+ :group 'windows
+ :group 'frames)
(defun window--delete (&optional window dedicated-only kill)
"Delete WINDOW if possible.
@@ -2760,9 +2765,8 @@
(cond
((eq deletable 'frame)
(let ((frame (window-frame window)))
- (if (or kill frame-auto-delete)
- (delete-frame frame)
- (iconify-frame frame)))
+ (when (functionp frame-auto-hide-function)
+ (funcall frame-auto-hide-function frame)))
'frame)
(deletable
(delete-window window)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r106001: New option frame-auto-hide-function replacing frame-auto-delete.,
martin rudalics <=