1119 |
{ |
{ |
1120 |
register struct window *w = decode_window (window); |
register struct window *w = decode_window (window); |
1121 |
|
|
1122 |
if (NILP (arg)) |
w->dedicated = arg; |
|
w->dedicated = Qnil; |
|
|
else |
|
|
w->dedicated = Qt; |
|
1123 |
|
|
1124 |
return w->dedicated; |
return w->dedicated; |
1125 |
} |
} |
1378 |
if (!NILP (tem)) |
if (!NILP (tem)) |
1379 |
{ |
{ |
1380 |
unshow_buffer (p); |
unshow_buffer (p); |
1381 |
unchain_marker (p->pointm); |
unchain_marker (XMARKER (p->pointm)); |
1382 |
unchain_marker (p->start); |
unchain_marker (XMARKER (p->start)); |
1383 |
} |
} |
1384 |
|
|
1385 |
/* Free window glyph matrices. It is sure that they are allocated |
/* Free window glyph matrices. It is sure that they are allocated |
2919 |
return Qnil; |
return Qnil; |
2920 |
} |
} |
2921 |
|
|
2922 |
|
/* Note that selected_window can be nil |
2923 |
|
when this is called from Fset_window_configuration. */ |
2924 |
|
|
2925 |
DEFUN ("select-window", Fselect_window, Sselect_window, 1, 2, 0, |
DEFUN ("select-window", Fselect_window, Sselect_window, 1, 2, 0, |
2926 |
doc: /* Select WINDOW. Most editing will apply to WINDOW's buffer. |
doc: /* Select WINDOW. Most editing will apply to WINDOW's buffer. |
2927 |
If WINDOW is not already selected, also make WINDOW's buffer current. |
If WINDOW is not already selected, also make WINDOW's buffer current. |
3021 |
|
|
3022 |
FRAME_SAMPLE_VISIBILITY (f); |
FRAME_SAMPLE_VISIBILITY (f); |
3023 |
|
|
3024 |
if (!EQ (frame, selected_frame)) |
if (EQ (frame, selected_frame)) |
3025 |
|
; /* Assume the selected frame is already visible enough. */ |
3026 |
|
else if (minibuf_level > 0 |
3027 |
|
&& MINI_WINDOW_P (XWINDOW (selected_window)) |
3028 |
|
&& WINDOW_LIVE_P (minibuf_selected_window) |
3029 |
|
&& EQ (frame, WINDOW_FRAME (XWINDOW (minibuf_selected_window)))) |
3030 |
|
; /* Assume the frame from which we invoked the minibuffer is visible. */ |
3031 |
|
else |
3032 |
{ |
{ |
3033 |
if (FRAME_ICONIFIED_P (f)) |
if (FRAME_ICONIFIED_P (f)) |
3034 |
Fmake_frame_visible (frame); |
Fmake_frame_visible (frame); |
3335 |
w = XWINDOW (window); |
w = XWINDOW (window); |
3336 |
XSETFASTINT (w->hscroll, 0); |
XSETFASTINT (w->hscroll, 0); |
3337 |
XSETFASTINT (w->min_hscroll, 0); |
XSETFASTINT (w->min_hscroll, 0); |
3338 |
set_marker_restricted_both (w->start, buf, 1, 1); |
set_marker_restricted_both (w->start, buf, BEG, BEG); |
3339 |
set_marker_restricted_both (w->pointm, buf, 1, 1); |
set_marker_restricted_both (w->pointm, buf, BEG, BEG); |
3340 |
|
|
3341 |
/* Run temp-buffer-show-hook, with the chosen window selected |
/* Run temp-buffer-show-hook, with the chosen window selected |
3342 |
and its buffer current. */ |
and its buffer current. */ |
3343 |
if (!NILP (Vrun_hooks)) |
|
3344 |
{ |
if (!NILP (Vrun_hooks) |
3345 |
Lisp_Object tem; |
&& !NILP (Fboundp (Qtemp_buffer_show_hook)) |
3346 |
tem = Fboundp (Qtemp_buffer_show_hook); |
&& !NILP (Fsymbol_value (Qtemp_buffer_show_hook))) |
3347 |
if (!NILP (tem)) |
{ |
3348 |
{ |
int count = SPECPDL_INDEX (); |
3349 |
tem = Fsymbol_value (Qtemp_buffer_show_hook); |
Lisp_Object prev_window, prev_buffer; |
3350 |
if (!NILP (tem)) |
prev_window = selected_window; |
3351 |
{ |
XSETBUFFER (prev_buffer, old); |
3352 |
int count = SPECPDL_INDEX (); |
|
3353 |
Lisp_Object prev_window, prev_buffer; |
/* Select the window that was chosen, for running the hook. |
3354 |
prev_window = selected_window; |
Note: Both Fselect_window and select_window_norecord may |
3355 |
XSETBUFFER (prev_buffer, old); |
set-buffer to the buffer displayed in the window, |
3356 |
|
so we need to save the current buffer. --stef */ |
3357 |
/* Select the window that was chosen, for running the hook. |
record_unwind_protect (Fset_buffer, prev_buffer); |
3358 |
Note: Both Fselect_window and select_window_norecord may |
record_unwind_protect (select_window_norecord, prev_window); |
3359 |
set-buffer to the buffer displayed in the window, |
Fselect_window (window, Qt); |
3360 |
so we need to save the current buffer. --stef */ |
Fset_buffer (w->buffer); |
3361 |
record_unwind_protect (Fset_buffer, prev_buffer); |
call1 (Vrun_hooks, Qtemp_buffer_show_hook); |
3362 |
record_unwind_protect (select_window_norecord, prev_window); |
unbind_to (count, Qnil); |
|
Fselect_window (window, Qt); |
|
|
Fset_buffer (w->buffer); |
|
|
call1 (Vrun_hooks, Qtemp_buffer_show_hook); |
|
|
unbind_to (count, Qnil); |
|
|
} |
|
|
} |
|
3363 |
} |
} |
3364 |
} |
} |
3365 |
} |
} |
4819 |
{ |
{ |
4820 |
if (minibuf_level > 0 |
if (minibuf_level > 0 |
4821 |
&& MINI_WINDOW_P (XWINDOW (selected_window)) |
&& MINI_WINDOW_P (XWINDOW (selected_window)) |
|
&& !NILP (minibuf_selected_window) |
|
4822 |
&& WINDOW_LIVE_P (minibuf_selected_window)) |
&& WINDOW_LIVE_P (minibuf_selected_window)) |
4823 |
return minibuf_selected_window; |
return minibuf_selected_window; |
4824 |
|
|