1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-27 16:51:06 -07:00

Delete record-buffer, and rename unrecord-buffer to bury-buffer-internal.

* lisp/window.el (bury-buffer, quit-window): Use bury-buffer-internal.

* src/buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
Change return value to nil.
(Frecord_buffer): Delete unused function.
This commit is contained in:
Chong Yidong 2011-08-24 20:45:23 -04:00
parent e5f1c99e95
commit e4ed06f12b
4 changed files with 30 additions and 34 deletions

View file

@ -1,3 +1,7 @@
2011-08-25 Chong Yidong <cyd@stupidchicken.com>
* window.el (bury-buffer, quit-window): Use bury-buffer-internal.
2011-08-25 Glenn Morris <rgm@gnu.org>
* mail/smtpmail.el (smtpmail-smtp-user): Add version: tag.

View file

@ -2795,7 +2795,7 @@ displayed there."
(let* ((buffer (window-normalize-buffer buffer-or-name)))
;; If `buffer-or-name' is not on the selected frame we unrecord it
;; although it's not "here" (call it a feature).
(unrecord-buffer buffer)
(bury-buffer-internal buffer)
;; Handle case where `buffer-or-name' is nil and the current buffer
;; is shown in the selected window.
(cond
@ -2928,12 +2928,9 @@ one. If non-nil, reset `quit-restore' parameter to nil."
(eq (window-buffer window) (nth 1 quit-restore)))
(window-dedicated-p window))
(setq deletable (window-deletable-p window)))
;; WINDOW can be deleted.
(unrecord-buffer buffer)
;; Check if WINDOW's frame can be deleted.
(if (eq deletable 'frame)
;; WINDOW's frame can be deleted.
(delete-frame (window-frame window))
;; Just delete WINDOW.
(delete-window window))
;; If the previously selected window is still alive, select it.
(when (window-live-p (nth 2 quit-restore))
@ -2944,17 +2941,17 @@ one. If non-nil, reset `quit-restore' parameter to nil."
;; in the first place.
(eq (window-buffer window) (nth 3 quit-restore)))
(setq resize (with-current-buffer buffer temp-buffer-resize-mode))
;; Unrecord buffer.
(unrecord-buffer buffer)
(unrecord-window-buffer window buffer)
;; Display buffer stored in the quit-restore parameter.
(set-window-dedicated-p window nil)
(set-window-buffer window (nth 0 quit-restore))
(set-window-start window (nth 1 quit-restore))
(set-window-point window (nth 2 quit-restore))
(when (and resize (/= (nth 4 quit-restore) (window-total-size window)))
(window-resize
window (- (nth 4 quit-restore) (window-total-size window))))
(and resize
(/= (nth 4 quit-restore) (window-total-size window))
(window-resize window
(- (nth 4 quit-restore)
(window-total-size window))))
;; Reset the quit-restore parameter.
(set-window-parameter window 'quit-restore nil)
(when (window-live-p (nth 5 quit-restore))
@ -2963,11 +2960,12 @@ one. If non-nil, reset `quit-restore' parameter to nil."
;; Otherwise, show another buffer in WINDOW and reset the
;; quit-restore parameter.
(set-window-parameter window 'quit-restore nil)
(unrecord-buffer buffer)
(switch-to-prev-buffer window 'bury-or-kill)))
;; Kill WINDOW's old-buffer if requested
(if kill (kill-buffer buffer))))
(if kill
(kill-buffer buffer)
(bury-buffer-internal buffer))))
;;; Splitting windows.
(defsubst window-split-min-size (&optional horizontal)

View file

@ -1,3 +1,9 @@
2011-08-25 Chong Yidong <cyd@stupidchicken.com>
* buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
Change return value to nil.
(Frecord_buffer): Delete unused function.
2011-08-24 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte

View file

@ -1698,27 +1698,16 @@ record_buffer (Lisp_Object buffer)
call1 (Vrun_hooks, Qbuffer_list_update_hook);
}
DEFUN ("record-buffer", Frecord_buffer, Srecord_buffer, 1, 1, 0,
doc: /* Move BUFFER to the front of the buffer list.
Return BUFFER. */)
(Lisp_Object buffer)
{
CHECK_BUFFER (buffer);
record_buffer (buffer);
/* Move BUFFER to the end of the buffer (a)lists. Do nothing if the
buffer is killed. For the selected frame's buffer list this moves
BUFFER to its end even if it was never shown in that frame. If
this happens we have a feature, hence `unrecord-buffer' should be
called only when BUFFER was shown in the selected frame. */
return buffer;
}
/* Move BUFFER to the end of the buffer (a)lists. Do nothing if the
buffer is killed. For the selected frame's buffer list this moves
BUFFER to its end even if it was never shown in that frame. If
this happens we have a feature, hence `unrecord-buffer' should be
called only when BUFFER was shown in the selected frame. */
DEFUN ("unrecord-buffer", Funrecord_buffer, Sunrecord_buffer, 1, 1, 0,
doc: /* Move BUFFER to the end of the buffer list.
Return BUFFER. */)
DEFUN ("bury-buffer-internal", Fbury_buffer_internal, Sbury_buffer_internal,
1, 1, 0,
doc: /* Move BUFFER to the end of the buffer list. */)
(Lisp_Object buffer)
{
Lisp_Object aelt, aelt_cons, tem;
@ -1746,7 +1735,7 @@ Return BUFFER. */)
if (!NILP (Vrun_hooks))
call1 (Vrun_hooks, Qbuffer_list_update_hook);
return buffer;
return Qnil;
}
DEFUN ("set-buffer-major-mode", Fset_buffer_major_mode, Sset_buffer_major_mode, 1, 1, 0,
@ -6034,8 +6023,7 @@ Functions running this hook are `get-buffer-create',
defsubr (&Sother_buffer);
defsubr (&Sbuffer_enable_undo);
defsubr (&Skill_buffer);
defsubr (&Srecord_buffer);
defsubr (&Sunrecord_buffer);
defsubr (&Sbury_buffer_internal);
defsubr (&Sset_buffer_major_mode);
defsubr (&Scurrent_buffer);
defsubr (&Sset_buffer);