[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r105555: Rename quit-restore-window i
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r105555: Rename quit-restore-window into quit-window. |
Date: |
Wed, 24 Aug 2011 13:38:46 -0400 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 105555
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Wed 2011-08-24 13:38:46 -0400
message:
Rename quit-restore-window into quit-window.
* lisp/window.el (quit-window): Renamed from quit-restore-window. Use
same arglist as old quit-window.
(frame-auto-delete): Doc fix.
* lisp/view.el (view-mode-exit): Use quit-window.
modified:
lisp/ChangeLog
lisp/view.el
lisp/window.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-08-24 09:40:58 +0000
+++ b/lisp/ChangeLog 2011-08-24 17:38:46 +0000
@@ -1,3 +1,11 @@
+2011-08-24 Chong Yidong <address@hidden>
+
+ * window.el (quit-window): Renamed from quit-restore-window. Use
+ same arglist as old quit-window.
+ (frame-auto-delete): Doc fix.
+
+ * view.el (view-mode-exit): Use quit-window.
+
2011-08-24 Juri Linkov <address@hidden>
* isearch.el (isearch-ring-adjust1): Start visiting previous
=== modified file 'lisp/view.el'
--- a/lisp/view.el 2011-07-19 15:01:49 +0000
+++ b/lisp/view.el 2011-08-24 17:38:46 +0000
@@ -576,9 +576,9 @@
(cond
((or all-windows view-exits-all-viewing-windows)
(dolist (window (get-buffer-window-list))
- (quit-restore-window window)))
+ (quit-window nil window)))
((eq (window-buffer) (current-buffer))
- (quit-restore-window)))
+ (quit-window)))
(when exit-action
(funcall exit-action buffer))
=== modified file 'lisp/window.el'
--- a/lisp/window.el 2011-08-20 22:41:41 +0000
+++ b/lisp/window.el 2011-08-24 17:38:46 +0000
@@ -2272,7 +2272,7 @@
Functions quitting a window and consequently affected by this
variable are `switch-to-prev-buffer', `delete-windows-on',
-`replace-buffer-in-windows' and `quit-restore-window'."
+`replace-buffer-in-windows' and `quit-window'."
:type '(choice
(const :tag "Never" nil)
(const :tag "Automatic" automatic)
@@ -2907,21 +2907,17 @@
;; Unrecord BUFFER in WINDOW.
(unrecord-window-buffer window buffer)))))
-(defun quit-restore-window (&optional window kill)
- "Quit WINDOW in some way.
-WINDOW must be a live window and defaults to the selected window.
-Return nil.
+(defun quit-window (&optional kill window)
+ "Quit WINDOW and bury its buffer.
+WINDOW defaults to the selected window.
+With a prefix argument, kill the buffer instead.
According to information stored in WINDOW's `quit-restore' window
parameter either \(1) delete WINDOW and its frame, \(2) delete
WINDOW, \(3) restore the buffer previously displayed in WINDOW,
or \(4) make WINDOW display some other buffer than the present
-one. If non-nil, reset `quit-restore' parameter to nil.
-
-Optional argument KILL non-nil means in addition kill WINDOW's
-buffer. If KILL is nil, put WINDOW's buffer at the end of the
-buffer list. Interactively, KILL is the prefix argument."
- (interactive "i\nP")
+one. If non-nil, reset `quit-restore' parameter to nil."
+ (interactive "P")
(setq window (window-normalize-live-window window))
(let ((buffer (window-buffer window))
(quit-restore (window-parameter window 'quit-restore))
@@ -2971,8 +2967,7 @@
(switch-to-prev-buffer window 'bury-or-kill)))
;; Kill WINDOW's old-buffer if requested
- (when kill (kill-buffer buffer))
- nil))
+ (if kill (kill-buffer buffer))))
;;; Splitting windows.
(defsubst window-split-min-size (&optional horizontal)
@@ -7045,39 +7040,6 @@
(with-current-buffer buffer-to-kill
(remove-hook 'kill-buffer-hook delete-window-hook t))))))
-(defun quit-window (&optional kill window)
- "Quit WINDOW and bury its buffer.
-With a prefix argument, kill the buffer instead. WINDOW defaults
-to the selected window.
-
-If WINDOW is non-nil, dedicated, or a minibuffer window, delete
-it and, if it's alone on its frame, its frame too. Otherwise, or
-if deleting WINDOW fails in any of the preceding cases, display
-another buffer in WINDOW using `switch-to-buffer'.
-
-Optional argument KILL non-nil means kill WINDOW's buffer.
-Otherwise, bury WINDOW's buffer, see `bury-buffer'."
- (interactive "P")
- (let ((buffer (window-buffer window)))
- (if (or window
- (window-minibuffer-p window)
- (window-dedicated-p window))
- ;; WINDOW is either non-nil, a minibuffer window, or dedicated;
- ;; try to delete it.
- (let* ((window (or window (selected-window)))
- (frame (window-frame window)))
- (if (frame-root-window-p window)
- ;; WINDOW is alone on its frame.
- (delete-frame frame)
- ;; There are other windows on its frame, delete WINDOW.
- (delete-window window)))
- ;; Otherwise, switch to another buffer in the selected window.
- (switch-to-buffer nil))
-
- ;; Deal with the buffer.
- (if kill
- (kill-buffer buffer)
- (bury-buffer buffer))))
(defvar recenter-last-op nil
"Indicates the last recenter operation performed.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r105555: Rename quit-restore-window into quit-window.,
Chong Yidong <=