aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2011-08-24 20:45:23 -0400
committerChong Yidong2011-08-24 20:45:23 -0400
commite4ed06f12b052a3c80d5c572889cb670a41f3c7d (patch)
tree5c11cb339b65caa88b70e8a2c5ab5632ff6f2806
parente5f1c99e958f4d9aad01eaa93b6b5760d31e5e58 (diff)
downloademacs-e4ed06f12b052a3c80d5c572889cb670a41f3c7d.tar.gz
emacs-e4ed06f12b052a3c80d5c572889cb670a41f3c7d.zip
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.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/window.el22
-rw-r--r--src/ChangeLog6
-rw-r--r--src/buffer.c32
4 files changed, 30 insertions, 34 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 643ed72124e..91078ce3246 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12011-08-25 Chong Yidong <cyd@stupidchicken.com>
2
3 * window.el (bury-buffer, quit-window): Use bury-buffer-internal.
4
12011-08-25 Glenn Morris <rgm@gnu.org> 52011-08-25 Glenn Morris <rgm@gnu.org>
2 6
3 * mail/smtpmail.el (smtpmail-smtp-user): Add version: tag. 7 * mail/smtpmail.el (smtpmail-smtp-user): Add version: tag.
diff --git a/lisp/window.el b/lisp/window.el
index fb9d38c6503..e68af18ab8e 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -2795,7 +2795,7 @@ displayed there."
2795 (let* ((buffer (window-normalize-buffer buffer-or-name))) 2795 (let* ((buffer (window-normalize-buffer buffer-or-name)))
2796 ;; If `buffer-or-name' is not on the selected frame we unrecord it 2796 ;; If `buffer-or-name' is not on the selected frame we unrecord it
2797 ;; although it's not "here" (call it a feature). 2797 ;; although it's not "here" (call it a feature).
2798 (unrecord-buffer buffer) 2798 (bury-buffer-internal buffer)
2799 ;; Handle case where `buffer-or-name' is nil and the current buffer 2799 ;; Handle case where `buffer-or-name' is nil and the current buffer
2800 ;; is shown in the selected window. 2800 ;; is shown in the selected window.
2801 (cond 2801 (cond
@@ -2928,12 +2928,9 @@ one. If non-nil, reset `quit-restore' parameter to nil."
2928 (eq (window-buffer window) (nth 1 quit-restore))) 2928 (eq (window-buffer window) (nth 1 quit-restore)))
2929 (window-dedicated-p window)) 2929 (window-dedicated-p window))
2930 (setq deletable (window-deletable-p window))) 2930 (setq deletable (window-deletable-p window)))
2931 ;; WINDOW can be deleted. 2931 ;; Check if WINDOW's frame can be deleted.
2932 (unrecord-buffer buffer)
2933 (if (eq deletable 'frame) 2932 (if (eq deletable 'frame)
2934 ;; WINDOW's frame can be deleted.
2935 (delete-frame (window-frame window)) 2933 (delete-frame (window-frame window))
2936 ;; Just delete WINDOW.
2937 (delete-window window)) 2934 (delete-window window))
2938 ;; If the previously selected window is still alive, select it. 2935 ;; If the previously selected window is still alive, select it.
2939 (when (window-live-p (nth 2 quit-restore)) 2936 (when (window-live-p (nth 2 quit-restore))
@@ -2944,17 +2941,17 @@ one. If non-nil, reset `quit-restore' parameter to nil."
2944 ;; in the first place. 2941 ;; in the first place.
2945 (eq (window-buffer window) (nth 3 quit-restore))) 2942 (eq (window-buffer window) (nth 3 quit-restore)))
2946 (setq resize (with-current-buffer buffer temp-buffer-resize-mode)) 2943 (setq resize (with-current-buffer buffer temp-buffer-resize-mode))
2947 ;; Unrecord buffer.
2948 (unrecord-buffer buffer)
2949 (unrecord-window-buffer window buffer) 2944 (unrecord-window-buffer window buffer)
2950 ;; Display buffer stored in the quit-restore parameter. 2945 ;; Display buffer stored in the quit-restore parameter.
2951 (set-window-dedicated-p window nil) 2946 (set-window-dedicated-p window nil)
2952 (set-window-buffer window (nth 0 quit-restore)) 2947 (set-window-buffer window (nth 0 quit-restore))
2953 (set-window-start window (nth 1 quit-restore)) 2948 (set-window-start window (nth 1 quit-restore))
2954 (set-window-point window (nth 2 quit-restore)) 2949 (set-window-point window (nth 2 quit-restore))
2955 (when (and resize (/= (nth 4 quit-restore) (window-total-size window))) 2950 (and resize
2956 (window-resize 2951 (/= (nth 4 quit-restore) (window-total-size window))
2957 window (- (nth 4 quit-restore) (window-total-size window)))) 2952 (window-resize window
2953 (- (nth 4 quit-restore)
2954 (window-total-size window))))
2958 ;; Reset the quit-restore parameter. 2955 ;; Reset the quit-restore parameter.
2959 (set-window-parameter window 'quit-restore nil) 2956 (set-window-parameter window 'quit-restore nil)
2960 (when (window-live-p (nth 5 quit-restore)) 2957 (when (window-live-p (nth 5 quit-restore))
@@ -2963,11 +2960,12 @@ one. If non-nil, reset `quit-restore' parameter to nil."
2963 ;; Otherwise, show another buffer in WINDOW and reset the 2960 ;; Otherwise, show another buffer in WINDOW and reset the
2964 ;; quit-restore parameter. 2961 ;; quit-restore parameter.
2965 (set-window-parameter window 'quit-restore nil) 2962 (set-window-parameter window 'quit-restore nil)
2966 (unrecord-buffer buffer)
2967 (switch-to-prev-buffer window 'bury-or-kill))) 2963 (switch-to-prev-buffer window 'bury-or-kill)))
2968 2964
2969 ;; Kill WINDOW's old-buffer if requested 2965 ;; Kill WINDOW's old-buffer if requested
2970 (if kill (kill-buffer buffer)))) 2966 (if kill
2967 (kill-buffer buffer)
2968 (bury-buffer-internal buffer))))
2971 2969
2972;;; Splitting windows. 2970;;; Splitting windows.
2973(defsubst window-split-min-size (&optional horizontal) 2971(defsubst window-split-min-size (&optional horizontal)
diff --git a/src/ChangeLog b/src/ChangeLog
index b9c627bf160..431a515def5 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12011-08-25 Chong Yidong <cyd@stupidchicken.com>
2
3 * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
4 Change return value to nil.
5 (Frecord_buffer): Delete unused function.
6
12011-08-24 Eli Zaretskii <eliz@gnu.org> 72011-08-24 Eli Zaretskii <eliz@gnu.org>
2 8
3 * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte 9 * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
diff --git a/src/buffer.c b/src/buffer.c
index 45d6fa36d04..832044ae6f4 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1698,27 +1698,16 @@ record_buffer (Lisp_Object buffer)
1698 call1 (Vrun_hooks, Qbuffer_list_update_hook); 1698 call1 (Vrun_hooks, Qbuffer_list_update_hook);
1699} 1699}
1700 1700
1701DEFUN ("record-buffer", Frecord_buffer, Srecord_buffer, 1, 1, 0,
1702 doc: /* Move BUFFER to the front of the buffer list.
1703Return BUFFER. */)
1704 (Lisp_Object buffer)
1705{
1706 CHECK_BUFFER (buffer);
1707
1708 record_buffer (buffer);
1709
1710 return buffer;
1711}
1712 1701
1713 /* Move BUFFER to the end of the buffer (a)lists. Do nothing if the 1702/* Move BUFFER to the end of the buffer (a)lists. Do nothing if the
1714 buffer is killed. For the selected frame's buffer list this moves 1703 buffer is killed. For the selected frame's buffer list this moves
1715 BUFFER to its end even if it was never shown in that frame. If 1704 BUFFER to its end even if it was never shown in that frame. If
1716 this happens we have a feature, hence `unrecord-buffer' should be 1705 this happens we have a feature, hence `unrecord-buffer' should be
1717 called only when BUFFER was shown in the selected frame. */ 1706 called only when BUFFER was shown in the selected frame. */
1718 1707
1719DEFUN ("unrecord-buffer", Funrecord_buffer, Sunrecord_buffer, 1, 1, 0, 1708DEFUN ("bury-buffer-internal", Fbury_buffer_internal, Sbury_buffer_internal,
1720 doc: /* Move BUFFER to the end of the buffer list. 1709 1, 1, 0,
1721Return BUFFER. */) 1710 doc: /* Move BUFFER to the end of the buffer list. */)
1722 (Lisp_Object buffer) 1711 (Lisp_Object buffer)
1723{ 1712{
1724 Lisp_Object aelt, aelt_cons, tem; 1713 Lisp_Object aelt, aelt_cons, tem;
@@ -1746,7 +1735,7 @@ Return BUFFER. */)
1746 if (!NILP (Vrun_hooks)) 1735 if (!NILP (Vrun_hooks))
1747 call1 (Vrun_hooks, Qbuffer_list_update_hook); 1736 call1 (Vrun_hooks, Qbuffer_list_update_hook);
1748 1737
1749 return buffer; 1738 return Qnil;
1750} 1739}
1751 1740
1752DEFUN ("set-buffer-major-mode", Fset_buffer_major_mode, Sset_buffer_major_mode, 1, 1, 0, 1741DEFUN ("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',
6034 defsubr (&Sother_buffer); 6023 defsubr (&Sother_buffer);
6035 defsubr (&Sbuffer_enable_undo); 6024 defsubr (&Sbuffer_enable_undo);
6036 defsubr (&Skill_buffer); 6025 defsubr (&Skill_buffer);
6037 defsubr (&Srecord_buffer); 6026 defsubr (&Sbury_buffer_internal);
6038 defsubr (&Sunrecord_buffer);
6039 defsubr (&Sset_buffer_major_mode); 6027 defsubr (&Sset_buffer_major_mode);
6040 defsubr (&Scurrent_buffer); 6028 defsubr (&Scurrent_buffer);
6041 defsubr (&Sset_buffer); 6029 defsubr (&Sset_buffer);