* 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.
+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.
(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
(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))
;; 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))
;; 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))))
\f
;;; Splitting windows.
(defsubst window-split-min-size (&optional horizontal)
+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
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);
-
- 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. */
+/* 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;
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,
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);