Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 421:fff06e11db74 | 422:95016f13131a |
|---|---|
| 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 | |
| 35 (defun switch-to-buffer (bufname &optional norecord) | 38 (defun switch-to-buffer (bufname &optional norecord) |
| 36 "Select buffer BUFNAME in the current window. | 39 "Select buffer BUFNAME in the current window. |
| 37 BUFNAME may be a buffer or a buffer name and is created if it did not exist. | 40 BUFNAME may be a buffer or a buffer name and is created if it did not exist. |
| 38 Optional second arg NORECORD non-nil means do not put this buffer at the | 41 Optional second arg NORECORD non-nil means do not put this buffer at the |
| 39 front of the list of recently selected ones. | 42 front of the list of recently selected ones. |
| 63 (or norecord (record-buffer buf)) | 66 (or norecord (record-buffer buf)) |
| 64 (set-window-buffer (if (eq (selected-window) (minibuffer-window)) | 67 (set-window-buffer (if (eq (selected-window) (minibuffer-window)) |
| 65 (next-window (minibuffer-window)) | 68 (next-window (minibuffer-window)) |
| 66 (selected-window)) | 69 (selected-window)) |
| 67 buf) | 70 buf) |
| 71 ;; XEmacs change | |
| 72 (or norecord (run-hook-with-args 'switch-to-buffer-hooks buf)) | |
| 68 buf)) | 73 buf)) |
| 69 | 74 |
| 70 (defun pop-to-buffer (bufname &optional not-this-window-p on-frame) | 75 (defun pop-to-buffer (bufname &optional not-this-window-p on-frame) |
| 71 "Select buffer BUFNAME in some window, preferably a different one. | 76 "Select buffer BUFNAME in some window, preferably a different one. |
| 72 If BUFNAME is nil, then some other buffer is chosen. | 77 If BUFNAME is nil, then some other buffer is chosen. |
