X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fbuffer.el;h=e7920c0590d732b65180d832d88124e40206534e;hb=89cfab686d6faed92ea20ab29470c05d56a03aa2;hp=c8292845f71166004069b6e0ab64e77763a3cb44;hpb=a5f466de30a3e927ed1146b0c7e3870e71465c8f;p=chise%2Fxemacs-chise.git diff --git a/lisp/buffer.el b/lisp/buffer.el index c829284..e7920c0 100644 --- a/lisp/buffer.el +++ b/lisp/buffer.el @@ -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)