This commit was generated by cvs2svn to compensate for changes in r410,
[chise/xemacs-chise.git.1] / lisp / buffer.el
index c829284..e7920c0 100644 (file)
@@ -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 @@ the window-buffer correspondences."
                           (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)