Mercurial > emacs
comparison src/buffer.c @ 16830:4792e73d511f
(Fpop_to_buffer): New arg NORECORD.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Sun, 05 Jan 1997 02:53:57 +0000 |
| parents | 195f7cf6a9f3 |
| children | 299b0e0f0a93 |
comparison
equal
deleted
inserted
replaced
| 16829:f9daa704b442 | 16830:4792e73d511f |
|---|---|
| 1236 Fset_window_buffer (EQ (selected_window, minibuf_window) | 1236 Fset_window_buffer (EQ (selected_window, minibuf_window) |
| 1237 ? Fnext_window (minibuf_window, Qnil, Qnil) | 1237 ? Fnext_window (minibuf_window, Qnil, Qnil) |
| 1238 : selected_window, | 1238 : selected_window, |
| 1239 buf); | 1239 buf); |
| 1240 | 1240 |
| 1241 return buf; | 1241 3eturn buf; |
| 1242 } | 1242 } |
| 1243 | 1243 |
| 1244 DEFUN ("pop-to-buffer", Fpop_to_buffer, Spop_to_buffer, 1, 2, 0, | 1244 DEFUN ("pop-to-buffer", Fpop_to_buffer, Spop_to_buffer, 1, 2, 0, |
| 1245 "Select buffer BUFFER in some window, preferably a different one.\n\ | 1245 "Select buffer BUFFER in some window, preferably a different one.\n\ |
| 1246 If BUFFER is nil, then some other buffer is chosen.\n\ | 1246 If BUFFER is nil, then some other buffer is chosen.\n\ |
| 1247 If `pop-up-windows' is non-nil, windows can be split to do this.\n\ | 1247 If `pop-up-windows' is non-nil, windows can be split to do this.\n\ |
| 1248 If optional second arg OTHER-WINDOW is non-nil, insist on finding another\n\ | 1248 If optional second arg OTHER-WINDOW is non-nil, insist on finding another\n\ |
| 1249 window even if BUFFER is already visible in the selected window.\n\ | 1249 window even if BUFFER is already visible in the selected window.\n\ |
| 1250 This uses the function `display-buffer' as a subroutine; see the documentation\n\ | 1250 This uses the function `display-buffer' as a subroutine; see the documentation\n\ |
| 1251 of `display-buffer' for additional customization information.") | 1251 of `display-buffer' for additional customization information.\n\ |
| 1252 (buffer, other_window) | 1252 \n\ |
| 1253 Lisp_Object buffer, other_window; | 1253 Optional third arg NORECORD non-nil means\n\ |
| 1254 do not put this buffer at the front of the list of recently selected ones.") | |
| 1255 (buffer, other_window, norecord) | |
| 1256 Lisp_Object buffer, other_window, norecord; | |
| 1254 { | 1257 { |
| 1255 register Lisp_Object buf; | 1258 register Lisp_Object buf; |
| 1256 if (NILP (buffer)) | 1259 if (NILP (buffer)) |
| 1257 buf = Fother_buffer (Fcurrent_buffer (), Qnil); | 1260 buf = Fother_buffer (Fcurrent_buffer (), Qnil); |
| 1258 else | 1261 else |
| 1263 buf = Fget_buffer_create (buffer); | 1266 buf = Fget_buffer_create (buffer); |
| 1264 Fset_buffer_major_mode (buf); | 1267 Fset_buffer_major_mode (buf); |
| 1265 } | 1268 } |
| 1266 } | 1269 } |
| 1267 Fset_buffer (buf); | 1270 Fset_buffer (buf); |
| 1268 record_buffer (buf); | 1271 if (NILP (norecord)) |
| 1272 record_buffer (buf); | |
| 1269 Fselect_window (Fdisplay_buffer (buf, other_window)); | 1273 Fselect_window (Fdisplay_buffer (buf, other_window)); |
| 1270 return buf; | 1274 return buf; |
| 1271 } | 1275 } |
| 1272 | 1276 |
| 1273 DEFUN ("current-buffer", Fcurrent_buffer, Scurrent_buffer, 0, 0, 0, | 1277 DEFUN ("current-buffer", Fcurrent_buffer, Scurrent_buffer, 0, 0, 0, |
