comparison src/window.c @ 338:4840aae6a876

*** empty log message ***
author Jim Blandy <jimb@redhat.com>
date Fri, 19 Jul 1991 16:05:34 +0000
parents 8df170a4c9d1
children 71c9042fb90d
comparison
equal deleted inserted replaced
337:165d128bc864 338:4840aae6a876
16 16
17 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
18 along with GNU Emacs; see the file COPYING. If not, write to 18 along with GNU Emacs; see the file COPYING. If not, write to
19 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ 19 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
20 20
21 #include <stdio.h>
21 22
22 #include "config.h" 23 #include "config.h"
23 #include "lisp.h" 24 #include "lisp.h"
24 #include "buffer.h" 25 #include "buffer.h"
25 #include "screen.h" 26 #include "screen.h"
26 #include "window.h" 27 #include "window.h"
27 #include "commands.h" 28 #include "commands.h"
28 #include "indent.h" 29 #include "indent.h"
29 #include "termchar.h" 30 #include "termchar.h"
31 #include "termhooks.h"
30 #include "disptab.h" 32 #include "disptab.h"
31 33
32 Lisp_Object Qwindowp; 34 Lisp_Object Qwindowp;
33 35
34 Lisp_Object Fnext_window (), Fdelete_window (), Fselect_window (); 36 Lisp_Object Fnext_window (), Fdelete_window (), Fselect_window ();
348 { 350 {
349 int found = coordinates_in_window (XWINDOW (tem), &x, &y); 351 int found = coordinates_in_window (XWINDOW (tem), &x, &y);
350 352
351 if (found) 353 if (found)
352 { 354 {
353
354 *modeline_p = (found == -1); 355 *modeline_p = (found == -1);
355 return tem; 356 return tem;
356 } 357 }
357 358
358 if (EQ (tem, first)) 359 if (EQ (tem, first))
456 w->start_at_line_beg = Qnil; 457 w->start_at_line_beg = Qnil;
457 if (NULL (noforce)) 458 if (NULL (noforce))
458 w->force_start = Qt; 459 w->force_start = Qt;
459 w->update_mode_line = Qt; 460 w->update_mode_line = Qt;
460 XFASTINT (w->last_modified) = 0; 461 XFASTINT (w->last_modified) = 0;
462 if (!EQ (window, selected_window))
463 windows_or_buffers_changed++;
461 return pos; 464 return pos;
462 } 465 }
463 466
464 DEFUN ("window-dedicated-p", Fwindow_dedicated_p, Swindow_dedicated_p, 467 DEFUN ("window-dedicated-p", Fwindow_dedicated_p, Swindow_dedicated_p,
465 1, 1, 0, 468 1, 1, 0,
895 SCREEN_MINIBUF_WINDOW (XSCREEN (XWINDOW (window)->screen)))); 898 SCREEN_MINIBUF_WINDOW (XSCREEN (XWINDOW (window)->screen))));
896 899
897 return window; 900 return window;
898 } 901 }
899 902
900 DEFUN ("other-window", Fother_window, Sother_window, 1, 1, "p", 903 DEFUN ("other-window", Fother_window, Sother_window, 1, 2, "p",
901 "Select the ARG'th different window on this screen.\n\ 904 "Select the ARG'th different window on this screen.\n\
902 All windows on current screen are arranged in a cyclic order.\n\ 905 All windows on current screen are arranged in a cyclic order.\n\
903 This command selects the window ARG steps away in that order.\n\ 906 This command selects the window ARG steps away in that order.\n\
904 A negative ARG moves in the opposite order. If the optional second\n\ 907 A negative ARG moves in the opposite order. If the optional second\n\
905 argument ALL_SCREENS is non-nil, cycle through all screens.") 908 argument ALL_SCREENS is non-nil, cycle through all screens.")
1390 Fset_marker (ow->pointm, make_number (BUF_PT (XBUFFER (ow->buffer))), 1393 Fset_marker (ow->pointm, make_number (BUF_PT (XBUFFER (ow->buffer))),
1391 ow->buffer); 1394 ow->buffer);
1392 1395
1393 selected_window = window; 1396 selected_window = window;
1394 #ifdef MULTI_SCREEN 1397 #ifdef MULTI_SCREEN
1395 if (XSCREEN (WINDOW_SCREEN (w)) != selected_screen) 1398 /* If we're selecting the minibuffer window of the selected screen,
1399 don't change the selected screen, even if the minibuffer is on
1400 a different screen. */
1401 if (XSCREEN (WINDOW_SCREEN (w)) != selected_screen
1402 && ! EQ (SCREEN_MINIBUF_WINDOW (selected_screen), window))
1396 { 1403 {
1397 XSCREEN (WINDOW_SCREEN (w))->selected_window = window; 1404 XSCREEN (WINDOW_SCREEN (w))->selected_window = window;
1398 Fselect_screen (WINDOW_SCREEN (w), Qnil); 1405 Fselect_screen (WINDOW_SCREEN (w), Qnil);
1399 } 1406 }
1400 else 1407 else
1401 selected_screen->selected_window = window; 1408 selected_screen->selected_window = window;
1409
1410 /* When using the global minibuffer screen, we want the highlight to
1411 go to the minibuffer's screen, and when we finish, we want the highlight
1412 to return to the original screen. Call the hook to put the highlight
1413 where it belongs. */
1414 if (screen_rehighlight_hook)
1415 (*screen_rehighlight_hook) ();
1402 #endif 1416 #endif
1403 1417
1404 record_buffer (w->buffer); 1418 record_buffer (w->buffer);
1405 Fset_buffer (w->buffer); 1419 Fset_buffer (w->buffer);
1406 1420