Mercurial > hg > xemacs-beta
comparison lisp/buffer.el @ 424:11054d720c21 r21-2-20
Import from CVS: tag r21-2-20
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:26:11 +0200 |
parents | 95016f13131a |
children |
comparison
equal
deleted
inserted
replaced
423:28d9c139be4c | 424:11054d720c21 |
---|---|
30 | 30 |
31 ;; This file is dumped with XEmacs. | 31 ;; This file is dumped with XEmacs. |
32 | 32 |
33 ;;; Code: | 33 ;;; Code: |
34 | 34 |
35 (defvar switch-to-buffer-hooks nil | |
36 "Hooks to run after a recorded buffer switch.") | |
37 | |
38 (defun switch-to-buffer (bufname &optional norecord) | 35 (defun switch-to-buffer (bufname &optional norecord) |
39 "Select buffer BUFNAME in the current window. | 36 "Select buffer BUFNAME in the current window. |
40 BUFNAME may be a buffer or a buffer name and is created if it did not exist. | 37 BUFNAME may be a buffer or a buffer name and is created if it did not exist. |
41 Optional second arg NORECORD non-nil means do not put this buffer at the | 38 Optional second arg NORECORD non-nil means do not put this buffer at the |
42 front of the list of recently selected ones. | 39 front of the list of recently selected ones. |
66 (or norecord (record-buffer buf)) | 63 (or norecord (record-buffer buf)) |
67 (set-window-buffer (if (eq (selected-window) (minibuffer-window)) | 64 (set-window-buffer (if (eq (selected-window) (minibuffer-window)) |
68 (next-window (minibuffer-window)) | 65 (next-window (minibuffer-window)) |
69 (selected-window)) | 66 (selected-window)) |
70 buf) | 67 buf) |
71 ;; XEmacs change | |
72 (or norecord (run-hook-with-args 'switch-to-buffer-hooks buf)) | |
73 buf)) | 68 buf)) |
74 | 69 |
75 (defun pop-to-buffer (bufname &optional not-this-window-p on-frame) | 70 (defun pop-to-buffer (bufname &optional not-this-window-p on-frame) |
76 "Select buffer BUFNAME in some window, preferably a different one. | 71 "Select buffer BUFNAME in some window, preferably a different one. |
77 If BUFNAME is nil, then some other buffer is chosen. | 72 If BUFNAME is nil, then some other buffer is chosen. |