diff lisp/buffer.el @ 422:95016f13131a r21-2-19

Import from CVS: tag r21-2-19
author cvs
date Mon, 13 Aug 2007 11:25:01 +0200
parents 697ef44129c6
children 11054d720c21
line wrap: on
line diff
--- a/lisp/buffer.el	Mon Aug 13 11:24:10 2007 +0200
+++ b/lisp/buffer.el	Mon Aug 13 11:25:01 2007 +0200
@@ -32,6 +32,9 @@
 
 ;;; Code:
 
+(defvar switch-to-buffer-hooks nil
+  "Hooks to run after a recorded buffer switch.")
+
 (defun switch-to-buffer (bufname &optional norecord)
   "Select buffer BUFNAME in the current window.
 BUFNAME may be a buffer or a buffer name and is created if it did not exist.
@@ -65,6 +68,8 @@
 			   (next-window (minibuffer-window))
 			 (selected-window))
 		       buf)
+    ;; XEmacs change
+    (or norecord (run-hook-with-args 'switch-to-buffer-hooks buf))
     buf))
 
 (defun pop-to-buffer (bufname &optional not-this-window-p on-frame)