diff src/buffer.c @ 404:2f8bb876ab1d r21-2-32

Import from CVS: tag r21-2-32
author cvs
date Mon, 13 Aug 2007 11:16:07 +0200
parents a86b2b5e0111
children b8cc9ab3f761
line wrap: on
line diff
--- a/src/buffer.c	Mon Aug 13 11:15:00 2007 +0200
+++ b/src/buffer.c	Mon Aug 13 11:16:07 2007 +0200
@@ -1027,6 +1027,13 @@
   /* The aconses in the Vbuffer_alist are shared with frame->buffer_alist,
      so this will change it in the per-frame ordering as well. */
   Fsetcar (Frassq (buf, Vbuffer_alist), newname);
+  /* If the buffer is the selected one then this is equivalent to
+     recording the buffer. */
+  if (EQ (Fwindow_buffer (Fselected_window (Qnil)), buf))
+    {
+      va_run_hook_with_args (Qrecord_buffer_hook, 1, buf);
+    }
+
   if (NILP (current_buffer->filename)
       && !NILP (current_buffer->auto_save_file_name))
     call0 (Qrename_auto_save_file);