diff options
| author | Jim Blandy | 1992-06-30 13:54:21 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-06-30 13:54:21 +0000 |
| commit | e5d77022e8429ca757746ed5d7cf9e2420703e8e (patch) | |
| tree | 2e273d216c8f9e34d5e29547f8e7e7c6c5d32049 /src | |
| parent | 53b0a6f88893036a42db2abcfbc257b68906956e (diff) | |
| download | emacs-e5d77022e8429ca757746ed5d7cf9e2420703e8e.tar.gz emacs-e5d77022e8429ca757746ed5d7cf9e2420703e8e.zip | |
*** empty log message ***
Diffstat (limited to 'src')
| -rw-r--r-- | src/.gdbinit | 11 | ||||
| -rw-r--r-- | src/Makefile.in | 16 | ||||
| -rw-r--r-- | src/callint.c | 5 | ||||
| -rw-r--r-- | src/dispextern.h | 11 | ||||
| -rw-r--r-- | src/dispnew.c | 41 | ||||
| -rw-r--r-- | src/emacs.c | 8 | ||||
| -rw-r--r-- | src/eval.c | 2 | ||||
| -rw-r--r-- | src/fileio.c | 38 | ||||
| -rw-r--r-- | src/frame.c | 10 | ||||
| -rw-r--r-- | src/frame.h | 101 | ||||
| -rw-r--r-- | src/keyboard.c | 19 | ||||
| -rw-r--r-- | src/keyboard.h | 6 | ||||
| -rw-r--r-- | src/lisp.h | 51 | ||||
| -rw-r--r-- | src/lread.c | 4 | ||||
| -rw-r--r-- | src/minibuf.c | 2 | ||||
| -rw-r--r-- | src/print.c | 2 | ||||
| -rw-r--r-- | src/scroll.c | 13 | ||||
| -rw-r--r-- | src/term.c | 7 | ||||
| -rw-r--r-- | src/termchar.h | 2 | ||||
| -rw-r--r-- | src/termhooks.h | 14 | ||||
| -rw-r--r-- | src/window.c | 40 | ||||
| -rw-r--r-- | src/window.h | 4 | ||||
| -rw-r--r-- | src/xdisp.c | 34 | ||||
| -rw-r--r-- | src/xselect.c.old | 2 | ||||
| -rw-r--r-- | src/xterm.c | 21 |
25 files changed, 247 insertions, 217 deletions
diff --git a/src/.gdbinit b/src/.gdbinit index fd470e31384..6d2c08a4ee4 100644 --- a/src/.gdbinit +++ b/src/.gdbinit | |||
| @@ -119,6 +119,12 @@ end | |||
| 119 | 119 | ||
| 120 | set print pretty on | 120 | set print pretty on |
| 121 | 121 | ||
| 122 | unset environment TERMCAP | ||
| 123 | unset environment TERM | ||
| 124 | set environment DISPLAY :0.0 | ||
| 125 | show environment DISPLAY | ||
| 126 | set args -q | ||
| 127 | |||
| 122 | # Don't let abort actually run, as it will make | 128 | # Don't let abort actually run, as it will make |
| 123 | # stdio stop working and therefore the `pr' command below as well. | 129 | # stdio stop working and therefore the `pr' command below as well. |
| 124 | break abort | 130 | break abort |
| @@ -128,8 +134,3 @@ break abort | |||
| 128 | # instead... | 134 | # instead... |
| 129 | break _XPrintDefaultError | 135 | break _XPrintDefaultError |
| 130 | 136 | ||
| 131 | unset environment TERMCAP | ||
| 132 | unset environment TERM | ||
| 133 | set environment DISPLAY :0.0 | ||
| 134 | show environment DISPLAY | ||
| 135 | set args -q | ||
diff --git a/src/Makefile.in b/src/Makefile.in index 8cb7bdbdefa..0717ee9644b 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -2,7 +2,7 @@ MAKE = make | |||
| 2 | # BSD doesn't have it as a default. | 2 | # BSD doesn't have it as a default. |
| 3 | 3 | ||
| 4 | CC =gcc | 4 | CC =gcc |
| 5 | CPP = $(CC) -E | 5 | CPP = $(CC) -E -Is -Im |
| 6 | #Note: an alternative is CPP = /lib/cpp | 6 | #Note: an alternative is CPP = /lib/cpp |
| 7 | 7 | ||
| 8 | # Just to avoid uncertainty. | 8 | # Just to avoid uncertainty. |
| @@ -19,7 +19,7 @@ distclean: | |||
| 19 | -rm -f paths.h config.h machine.h system.h emacs-* temacs xemacs xmakefile core *~ \#* *.o | 19 | -rm -f paths.h config.h machine.h system.h emacs-* temacs xemacs xmakefile core *~ \#* *.o |
| 20 | 20 | ||
| 21 | clean: | 21 | clean: |
| 22 | -rm -f temacs xemacs xmakefile core \#* *.o | 22 | -rm -f temacs xemacs xmakefile* core \#* *.o |
| 23 | 23 | ||
| 24 | xemacs: xmakefile doxemacs | 24 | xemacs: xmakefile doxemacs |
| 25 | 25 | ||
| @@ -34,10 +34,16 @@ dotemacs: | |||
| 34 | # If you have a problem with cc -E here, changing | 34 | # If you have a problem with cc -E here, changing |
| 35 | # the definition of CPP above may fix it. | 35 | # the definition of CPP above may fix it. |
| 36 | xmakefile: ymakefile config.h | 36 | xmakefile: ymakefile config.h |
| 37 | -rm -f xmakefile junk.c | 37 | -rm -f xmakefile xmakefile.new junk.c junk.cpp |
| 38 | cp ymakefile junk.c | 38 | cp ymakefile junk.c |
| 39 | $(CPP) junk.c | sed -e 's/^#.*//' -e 's/^[ \f\t][ \f\t]*$$//' -e 's/^ / /' | \ | 39 | $(CPP) junk.c > junk.cpp |
| 40 | sed -n -e '/^..*$$/p' > xmakefile | 40 | < junk.cpp \ |
| 41 | sed -e 's/^#.*//' \ | ||
| 42 | -e 's/^[ \f\t][ \f\t]*$$//' \ | ||
| 43 | -e 's/^ / /' \ | ||
| 44 | | sed -n -e '/^..*$$/p' \ | ||
| 45 | > xmakefile.new | ||
| 46 | mv -f xmakefile.new xmakefile | ||
| 41 | rm -f junk.c | 47 | rm -f junk.c |
| 42 | 48 | ||
| 43 | tags TAGS: | 49 | tags TAGS: |
diff --git a/src/callint.c b/src/callint.c index aeb6ef38720..bb39604744b 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -174,7 +174,7 @@ Otherwise, this is done only if an arg is read using the minibuffer.") | |||
| 174 | int arg_from_tty = 0; | 174 | int arg_from_tty = 0; |
| 175 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; | 175 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; |
| 176 | 176 | ||
| 177 | /* Save this now, since use ofminibuffer will clobber it. */ | 177 | /* Save this now, since use of minibuffer will clobber it. */ |
| 178 | prefix_arg = Vcurrent_prefix_arg; | 178 | prefix_arg = Vcurrent_prefix_arg; |
| 179 | 179 | ||
| 180 | retry: | 180 | retry: |
| @@ -233,7 +233,7 @@ Otherwise, this is done only if an arg is read using the minibuffer.") | |||
| 233 | { | 233 | { |
| 234 | /* Make a copy of string so that if a GC relocates specs, | 234 | /* Make a copy of string so that if a GC relocates specs, |
| 235 | `string' will still be valid. */ | 235 | `string' will still be valid. */ |
| 236 | string = (char *) alloca (XSTRING (specs)->size + 1); | 236 | string = (unsigned char *) alloca (XSTRING (specs)->size + 1); |
| 237 | bcopy (XSTRING (specs)->data, string, XSTRING (specs)->size + 1); | 237 | bcopy (XSTRING (specs)->data, string, XSTRING (specs)->size + 1); |
| 238 | } | 238 | } |
| 239 | else if (string == 0) | 239 | else if (string == 0) |
| @@ -388,6 +388,7 @@ Otherwise, this is done only if an arg is read using the minibuffer.") | |||
| 388 | (XTYPE (function) == Lisp_Symbol | 388 | (XTYPE (function) == Lisp_Symbol |
| 389 | ? (char *) XSYMBOL (function)->name->data | 389 | ? (char *) XSYMBOL (function)->name->data |
| 390 | : "Command")); | 390 | : "Command")); |
| 391 | varies[i] = -1; | ||
| 391 | break; | 392 | break; |
| 392 | 393 | ||
| 393 | case 'm': /* Value of mark. Does not do I/O. */ | 394 | case 'm': /* Value of mark. Does not do I/O. */ |
diff --git a/src/dispextern.h b/src/dispextern.h index 365f229fb53..19a0bfcecfa 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | /* Interface definitions for display code. | 1 | /* Interface definitions for display code. |
| 2 | Copyright (C) 1985 Free Software Foundation, Inc. | 2 | Copyright (C) 1985, 1992 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is part of GNU Emacs. | 4 | This file is part of GNU Emacs. |
| 5 | 5 | ||
| 6 | GNU Emacs is free software; you can redistribute it and/or modify | 6 | GNU Emacs is free software; you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
| 8 | the Free Software Foundation; either version 1, or (at your option) | 8 | the Free Software Foundation; either version 2, or (at your option) |
| 9 | any later version. | 9 | any later version. |
| 10 | 10 | ||
| 11 | GNU Emacs is distributed in the hope that it will be useful, | 11 | GNU Emacs is distributed in the hope that it will be useful, |
| @@ -93,10 +93,3 @@ struct screen_glyphs | |||
| 93 | * SCREEN_CURRENT_GLYPHS(s)->enable[(n)]) | 93 | * SCREEN_CURRENT_GLYPHS(s)->enable[(n)]) |
| 94 | 94 | ||
| 95 | extern void get_display_line (); | 95 | extern void get_display_line (); |
| 96 | |||
| 97 | /* Buffer used by `message' for formatting a message. */ | ||
| 98 | extern char *message_buf; | ||
| 99 | extern int message_buf_size; | ||
| 100 | |||
| 101 | /* Nonzero means message_buf is being used by print. */ | ||
| 102 | extern int message_buf_print; | ||
diff --git a/src/dispnew.c b/src/dispnew.c index b1ea5d22664..c5b802679d4 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -106,25 +106,17 @@ int cursor_in_echo_area; | |||
| 106 | 106 | ||
| 107 | SCREEN_PTR selected_screen; | 107 | SCREEN_PTR selected_screen; |
| 108 | 108 | ||
| 109 | /* A screen which is not just a minibuffer, or 0 if there are no such | ||
| 110 | screens. This is usually the most recent such screen that was | ||
| 111 | selected. In a single-screen version, this variable always remains 0. */ | ||
| 112 | SCREEN_PTR last_nonminibuf_screen; | ||
| 113 | |||
| 109 | /* In a single-screen version, the information that would otherwise | 114 | /* In a single-screen version, the information that would otherwise |
| 110 | exist inside a `struct screen' lives in the following variables instead. */ | 115 | exist inside screen objects lives in the following structure instead. */ |
| 111 | 116 | ||
| 112 | #ifndef MULTI_SCREEN | 117 | #ifndef MULTI_SCREEN |
| 113 | 118 | struct screen the_only_screen; | |
| 114 | /* Desired terminal cursor position (to show position of point), | 119 | #endif |
| 115 | origin zero */ | ||
| 116 | |||
| 117 | int cursX, cursY; | ||
| 118 | |||
| 119 | /* Description of current screen contents */ | ||
| 120 | |||
| 121 | struct screen_glyphs *current_glyphs; | ||
| 122 | |||
| 123 | /* Description of desired screen contents */ | ||
| 124 | |||
| 125 | struct screen_glyphs *desired_glyphs; | ||
| 126 | |||
| 127 | #endif /* not MULTI_SCREEN */ | ||
| 128 | 120 | ||
| 129 | /* This is a vector, made larger whenever it isn't large enough, | 121 | /* This is a vector, made larger whenever it isn't large enough, |
| 130 | which is used inside `update_screen' to hold the old contents | 122 | which is used inside `update_screen' to hold the old contents |
| @@ -142,8 +134,6 @@ extern short ospeed; /* Output speed (from sg_ospeed) */ | |||
| 142 | int in_display; /* 1 if in redisplay: can't handle SIGWINCH now. */ | 134 | int in_display; /* 1 if in redisplay: can't handle SIGWINCH now. */ |
| 143 | 135 | ||
| 144 | int delayed_size_change; /* 1 means SIGWINCH happened when not safe. */ | 136 | int delayed_size_change; /* 1 means SIGWINCH happened when not safe. */ |
| 145 | int delayed_screen_height; /* Remembered new screen height. */ | ||
| 146 | int delayed_screen_width; /* Remembered new screen width. */ | ||
| 147 | 137 | ||
| 148 | #ifdef MULTI_SCREEN | 138 | #ifdef MULTI_SCREEN |
| 149 | 139 | ||
| @@ -834,8 +824,8 @@ cancel_my_columns (w) | |||
| 834 | struct window *w; | 824 | struct window *w; |
| 835 | { | 825 | { |
| 836 | register int vpos; | 826 | register int vpos; |
| 837 | register SCREEN_PTR screen = XSCREEN (w->screen); | 827 | register struct screen_glyphs *desired_glyphs = |
| 838 | register struct screen_glyphs *desired_glyphs = screen->desired_glyphs; | 828 | SCREEN_DESIRED_GLYPHS (XSCREEN (w->screen)); |
| 839 | register int start = XFASTINT (w->left); | 829 | register int start = XFASTINT (w->left); |
| 840 | register int bot = XFASTINT (w->top) + XFASTINT (w->height); | 830 | register int bot = XFASTINT (w->top) + XFASTINT (w->height); |
| 841 | 831 | ||
| @@ -1049,8 +1039,10 @@ update_screen (s, force, inhibit_hairy_id) | |||
| 1049 | #endif /* HAVE_X_WINDOWS */ | 1039 | #endif /* HAVE_X_WINDOWS */ |
| 1050 | } | 1040 | } |
| 1051 | 1041 | ||
| 1042 | #ifdef HAVE_X_WINDOWS | ||
| 1052 | if (SCREEN_IS_X (s)) | 1043 | if (SCREEN_IS_X (s)) |
| 1053 | downto += LINE_HEIGHT(s, i); | 1044 | downto += LINE_HEIGHT(s, i); |
| 1045 | #endif | ||
| 1054 | } | 1046 | } |
| 1055 | pause = (i < SCREEN_HEIGHT (s) - 1) ? i : 0; | 1047 | pause = (i < SCREEN_HEIGHT (s) - 1) ? i : 0; |
| 1056 | 1048 | ||
| @@ -1603,11 +1595,10 @@ window_change_signal () | |||
| 1603 | 1595 | ||
| 1604 | { | 1596 | { |
| 1605 | Lisp_Object tail; | 1597 | Lisp_Object tail; |
| 1598 | SCREEN_PTR s; | ||
| 1606 | 1599 | ||
| 1607 | for (tail = Vscreen_list; CONSP (tail); tail = XCONS (tail)->cdr) | 1600 | FOR_EACH_SCREEN (tail, s) |
| 1608 | { | 1601 | { |
| 1609 | SCREEN_PTR s = XSCREEN (XCONS (tail)->car); | ||
| 1610 | |||
| 1611 | if (SCREEN_IS_TERMCAP (s)) | 1602 | if (SCREEN_IS_TERMCAP (s)) |
| 1612 | { | 1603 | { |
| 1613 | ++in_display; | 1604 | ++in_display; |
| @@ -1632,12 +1623,12 @@ do_pending_window_change () | |||
| 1632 | while (delayed_size_change) | 1623 | while (delayed_size_change) |
| 1633 | { | 1624 | { |
| 1634 | Lisp_Object tail; | 1625 | Lisp_Object tail; |
| 1626 | SCREEN_PTR s; | ||
| 1635 | 1627 | ||
| 1636 | delayed_size_change = 0; | 1628 | delayed_size_change = 0; |
| 1637 | 1629 | ||
| 1638 | for (tail = Vscreen_list; CONSP (tail); tail = XCONS (tail)->cdr) | 1630 | FOR_EACH_SCREEN (tail, s) |
| 1639 | { | 1631 | { |
| 1640 | SCREEN_PTR s = XSCREEN (XCONS (tail)->car); | ||
| 1641 | int height = SCREEN_NEW_HEIGHT (s); | 1632 | int height = SCREEN_NEW_HEIGHT (s); |
| 1642 | int width = SCREEN_NEW_WIDTH (s); | 1633 | int width = SCREEN_NEW_WIDTH (s); |
| 1643 | 1634 | ||
diff --git a/src/emacs.c b/src/emacs.c index 104ba671253..df698ee8309 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -63,6 +63,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 63 | /* Command line args from shell, as list of strings */ | 63 | /* Command line args from shell, as list of strings */ |
| 64 | Lisp_Object Vcommand_line_args; | 64 | Lisp_Object Vcommand_line_args; |
| 65 | 65 | ||
| 66 | /* Hook run by `kill-emacs' before it does really anything. */ | ||
| 67 | Lisp_Object Vkill_emacs_hook; | ||
| 68 | |||
| 66 | /* Set nonzero after Emacs has started up the first time. | 69 | /* Set nonzero after Emacs has started up the first time. |
| 67 | Prevents reinitialization of the Lisp world and keymaps | 70 | Prevents reinitialization of the Lisp world and keymaps |
| 68 | on subsequent starts. */ | 71 | on subsequent starts. */ |
| @@ -761,4 +764,9 @@ syms_of_emacs () | |||
| 761 | 764 | ||
| 762 | DEFVAR_BOOL ("noninteractive", &noninteractive1, | 765 | DEFVAR_BOOL ("noninteractive", &noninteractive1, |
| 763 | "Non-nil means Emacs is running without interactive terminal."); | 766 | "Non-nil means Emacs is running without interactive terminal."); |
| 767 | |||
| 768 | Vkill_emacs_hook = Qnil; | ||
| 769 | |||
| 770 | DEFVAR_LISP ("kill-emacs-hook", &Vkill_emacs_hook, | ||
| 771 | "Hook to be run whenever kill-emacs is called."); | ||
| 764 | } | 772 | } |
diff --git a/src/eval.c b/src/eval.c index 0e012d45008..572410e9617 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1094,7 +1094,9 @@ See also the function `condition-case'.") | |||
| 1094 | if (gc_in_progress || waiting_for_input) | 1094 | if (gc_in_progress || waiting_for_input) |
| 1095 | abort (); | 1095 | abort (); |
| 1096 | 1096 | ||
| 1097 | #ifdef HAVE_X_WINDOWS | ||
| 1097 | TOTALLY_UNBLOCK_INPUT; | 1098 | TOTALLY_UNBLOCK_INPUT; |
| 1099 | #endif | ||
| 1098 | 1100 | ||
| 1099 | conditions = Fget (sig, Qerror_conditions); | 1101 | conditions = Fget (sig, Qerror_conditions); |
| 1100 | 1102 | ||
diff --git a/src/fileio.c b/src/fileio.c index c6d3ee424fc..71a07938b11 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -621,7 +621,7 @@ See also the function `substitute-in-file-name'.") | |||
| 621 | #ifdef VMS | 621 | #ifdef VMS |
| 622 | || nm[1] == ':' | 622 | || nm[1] == ':' |
| 623 | #endif /* VMS */ | 623 | #endif /* VMS */ |
| 624 | || nm[1] == 0)/* ~/filename */ | 624 | || nm[1] == 0)/* ~ by itself */ |
| 625 | { | 625 | { |
| 626 | if (!(newdir = (unsigned char *) egetenv ("HOME"))) | 626 | if (!(newdir = (unsigned char *) egetenv ("HOME"))) |
| 627 | newdir = (unsigned char *) ""; | 627 | newdir = (unsigned char *) ""; |
| @@ -642,15 +642,18 @@ See also the function `substitute-in-file-name'.") | |||
| 642 | o [p - nm] = 0; | 642 | o [p - nm] = 0; |
| 643 | 643 | ||
| 644 | pw = (struct passwd *) getpwnam (o + 1); | 644 | pw = (struct passwd *) getpwnam (o + 1); |
| 645 | if (!pw) | 645 | if (pw) |
| 646 | error ("\"%s\" isn't a registered user", o + 1); | 646 | { |
| 647 | 647 | newdir = (unsigned char *) pw -> pw_dir; | |
| 648 | #ifdef VMS | 648 | #ifdef VMS |
| 649 | nm = p + 1; /* skip the terminator */ | 649 | nm = p + 1; /* skip the terminator */ |
| 650 | #else | 650 | #else |
| 651 | nm = p; | 651 | nm = p; |
| 652 | #endif /* VMS */ | 652 | #endif /* VMS */ |
| 653 | newdir = (unsigned char *) pw -> pw_dir; | 653 | } |
| 654 | |||
| 655 | /* If we don't find a user of that name, leave the name | ||
| 656 | unchanged; don't move nm forward to p. */ | ||
| 654 | } | 657 | } |
| 655 | 658 | ||
| 656 | if (nm[0] != '/' | 659 | if (nm[0] != '/' |
| @@ -794,7 +797,8 @@ See also the function `substitute-in-file-name'.") | |||
| 794 | return make_string (target, o - target); | 797 | return make_string (target, o - target); |
| 795 | } | 798 | } |
| 796 | #if 0 | 799 | #if 0 |
| 797 | DEFUN ("expand-file-name", Fexpand_file_name, Sexpand_file_name, 1, 2, 0, | 800 | /* Changed this DEFUN to a DEAFUN, so as not to confuse `make-docfile'. |
| 801 | DEAFUN ("expand-file-name", Fexpand_file_name, Sexpand_file_name, 1, 2, 0, | ||
| 798 | "Convert FILENAME to absolute, and canonicalize it.\n\ | 802 | "Convert FILENAME to absolute, and canonicalize it.\n\ |
| 799 | Second arg DEFAULT is directory to start with if FILENAME is relative\n\ | 803 | Second arg DEFAULT is directory to start with if FILENAME is relative\n\ |
| 800 | (does not start with slash); if DEFAULT is nil or missing,\n\ | 804 | (does not start with slash); if DEFAULT is nil or missing,\n\ |
| @@ -1589,38 +1593,38 @@ Signals a `file-already-exists' error if a file NEWNAME already exists\n\ | |||
| 1589 | unless optional third argument OK-IF-ALREADY-EXISTS is non-nil.\n\ | 1593 | unless optional third argument OK-IF-ALREADY-EXISTS is non-nil.\n\ |
| 1590 | A number as third arg means request confirmation if NEWNAME already exists.\n\ | 1594 | A number as third arg means request confirmation if NEWNAME already exists.\n\ |
| 1591 | This happens for interactive use with M-x.") | 1595 | This happens for interactive use with M-x.") |
| 1592 | (filename, newname, ok_if_already_exists) | 1596 | (filename, linkname, ok_if_already_exists) |
| 1593 | Lisp_Object filename, newname, ok_if_already_exists; | 1597 | Lisp_Object filename, linkname, ok_if_already_exists; |
| 1594 | { | 1598 | { |
| 1595 | #ifdef NO_ARG_ARRAY | 1599 | #ifdef NO_ARG_ARRAY |
| 1596 | Lisp_Object args[2]; | 1600 | Lisp_Object args[2]; |
| 1597 | #endif | 1601 | #endif |
| 1598 | struct gcpro gcpro1, gcpro2; | 1602 | struct gcpro gcpro1, gcpro2; |
| 1599 | 1603 | ||
| 1600 | GCPRO2 (filename, newname); | 1604 | GCPRO2 (filename, linkname); |
| 1601 | CHECK_STRING (filename, 0); | 1605 | CHECK_STRING (filename, 0); |
| 1602 | CHECK_STRING (newname, 1); | 1606 | CHECK_STRING (linkname, 1); |
| 1603 | #if 0 /* This made it impossible to make a link to a relative name. */ | 1607 | #if 0 /* This made it impossible to make a link to a relative name. */ |
| 1604 | filename = Fexpand_file_name (filename, Qnil); | 1608 | filename = Fexpand_file_name (filename, Qnil); |
| 1605 | #endif | 1609 | #endif |
| 1606 | newname = Fexpand_file_name (newname, Qnil); | 1610 | linkname = Fexpand_file_name (linkname, Qnil); |
| 1607 | if (NILP (ok_if_already_exists) | 1611 | if (NILP (ok_if_already_exists) |
| 1608 | || XTYPE (ok_if_already_exists) == Lisp_Int) | 1612 | || XTYPE (ok_if_already_exists) == Lisp_Int) |
| 1609 | barf_or_query_if_file_exists (newname, "make it a link", | 1613 | barf_or_query_if_file_exists (linkname, "make it a link", |
| 1610 | XTYPE (ok_if_already_exists) == Lisp_Int); | 1614 | XTYPE (ok_if_already_exists) == Lisp_Int); |
| 1611 | if (0 > symlink (XSTRING (filename)->data, XSTRING (newname)->data)) | 1615 | if (0 > symlink (XSTRING (filename)->data, XSTRING (linkname)->data)) |
| 1612 | { | 1616 | { |
| 1613 | /* If we didn't complain already, silently delete existing file. */ | 1617 | /* If we didn't complain already, silently delete existing file. */ |
| 1614 | if (errno == EEXIST) | 1618 | if (errno == EEXIST) |
| 1615 | { | 1619 | { |
| 1616 | unlink (XSTRING (filename)->data); | 1620 | unlink (XSTRING (filename)->data); |
| 1617 | if (0 <= symlink (XSTRING (filename)->data, XSTRING (newname)->data)) | 1621 | if (0 <= symlink (XSTRING (filename)->data, XSTRING (linkname)->data)) |
| 1618 | return Qnil; | 1622 | return Qnil; |
| 1619 | } | 1623 | } |
| 1620 | 1624 | ||
| 1621 | #ifdef NO_ARG_ARRAY | 1625 | #ifdef NO_ARG_ARRAY |
| 1622 | args[0] = filename; | 1626 | args[0] = filename; |
| 1623 | args[1] = newname; | 1627 | args[1] = linkname; |
| 1624 | report_file_error ("Making symbolic link", Flist (2, args)); | 1628 | report_file_error ("Making symbolic link", Flist (2, args)); |
| 1625 | #else | 1629 | #else |
| 1626 | report_file_error ("Making symbolic link", Flist (2, &filename)); | 1630 | report_file_error ("Making symbolic link", Flist (2, &filename)); |
diff --git a/src/frame.c b/src/frame.c index 6f190e4c535..41df7e26caf 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -20,6 +20,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 20 | #include <stdio.h> | 20 | #include <stdio.h> |
| 21 | 21 | ||
| 22 | #include "config.h" | 22 | #include "config.h" |
| 23 | |||
| 24 | #ifdef MULTI_SCREEN | ||
| 25 | |||
| 23 | #include "lisp.h" | 26 | #include "lisp.h" |
| 24 | #include "screen.h" | 27 | #include "screen.h" |
| 25 | #include "window.h" | 28 | #include "window.h" |
| @@ -34,11 +37,6 @@ Lisp_Object Vdefault_minibuffer_screen; | |||
| 34 | Lisp_Object Vdefault_screen_alist; | 37 | Lisp_Object Vdefault_screen_alist; |
| 35 | Lisp_Object Qminibuffer; | 38 | Lisp_Object Qminibuffer; |
| 36 | 39 | ||
| 37 | /* A screen which is not just a minibuffer, or 0 if there are no | ||
| 38 | such screens. This is usually the most recent such screen that | ||
| 39 | was selected. */ | ||
| 40 | struct screen *last_nonminibuf_screen; | ||
| 41 | |||
| 42 | extern Lisp_Object Vminibuffer_list; | 40 | extern Lisp_Object Vminibuffer_list; |
| 43 | extern Lisp_Object get_minibuffer (); | 41 | extern Lisp_Object get_minibuffer (); |
| 44 | 42 | ||
| @@ -1220,3 +1218,5 @@ For values specific to the separate minibuffer screen, see\n\ | |||
| 1220 | defsubr (&Srubber_band_rectangle); | 1218 | defsubr (&Srubber_band_rectangle); |
| 1221 | #endif /* HAVE_X11 */ | 1219 | #endif /* HAVE_X11 */ |
| 1222 | } | 1220 | } |
| 1221 | |||
| 1222 | #endif | ||
diff --git a/src/frame.h b/src/frame.h index a9fca616c8c..f9e270e52c5 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | /* Define screen-object for GNU Emacs. | 1 | /* Define screen-object for GNU Emacs. |
| 2 | Copyright (C) 1988 Free Software Foundation, Inc. | 2 | Copyright (C) 1988, 1992 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is part of GNU Emacs. | 4 | This file is part of GNU Emacs. |
| 5 | 5 | ||
| 6 | GNU Emacs is free software; you can redistribute it and/or modify | 6 | GNU Emacs is free software; you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
| 8 | the Free Software Foundation; either version 1, or (at your option) | 8 | the Free Software Foundation; either version 2, or (at your option) |
| 9 | any later version. | 9 | any later version. |
| 10 | 10 | ||
| 11 | GNU Emacs is distributed in the hope that it will be useful, | 11 | GNU Emacs is distributed in the hope that it will be useful, |
| @@ -18,7 +18,12 @@ along with GNU Emacs; see the file COPYING. If not, write to | |||
| 18 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | 18 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ |
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | #ifdef MULTI_SCREEN | 21 | /* The structure representing a screen. |
| 22 | |||
| 23 | We declare this even if MULTI_SCREEN is not defined, because when | ||
| 24 | we lack multi-screen support, we use one instance of this structure | ||
| 25 | to represent the one screen we support. This is cleaner than | ||
| 26 | having miscellaneous random variables scattered about. */ | ||
| 22 | 27 | ||
| 23 | enum output_method | 28 | enum output_method |
| 24 | { output_termcap, output_x_window }; | 29 | { output_termcap, output_x_window }; |
| @@ -34,15 +39,13 @@ struct screen | |||
| 34 | /* glyphs we'd like to appear on the screen */ | 39 | /* glyphs we'd like to appear on the screen */ |
| 35 | struct screen_glyphs *desired_glyphs; | 40 | struct screen_glyphs *desired_glyphs; |
| 36 | 41 | ||
| 42 | /* See do_line_insertion_deletion_costs for info on these arrays. */ | ||
| 37 | /* Cost of inserting 1 line on this screen */ | 43 | /* Cost of inserting 1 line on this screen */ |
| 38 | int *insert_line_cost; | 44 | int *insert_line_cost; |
| 39 | |||
| 40 | /* Cost of deleting 1 line on this screen */ | 45 | /* Cost of deleting 1 line on this screen */ |
| 41 | int *delete_line_cost; | 46 | int *delete_line_cost; |
| 42 | |||
| 43 | /* Cost of inserting n lines on this screen */ | 47 | /* Cost of inserting n lines on this screen */ |
| 44 | int *insert_n_lines_cost; | 48 | int *insert_n_lines_cost; |
| 45 | |||
| 46 | /* Cost of deleting n lines on this screen */ | 49 | /* Cost of deleting n lines on this screen */ |
| 47 | int *delete_n_lines_cost; | 50 | int *delete_n_lines_cost; |
| 48 | 51 | ||
| @@ -148,6 +151,8 @@ struct screen | |||
| 148 | int scroll_bottom_vpos; | 151 | int scroll_bottom_vpos; |
| 149 | }; | 152 | }; |
| 150 | 153 | ||
| 154 | #ifdef MULTI_SCREEN | ||
| 155 | |||
| 151 | typedef struct screen *SCREEN_PTR; | 156 | typedef struct screen *SCREEN_PTR; |
| 152 | 157 | ||
| 153 | #define XSCREEN(p) ((struct screen *) XPNTR (p)) | 158 | #define XSCREEN(p) ((struct screen *) XPNTR (p)) |
| @@ -157,7 +162,6 @@ typedef struct screen *SCREEN_PTR; | |||
| 157 | 162 | ||
| 158 | #define SCREENP(s) (XTYPE(s) == Lisp_Screen) | 163 | #define SCREENP(s) (XTYPE(s) == Lisp_Screen) |
| 159 | #define SCREEN_LIVE_P(s) ((s)->display.nothing != 0) | 164 | #define SCREEN_LIVE_P(s) ((s)->display.nothing != 0) |
| 160 | #define SET_SCREEN_GARBAGED(s) (screen_garbaged = 1, s->garbaged = 1) | ||
| 161 | #define SCREEN_IS_TERMCAP(s) ((s)->output_method == output_termcap) | 165 | #define SCREEN_IS_TERMCAP(s) ((s)->output_method == output_termcap) |
| 162 | #define SCREEN_IS_X(s) ((s)->output_method == output_x_window) | 166 | #define SCREEN_IS_X(s) ((s)->output_method == output_x_window) |
| 163 | #define SCREEN_MINIBUF_ONLY_P(s) \ | 167 | #define SCREEN_MINIBUF_ONLY_P(s) \ |
| @@ -173,6 +177,7 @@ typedef struct screen *SCREEN_PTR; | |||
| 173 | #define SCREEN_CURSOR_X(s) (s)->cursor_x | 177 | #define SCREEN_CURSOR_X(s) (s)->cursor_x |
| 174 | #define SCREEN_CURSOR_Y(s) (s)->cursor_y | 178 | #define SCREEN_CURSOR_Y(s) (s)->cursor_y |
| 175 | #define SCREEN_VISIBLE_P(s) (s)->visible | 179 | #define SCREEN_VISIBLE_P(s) (s)->visible |
| 180 | #define SET_SCREEN_GARBAGED(s) (screen_garbaged = 1, s->garbaged = 1) | ||
| 176 | #define SCREEN_GARBAGED_P(s) (s)->garbaged | 181 | #define SCREEN_GARBAGED_P(s) (s)->garbaged |
| 177 | #define SCREEN_NO_SPLIT_P(s) (s)->no_split | 182 | #define SCREEN_NO_SPLIT_P(s) (s)->no_split |
| 178 | #define SCREEN_WANTS_MODELINE_P(s) (s)->wants_modeline | 183 | #define SCREEN_WANTS_MODELINE_P(s) (s)->wants_modeline |
| @@ -202,6 +207,22 @@ typedef struct screen *SCREEN_PTR; | |||
| 202 | x = wrong_type_argument (Qlive_screen_p, (x)); \ | 207 | x = wrong_type_argument (Qlive_screen_p, (x)); \ |
| 203 | } | 208 | } |
| 204 | 209 | ||
| 210 | /* FOR_EACH_SCREEN (LIST_VAR, SCREEN_VAR) followed by a statement is a | ||
| 211 | `for' loop which iterates over the elements of Vscreen_list. The | ||
| 212 | loop will set SCREEN_VAR, a SCREEN_PTR, to each screen in | ||
| 213 | Vscreen_list in succession and execute the statement. LIST_VAR | ||
| 214 | should be a Lisp_Object; it is used to iterate through the | ||
| 215 | Vscreen_list. | ||
| 216 | |||
| 217 | If MULTI_SCREEN isn't defined, then this loop expands to something which | ||
| 218 | executes the statement once. */ | ||
| 219 | #define FOR_EACH_SCREEN(list_var, screen_var) \ | ||
| 220 | for ((list_var) = Vscreen_list; \ | ||
| 221 | (CONSP (list_var) \ | ||
| 222 | && (screen_var = XSCREEN (XCONS (list_var)->car), 1)); \ | ||
| 223 | list_var = XCONS (list_var)->cdr) | ||
| 224 | |||
| 225 | |||
| 205 | extern Lisp_Object Qscreenp, Qlive_screen_p; | 226 | extern Lisp_Object Qscreenp, Qlive_screen_p; |
| 206 | 227 | ||
| 207 | extern struct screen *selected_screen; | 228 | extern struct screen *selected_screen; |
| @@ -212,6 +233,10 @@ extern struct screen *make_screen (); | |||
| 212 | extern struct screen *make_minibuffer_screen (); | 233 | extern struct screen *make_minibuffer_screen (); |
| 213 | extern struct screen *make_screen_without_minibuffer (); | 234 | extern struct screen *make_screen_without_minibuffer (); |
| 214 | 235 | ||
| 236 | /* Nonzero means SCREEN_MESSAGE_BUF (selected_screen) is being used by | ||
| 237 | print. */ | ||
| 238 | extern int message_buf_print; | ||
| 239 | |||
| 215 | extern Lisp_Object Vscreen_list; | 240 | extern Lisp_Object Vscreen_list; |
| 216 | extern Lisp_Object Vdefault_screen_alist; | 241 | extern Lisp_Object Vdefault_screen_alist; |
| 217 | 242 | ||
| @@ -223,47 +248,65 @@ extern Lisp_Object Vterminal_screen; | |||
| 223 | 248 | ||
| 224 | #define SCREEN_PTR int | 249 | #define SCREEN_PTR int |
| 225 | 250 | ||
| 251 | extern struct screen the_only_screen; | ||
| 252 | |||
| 226 | extern int selected_screen; | 253 | extern int selected_screen; |
| 227 | #define last_nonminibuf_screen selected_screen | 254 | extern int last_nonminibuf_screen; |
| 255 | |||
| 256 | /* Nonzero means SCREEN_MESSAGE_BUF (selected_screen) is being used by | ||
| 257 | print. */ | ||
| 258 | extern int message_buf_print; | ||
| 228 | 259 | ||
| 229 | #define XSCREEN(s) selected_screen | 260 | #define XSCREEN(s) selected_screen |
| 230 | #define WINDOW_SCREEN(w) selected_screen | 261 | #define WINDOW_SCREEN(w) selected_screen |
| 231 | 262 | ||
| 232 | #define SCREENP(s) (XTYPE(s) == Lisp_Screen) | 263 | #define SCREENP(s) (XTYPE(s) == Lisp_Screen) |
| 233 | #define SCREEN_LIVE_P(s) 1 | 264 | #define SCREEN_LIVE_P(s) 1 |
| 234 | #define SET_SCREEN_GARBAGED(s) (screen_garbaged = 1) | ||
| 235 | #define SCREEN_IS_TERMCAP(s) 1 | 265 | #define SCREEN_IS_TERMCAP(s) 1 |
| 236 | #define SCREEN_IS_X(s) 0 | 266 | #define SCREEN_IS_X(s) 0 |
| 237 | #define SCREEN_IS_MINIBUF_ONLY(s) 0 | 267 | #define SCREEN_MINIBUF_ONLY_P(s) 0 |
| 238 | #define SCREEN_HAS_MINIBUF(s) 1 | 268 | #define SCREEN_HAS_MINIBUF(s) 1 |
| 239 | #define SCREEN_CURRENT_GLYPHS(s) current_glyphs | 269 | #define SCREEN_CURRENT_GLYPHS(s) the_only_screen.current_glyphs |
| 240 | #define SCREEN_DESIRED_GLYPHS(s) desired_glyphs | 270 | #define SCREEN_DESIRED_GLYPHS(s) the_only_screen.desired_glyphs |
| 241 | #define SCREEN_TEMP_GLYPHS(s) temp_glyphs | 271 | #define SCREEN_TEMP_GLYPHS(s) the_only_screen.temp_glyphs |
| 242 | #define SCREEN_HEIGHT(s) screen_height | 272 | #define SCREEN_HEIGHT(s) the_only_screen.height |
| 243 | #define SCREEN_WIDTH(s) screen_width | 273 | #define SCREEN_WIDTH(s) the_only_screen.width |
| 244 | #define SCREEN_NEW_HEIGHT(s) delayed_screen_height | 274 | #define SCREEN_NEW_HEIGHT(s) the_only_screen.new_height |
| 245 | #define SCREEN_NEW_WIDTH(s) delayed_screen_width | 275 | #define SCREEN_NEW_WIDTH(s) the_only_screen.new_width |
| 246 | #define SCREEN_CURSOR_X(s) cursX | 276 | #define SCREEN_CURSOR_X(s) the_only_screen.cursor_x |
| 247 | #define SCREEN_CURSOR_Y(s) cursY | 277 | #define SCREEN_CURSOR_Y(s) the_only_screen.cursor_y |
| 248 | #define SCREEN_VISIBLE_P(s) 1 | 278 | #define SCREEN_VISIBLE_P(s) 1 |
| 279 | #define SET_SCREEN_GARBAGED(s) (screen_garbaged = 1) | ||
| 249 | #define SCREEN_GARBAGED_P(s) screen_garbaged | 280 | #define SCREEN_GARBAGED_P(s) screen_garbaged |
| 250 | #define SCREEN_NO_SPLIT_P(s) 0 | 281 | #define SCREEN_NO_SPLIT_P(s) 0 |
| 251 | #define SCREEN_WANTS_MODELINE_P(s) 1 | 282 | #define SCREEN_WANTS_MODELINE_P(s) 1 |
| 252 | #define SCREEN_ICONIFIED_P(s) 0 | 283 | #define SCREEN_ICONIFIED_P(s) 0 |
| 253 | #define SCREEN_MINIBUF_WINDOW(s) minibuf_window | 284 | #define SCREEN_MINIBUF_WINDOW(s) minibuf_window |
| 254 | #define SCREEN_ROOT_WINDOW(s) root_window | 285 | #define SCREEN_ROOT_WINDOW(s) the_only_screen.root_window |
| 255 | #define SCREEN_SELECTED_WINDOW(s) selected_window | 286 | #define SCREEN_SELECTED_WINDOW(s) selected_window |
| 256 | #define SET_GLYPHS_SCREEN(glyphs,screen) | 287 | #define SET_GLYPHS_SCREEN(glyphs,screen) |
| 257 | #define SCREEN_INSERT_COST(screen) insert_line_cost | 288 | #define SCREEN_INSERT_COST(screen) the_only_screen.insert_line_cost |
| 258 | #define SCREEN_DELETE_COST(screen) delete_line_cost | 289 | #define SCREEN_DELETE_COST(screen) the_only_screen.delete_line_cost |
| 259 | #define SCREEN_INSERTN_COST(screen) insert_n_lines_cost | 290 | #define SCREEN_INSERTN_COST(screen) the_only_screen.insert_n_lines_cost |
| 260 | #define SCREEN_DELETEN_COST(screen) delete_n_lines_cost | 291 | #define SCREEN_DELETEN_COST(screen) the_only_screen.delete_n_lines_cost |
| 261 | #define SCREEN_MESSAGE_BUF(s) message_buf | 292 | #define SCREEN_MESSAGE_BUF(s) the_only_screen.message_buf |
| 262 | #define SCREEN_SCROLL_BOTTOM_VPOS(s) scroll_bottom_vpos | 293 | #define SCREEN_SCROLL_BOTTOM_VPOS(s) the_only_screen.scroll_bottom_vpos |
| 294 | #define SCREEN_FOCUS_SCREEN(s) 0 | ||
| 263 | 295 | ||
| 264 | #define CHECK_SCREEN(x, i) { ; } | 296 | #define CHECK_SCREEN(x, i) { ; } |
| 265 | 297 | #define CHECK_LIVE_SCREEN(x, y) { ; } | |
| 266 | extern int screen_width, screen_height; | 298 | |
| 267 | extern int cursX, cursY; | 299 | /* FOR_EACH_SCREEN (LIST_VAR, SCREEN_VAR) followed by a statement is a |
| 300 | `for' loop which iterates over the elements of Vscreen_list. The | ||
| 301 | loop will set SCREEN_VAR, a SCREEN_PTR, to each screen in | ||
| 302 | Vscreen_list in succession and execute the statement. LIST_VAR | ||
| 303 | should be a Lisp_Object; it is used to iterate through the | ||
| 304 | Vscreen_list. | ||
| 305 | |||
| 306 | If MULTI_SCREEN _is_ defined, then this loop expands to a real | ||
| 307 | `for' loop which traverses Vscreen_list using LIST_VAR and | ||
| 308 | SCREEN_VAR. */ | ||
| 309 | #define FOR_EACH_SCREEN(list_var, screen_var) \ | ||
| 310 | for (screen_var = (SCREEN_PTR) 1; screen_var; screen_var = (SCREEN_PTR) 0) | ||
| 268 | 311 | ||
| 269 | #endif /* not MULTI_SCREEN */ | 312 | #endif /* not MULTI_SCREEN */ |
diff --git a/src/keyboard.c b/src/keyboard.c index 97b98c98b98..cb2e56adf36 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -310,7 +310,7 @@ Lisp_Object Qevent_unmodified; | |||
| 310 | 310 | ||
| 311 | /* Symbols to use for non-text mouse positions. */ | 311 | /* Symbols to use for non-text mouse positions. */ |
| 312 | Lisp_Object Qmode_line; | 312 | Lisp_Object Qmode_line; |
| 313 | Lisp_Object Qvertical_split; | 313 | Lisp_Object Qvertical_line; |
| 314 | 314 | ||
| 315 | 315 | ||
| 316 | /* Address (if not 0) of EMACS_TIME to zero out if a SIGIO interrupt | 316 | /* Address (if not 0) of EMACS_TIME to zero out if a SIGIO interrupt |
| @@ -1625,7 +1625,8 @@ kbd_buffer_get_event () | |||
| 1625 | else if (do_mouse_tracking && mouse_moved) | 1625 | else if (do_mouse_tracking && mouse_moved) |
| 1626 | { | 1626 | { |
| 1627 | SCREEN_PTR screen; | 1627 | SCREEN_PTR screen; |
| 1628 | Lisp_Object x, y, time; | 1628 | Lisp_Object x, y; |
| 1629 | unsigned long time; | ||
| 1629 | 1630 | ||
| 1630 | (*mouse_position_hook) (&screen, &x, &y, &time); | 1631 | (*mouse_position_hook) (&screen, &x, &y, &time); |
| 1631 | XSET (Vlast_event_screen, Lisp_Screen, screen); | 1632 | XSET (Vlast_event_screen, Lisp_Screen, screen); |
| @@ -1779,7 +1780,7 @@ make_lispy_event (event) | |||
| 1779 | if (part == 1) | 1780 | if (part == 1) |
| 1780 | posn = Qmode_line; | 1781 | posn = Qmode_line; |
| 1781 | else if (part == 2) | 1782 | else if (part == 2) |
| 1782 | posn = Qvertical_split; | 1783 | posn = Qvertical_line; |
| 1783 | else | 1784 | else |
| 1784 | XSET (posn, Lisp_Int, | 1785 | XSET (posn, Lisp_Int, |
| 1785 | buffer_posn_from_coords (XWINDOW (window), | 1786 | buffer_posn_from_coords (XWINDOW (window), |
| @@ -1831,7 +1832,7 @@ static Lisp_Object | |||
| 1831 | make_lispy_movement (screen, x, y, time) | 1832 | make_lispy_movement (screen, x, y, time) |
| 1832 | SCREEN_PTR screen; | 1833 | SCREEN_PTR screen; |
| 1833 | Lisp_Object x, y; | 1834 | Lisp_Object x, y; |
| 1834 | Lisp_Object time; | 1835 | unsigned long time; |
| 1835 | { | 1836 | { |
| 1836 | Lisp_Object window; | 1837 | Lisp_Object window; |
| 1837 | int ix, iy; | 1838 | int ix, iy; |
| @@ -1852,7 +1853,7 @@ make_lispy_movement (screen, x, y, time) | |||
| 1852 | if (part == 1) | 1853 | if (part == 1) |
| 1853 | posn = Qmode_line; | 1854 | posn = Qmode_line; |
| 1854 | else if (part == 2) | 1855 | else if (part == 2) |
| 1855 | posn = Qvertical_split; | 1856 | posn = Qvertical_line; |
| 1856 | else | 1857 | else |
| 1857 | XSET (posn, Lisp_Int, buffer_posn_from_coords (XWINDOW (window), | 1858 | XSET (posn, Lisp_Int, buffer_posn_from_coords (XWINDOW (window), |
| 1858 | ix, iy)); | 1859 | ix, iy)); |
| @@ -1864,7 +1865,7 @@ make_lispy_movement (screen, x, y, time) | |||
| 1864 | Fcons (window, | 1865 | Fcons (window, |
| 1865 | Fcons (posn, | 1866 | Fcons (posn, |
| 1866 | Fcons (Fcons (x, y), | 1867 | Fcons (Fcons (x, y), |
| 1867 | Fcons (time, Qnil))))); | 1868 | Fcons (make_number (time), Qnil))))); |
| 1868 | } | 1869 | } |
| 1869 | 1870 | ||
| 1870 | 1871 | ||
| @@ -2638,6 +2639,7 @@ read_key_sequence (keybuf, bufsize, prompt) | |||
| 2638 | 2639 | ||
| 2639 | Vquit_flag = Qnil; | 2640 | Vquit_flag = Qnil; |
| 2640 | 2641 | ||
| 2642 | #ifdef MULTI_SCREEN | ||
| 2641 | /* What buffer was this event typed/moused at? */ | 2643 | /* What buffer was this event typed/moused at? */ |
| 2642 | if (XTYPE (key) == Lisp_Int || XTYPE (key) == Lisp_Symbol) | 2644 | if (XTYPE (key) == Lisp_Int || XTYPE (key) == Lisp_Symbol) |
| 2643 | buf = (XBUFFER | 2645 | buf = (XBUFFER |
| @@ -2674,6 +2676,7 @@ read_key_sequence (keybuf, bufsize, prompt) | |||
| 2674 | 2676 | ||
| 2675 | goto restart; | 2677 | goto restart; |
| 2676 | } | 2678 | } |
| 2679 | #endif | ||
| 2677 | } | 2680 | } |
| 2678 | 2681 | ||
| 2679 | first_binding = (follow_key (key, | 2682 | first_binding = (follow_key (key, |
| @@ -3512,8 +3515,8 @@ syms_of_keyboard () | |||
| 3512 | 3515 | ||
| 3513 | Qmode_line = intern ("mode-line"); | 3516 | Qmode_line = intern ("mode-line"); |
| 3514 | staticpro (&Qmode_line); | 3517 | staticpro (&Qmode_line); |
| 3515 | Qvertical_split = intern ("vertical-split"); | 3518 | Qvertical_line = intern ("vertical-line"); |
| 3516 | staticpro (&Qvertical_split); | 3519 | staticpro (&Qvertical_line); |
| 3517 | 3520 | ||
| 3518 | Qevent_kind = intern ("event-type"); | 3521 | Qevent_kind = intern ("event-type"); |
| 3519 | staticpro (&Qevent_kind); | 3522 | staticpro (&Qevent_kind); |
diff --git a/src/keyboard.h b/src/keyboard.h index a1b00ba94cf..d1cb78d7827 100644 --- a/src/keyboard.h +++ b/src/keyboard.h | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | /* Declarations useful when processing input. | 1 | /* Declarations useful when processing input. |
| 2 | Copyright (C) 1985, 1986, 1987 Free Software Foundation, Inc. | 2 | Copyright (C) 1985, 1986, 1987, 1992 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is part of GNU Emacs. | 4 | This file is part of GNU Emacs. |
| 5 | 5 | ||
| 6 | GNU Emacs is free software; you can redistribute it and/or modify | 6 | GNU Emacs is free software; you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
| 8 | the Free Software Foundation; either version 1, or (at your option) | 8 | the Free Software Foundation; either version 2, or (at your option) |
| 9 | any later version. | 9 | any later version. |
| 10 | 10 | ||
| 11 | GNU Emacs is distributed in the hope that it will be useful, | 11 | GNU Emacs is distributed in the hope that it will be useful, |
| @@ -64,5 +64,5 @@ extern Lisp_Object Qscrollbar_click; | |||
| 64 | (Fget ((event_head), Qevent_kind)) | 64 | (Fget ((event_head), Qevent_kind)) |
| 65 | 65 | ||
| 66 | /* Symbols to use for non-text mouse positions. */ | 66 | /* Symbols to use for non-text mouse positions. */ |
| 67 | extern Lisp_Object Qmode_line, Qvertical_split; | 67 | extern Lisp_Object Qmode_line, Qvertical_line; |
| 68 | 68 | ||
diff --git a/src/lisp.h b/src/lisp.h index 86885456602..d981fd74bc5 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -97,30 +97,33 @@ enum Lisp_Type | |||
| 97 | Lisp_Internal_Stream, | 97 | Lisp_Internal_Stream, |
| 98 | 98 | ||
| 99 | /* Used in a symbol value cell when the symbol's value is per-buffer. | 99 | /* Used in a symbol value cell when the symbol's value is per-buffer. |
| 100 | The actual contents are a cons cell which starts a list like this: | 100 | The actual contents are a cons cell which starts a list like this: |
| 101 | (REALVALUE BUFFER CURRENT-ALIST-ELEMENT . DEFAULT-VALUE)). | 101 | (REALVALUE BUFFER CURRENT-ALIST-ELEMENT . DEFAULT-VALUE). |
| 102 | 102 | ||
| 103 | BUFFER is the last buffer for which this symbol's value was | 103 | BUFFER is the last buffer for which this symbol's value was |
| 104 | made up to date. | 104 | made up to date. |
| 105 | 105 | ||
| 106 | CURRENT-ALIST-ELEMENT is a pointer to an element of BUFFER's | 106 | CURRENT-ALIST-ELEMENT is a pointer to an element of BUFFER's |
| 107 | b_local_var_alist, that being the element whose car is this variable. | 107 | local_var_alist, that being the element whose car is this |
| 108 | Or it can be a pointer to the (CURRENT-ALIST-ELEMENT . DEFAULT-VALUE), if BUFFER | 108 | variable. Or it can be a pointer to the |
| 109 | does not have an element in its alist for this variable | 109 | (CURRENT-ALIST-ELEMENT . DEFAULT-VALUE), |
| 110 | (that is, if BUFFER sees the default value of this variable). | 110 | if BUFFER does not have an element in its alist for this |
| 111 | 111 | variable (that is, if BUFFER sees the default value of this | |
| 112 | If we want to examine or set the value and BUFFER is current, | 112 | variable). |
| 113 | we just examine or set REALVALUE. | 113 | |
| 114 | If BUFFER is not current, we store the current REALVALUE value into | 114 | If we want to examine or set the value and BUFFER is current, |
| 115 | CURRENT-ALIST-ELEMENT, then find the appropriate alist element for | 115 | we just examine or set REALVALUE. If BUFFER is not current, we |
| 116 | the buffer now current and set up CURRENT-ALIST-ELEMENT. | 116 | store the current REALVALUE value into CURRENT-ALIST-ELEMENT, |
| 117 | Then we set REALVALUE out of that element, and store into BUFFER. | 117 | then find the appropriate alist element for the buffer now |
| 118 | 118 | current and set up CURRENT-ALIST-ELEMENT. Then we set | |
| 119 | If we are setting the variable and the current buffer does not have | 119 | REALVALUE out of that element, and store into BUFFER. |
| 120 | an alist entry for this variable, an alist entry is created. | 120 | |
| 121 | 121 | If we are setting the variable and the current buffer does not | |
| 122 | Note that REALVALUE can be a forwarding pointer. | 122 | have an alist entry for this variable, an alist entry is |
| 123 | Each time it is examined or set, forwarding must be done. */ | 123 | created. |
| 124 | |||
| 125 | Note that REALVALUE can be a forwarding pointer. Each time it | ||
| 126 | is examined or set, forwarding must be done. */ | ||
| 124 | Lisp_Buffer_Local_Value, | 127 | Lisp_Buffer_Local_Value, |
| 125 | 128 | ||
| 126 | /* Like Lisp_Buffer_Local_Value with one difference: | 129 | /* Like Lisp_Buffer_Local_Value with one difference: |
diff --git a/src/lread.c b/src/lread.c index 1f81d76b69c..630a39a4fb0 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -188,6 +188,7 @@ DEFUN ("read-event", Fread_event, Sread_event, 0, 0, 0, | |||
| 188 | val = read_char (0); | 188 | val = read_char (0); |
| 189 | return val; | 189 | return val; |
| 190 | } | 190 | } |
| 191 | #endif | ||
| 191 | 192 | ||
| 192 | DEFUN ("read-char-exclusive", Fread_char_exclusive, Sread_char_exclusive, 0, 0, 0, | 193 | DEFUN ("read-char-exclusive", Fread_char_exclusive, Sread_char_exclusive, 0, 0, 0, |
| 193 | "Read a character from the command input (keyboard or macro).\n\ | 194 | "Read a character from the command input (keyboard or macro).\n\ |
| @@ -206,7 +207,6 @@ It is returned as a number. Non character events are ignored.") | |||
| 206 | 207 | ||
| 207 | return val; | 208 | return val; |
| 208 | } | 209 | } |
| 209 | #endif /* HAVE_X_WINDOWS */ | ||
| 210 | 210 | ||
| 211 | DEFUN ("get-file-char", Fget_file_char, Sget_file_char, 0, 0, 0, | 211 | DEFUN ("get-file-char", Fget_file_char, Sget_file_char, 0, 0, 0, |
| 212 | "Don't use this yourself.") | 212 | "Don't use this yourself.") |
| @@ -501,7 +501,7 @@ readevalloop (readcharfun, stream, evalfun, printflag) | |||
| 501 | 501 | ||
| 502 | #ifndef standalone | 502 | #ifndef standalone |
| 503 | 503 | ||
| 504 | DEFUN ("eval-buffer", Feval_buffer, Seval_buffer, 0, 1, "", | 504 | DEFUN ("eval-buffer", Feval_buffer, Seval_buffer, 0, 2, "", |
| 505 | "Execute the current buffer as Lisp code.\n\ | 505 | "Execute the current buffer as Lisp code.\n\ |
| 506 | Programs can pass two arguments, BUFFER and PRINTFLAG.\n\ | 506 | Programs can pass two arguments, BUFFER and PRINTFLAG.\n\ |
| 507 | BUFFER is the buffer to evaluate (nil means use current buffer).\n\ | 507 | BUFFER is the buffer to evaluate (nil means use current buffer).\n\ |
diff --git a/src/minibuf.c b/src/minibuf.c index e024e5ecd11..9f96f15d5df 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -348,7 +348,7 @@ If non-nil second arg INITIAL-INPUT is a string to insert before reading.") | |||
| 348 | return Fread_from_minibuffer (prompt, initial_input, Qnil, Qnil, Qnil); | 348 | return Fread_from_minibuffer (prompt, initial_input, Qnil, Qnil, Qnil); |
| 349 | } | 349 | } |
| 350 | 350 | ||
| 351 | DEFUN ("read-no-blanks-input", Fread_no_blanks_input, Sread_no_blanks_input, 2, 1, 0, | 351 | DEFUN ("read-no-blanks-input", Fread_no_blanks_input, Sread_no_blanks_input, 2, 2, 0, |
| 352 | "Args PROMPT and INIT, strings. Read a string from the terminal, not allowing blanks.\n\ | 352 | "Args PROMPT and INIT, strings. Read a string from the terminal, not allowing blanks.\n\ |
| 353 | Prompt with PROMPT, and provide INIT as an initial value of the input string.") | 353 | Prompt with PROMPT, and provide INIT as an initial value of the input string.") |
| 354 | (prompt, init) | 354 | (prompt, init) |
diff --git a/src/print.c b/src/print.c index 2cd2b9c781e..534d5d67b22 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -159,7 +159,7 @@ glyph_to_str_cpy (glyphs, str) | |||
| 159 | 159 | ||
| 160 | #define PRINTCHAR(ch) printchar (ch, printcharfun) | 160 | #define PRINTCHAR(ch) printchar (ch, printcharfun) |
| 161 | 161 | ||
| 162 | /* Index of first unused element of message_buf */ | 162 | /* Index of first unused element of SCREEN_MESSAGE_BUF(selected_screen). */ |
| 163 | static int printbufidx; | 163 | static int printbufidx; |
| 164 | 164 | ||
| 165 | static void | 165 | static void |
diff --git a/src/scroll.c b/src/scroll.c index 64dfd9aef25..ed45318a26b 100644 --- a/src/scroll.c +++ b/src/scroll.c | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | /* Calculate what line insertion or deletion to do, and do it, | 1 | /* Calculate what line insertion or deletion to do, and do it, |
| 2 | Copyright (C) 1985, 1986, 1990 Free Software Foundation, Inc. | 2 | Copyright (C) 1985, 1986, 1990, 1992 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is part of GNU Emacs. | 4 | This file is part of GNU Emacs. |
| 5 | 5 | ||
| 6 | GNU Emacs is free software; you can redistribute it and/or modify | 6 | GNU Emacs is free software; you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
| 8 | the Free Software Foundation; either version 1, or (at your option) | 8 | the Free Software Foundation; either version 2, or (at your option) |
| 9 | any later version. | 9 | any later version. |
| 10 | 10 | ||
| 11 | GNU Emacs is distributed in the hope that it will be useful, | 11 | GNU Emacs is distributed in the hope that it will be useful, |
| @@ -54,15 +54,6 @@ struct matrix_elt | |||
| 54 | char deletecount; | 54 | char deletecount; |
| 55 | }; | 55 | }; |
| 56 | 56 | ||
| 57 | /* See do_line_insertion_deletion_costs for info on these arrays. */ | ||
| 58 | |||
| 59 | #ifndef MULTI_SCREEN | ||
| 60 | static int *insert_line_cost; | ||
| 61 | static int *delete_line_cost; | ||
| 62 | static int *insert_n_lines_cost; | ||
| 63 | static int *delete_n_lines_cost; | ||
| 64 | #endif | ||
| 65 | |||
| 66 | 57 | ||
| 67 | /* Determine, in matrix[i,j], the cost of updating the first j old lines | 58 | /* Determine, in matrix[i,j], the cost of updating the first j old lines |
| 68 | into the first i new lines. | 59 | into the first i new lines. |
diff --git a/src/term.c b/src/term.c index e9f7ddbcd18..3663c44ff91 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -43,11 +43,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 43 | /* Terminal charateristics that higher levels want to look at. | 43 | /* Terminal charateristics that higher levels want to look at. |
| 44 | These are all extern'd in termchar.h */ | 44 | These are all extern'd in termchar.h */ |
| 45 | 45 | ||
| 46 | #ifndef MULTI_SCREEN | ||
| 47 | int screen_width; /* Number of usable columns */ | ||
| 48 | int screen_height; /* Number of lines */ | ||
| 49 | #endif | ||
| 50 | |||
| 51 | int must_write_spaces; /* Nonzero means spaces in the text | 46 | int must_write_spaces; /* Nonzero means spaces in the text |
| 52 | must actually be output; can't just skip | 47 | must actually be output; can't just skip |
| 53 | over some columns to leave them blank. */ | 48 | over some columns to leave them blank. */ |
| @@ -103,7 +98,7 @@ int (*read_socket_hook) (); | |||
| 103 | void (*mouse_position_hook) ( /* SCREEN_PTR *s, | 98 | void (*mouse_position_hook) ( /* SCREEN_PTR *s, |
| 104 | Lisp_Object *x, | 99 | Lisp_Object *x, |
| 105 | Lisp_Object *y, | 100 | Lisp_Object *y, |
| 106 | Lisp_Object *time */ ); | 101 | unsigned long *time */ ); |
| 107 | 102 | ||
| 108 | /* When reading from a minibuffer in a different screen, Emacs wants | 103 | /* When reading from a minibuffer in a different screen, Emacs wants |
| 109 | to shift the highlight from the selected screen to the minibuffer's | 104 | to shift the highlight from the selected screen to the minibuffer's |
diff --git a/src/termchar.h b/src/termchar.h index d82ccb0bad9..7a93d762bb4 100644 --- a/src/termchar.h +++ b/src/termchar.h | |||
| @@ -19,8 +19,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | extern int baud_rate; /* Output speed in baud */ | 21 | extern int baud_rate; /* Output speed in baud */ |
| 22 | extern int screen_width; /* Number of usable columns */ | ||
| 23 | extern int screen_height; /* Number of lines */ | ||
| 24 | extern int must_write_spaces; /* Nonzero means spaces in the text | 22 | extern int must_write_spaces; /* Nonzero means spaces in the text |
| 25 | must actually be output; can't just skip | 23 | must actually be output; can't just skip |
| 26 | over some columns to leave them blank. */ | 24 | over some columns to leave them blank. */ |
diff --git a/src/termhooks.h b/src/termhooks.h index b9363eb16d7..5b5cac7315e 100644 --- a/src/termhooks.h +++ b/src/termhooks.h | |||
| @@ -50,7 +50,7 @@ extern int (*read_socket_hook) (); | |||
| 50 | extern void (*mouse_position_hook) ( /* SCREEN_PTR *s, | 50 | extern void (*mouse_position_hook) ( /* SCREEN_PTR *s, |
| 51 | Lisp_Object *x, | 51 | Lisp_Object *x, |
| 52 | Lisp_Object *y, | 52 | Lisp_Object *y, |
| 53 | Lisp_Object *time */ ); | 53 | unsigned long *time */ ); |
| 54 | 54 | ||
| 55 | /* The window system handling code should set this if the mouse has | 55 | /* The window system handling code should set this if the mouse has |
| 56 | moved since the last call to the mouse_position_hook. Calling that | 56 | moved since the last call to the mouse_position_hook. Calling that |
| @@ -135,8 +135,20 @@ struct input_event { | |||
| 135 | 135 | ||
| 136 | Lisp_Object code; | 136 | Lisp_Object code; |
| 137 | Lisp_Object part; | 137 | Lisp_Object part; |
| 138 | |||
| 139 | /* This is obviously wrong, but I'm not sure what else I should do. | ||
| 140 | Obviously, this should be a SCREEN_PTR. But that would require that | ||
| 141 | every file which #includes this one should also #include "screen.h", | ||
| 142 | which would mean that files like cm.c and other innocents would be | ||
| 143 | dragged into the set of screen.h users. Maybe the definition of this | ||
| 144 | structure should be elsewhere? In its own file? */ | ||
| 145 | #ifdef MULTI_SCREEN | ||
| 138 | struct screen *screen; | 146 | struct screen *screen; |
| 147 | #else | ||
| 148 | int screen; | ||
| 149 | #endif | ||
| 139 | int modifiers; /* See enum below for interpretation. */ | 150 | int modifiers; /* See enum below for interpretation. */ |
| 151 | |||
| 140 | Lisp_Object x, y; | 152 | Lisp_Object x, y; |
| 141 | unsigned long timestamp; | 153 | unsigned long timestamp; |
| 142 | }; | 154 | }; |
diff --git a/src/window.c b/src/window.c index ddb2661c71b..b1876a219bb 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -47,14 +47,6 @@ static struct window *decode_window(); | |||
| 47 | 47 | ||
| 48 | Lisp_Object selected_window; | 48 | Lisp_Object selected_window; |
| 49 | 49 | ||
| 50 | #ifndef MULTI_SCREEN | ||
| 51 | |||
| 52 | /* The root window for the screen. | ||
| 53 | This is accessed via SCREEN_ROOT_WINDOW (selected_screen). */ | ||
| 54 | Lisp_Object root_window; | ||
| 55 | |||
| 56 | #endif | ||
| 57 | |||
| 58 | /* The minibuffer window of the selected screen. | 50 | /* The minibuffer window of the selected screen. |
| 59 | Note that you cannot test for minibufferness of an arbitrary window | 51 | Note that you cannot test for minibufferness of an arbitrary window |
| 60 | by comparing against this; but you can test for minibufferness of | 52 | by comparing against this; but you can test for minibufferness of |
| @@ -222,7 +214,7 @@ POS defaults to point; WINDOW, to the selected window.") | |||
| 222 | posval = *compute_motion (top, 0, 0, posint, height, 0, | 214 | posval = *compute_motion (top, 0, 0, posint, height, 0, |
| 223 | XFASTINT (w->width) - 1 | 215 | XFASTINT (w->width) - 1 |
| 224 | - (XFASTINT (w->width) + XFASTINT (w->left) | 216 | - (XFASTINT (w->width) + XFASTINT (w->left) |
| 225 | != XSCREEN (w->screen)->width), | 217 | != SCREEN_WIDTH (XSCREEN (w->screen))), |
| 226 | XINT (w->hscroll), 0); | 218 | XINT (w->hscroll), 0); |
| 227 | 219 | ||
| 228 | return posval.vpos < height ? Qt : Qnil; | 220 | return posval.vpos < height ? Qt : Qnil; |
| @@ -363,9 +355,9 @@ measured in characters from the upper-left corner of the screen.\n\ | |||
| 363 | screen.\n\ | 355 | screen.\n\ |
| 364 | If COORDINATES are in the text portion of WINDOW,\n\ | 356 | If COORDINATES are in the text portion of WINDOW,\n\ |
| 365 | the coordinates relative to the window are returned.\n\ | 357 | the coordinates relative to the window are returned.\n\ |
| 366 | If they are in the mode line of WINDOW, 'mode-line is returned.\n\ | 358 | If they are in the mode line of WINDOW, `mode-line' is returned.\n\ |
| 367 | If they are on the border between WINDOW and its right sibling,\n\ | 359 | If they are on the border between WINDOW and its right sibling,\n\ |
| 368 | 'vertical-split is returned.") | 360 | `vertical-line' is returned.") |
| 369 | (coordinates, window) | 361 | (coordinates, window) |
| 370 | register Lisp_Object coordinates, window; | 362 | register Lisp_Object coordinates, window; |
| 371 | { | 363 | { |
| @@ -388,7 +380,7 @@ If they are on the border between WINDOW and its right sibling,\n\ | |||
| 388 | return Qmode_line; | 380 | return Qmode_line; |
| 389 | 381 | ||
| 390 | case 3: /* On right border of window. */ | 382 | case 3: /* On right border of window. */ |
| 391 | return Qvertical_split; | 383 | return Qvertical_line; |
| 392 | 384 | ||
| 393 | default: | 385 | default: |
| 394 | abort (); | 386 | abort (); |
| @@ -642,8 +634,8 @@ replace_window (old, replacement) | |||
| 642 | /* If OLD is its screen's root_window, then replacement is the new | 634 | /* If OLD is its screen's root_window, then replacement is the new |
| 643 | root_window for that screen. */ | 635 | root_window for that screen. */ |
| 644 | 636 | ||
| 645 | if (old == XSCREEN (o->screen)->root_window) | 637 | if (old == SCREEN_ROOT_WINDOW (XSCREEN (o->screen))) |
| 646 | XSCREEN (o->screen)->root_window = replacement; | 638 | SCREEN_ROOT_WINDOW (XSCREEN (o->screen)) = replacement; |
| 647 | 639 | ||
| 648 | p->left = o->left; | 640 | p->left = o->left; |
| 649 | p->top = o->top; | 641 | p->top = o->top; |
| @@ -1062,7 +1054,8 @@ window_loop (type, obj, mini, screens) | |||
| 1062 | 1054 | ||
| 1063 | case GET_LRU_WINDOW: | 1055 | case GET_LRU_WINDOW: |
| 1064 | /* t as arg means consider only full-width windows */ | 1056 | /* t as arg means consider only full-width windows */ |
| 1065 | if (!NILP (obj) && XFASTINT (XWINDOW (w)->width) != screen->width) | 1057 | if (!NILP (obj) && XFASTINT (XWINDOW (w)->width) |
| 1058 | != SCREEN_WIDTH (screen)) | ||
| 1066 | break; | 1059 | break; |
| 1067 | #if 0 | 1060 | #if 0 |
| 1068 | /* Ignore invisible and iconified screens. */ | 1061 | /* Ignore invisible and iconified screens. */ |
| @@ -2614,32 +2607,33 @@ init_window_once () | |||
| 2614 | #else /* not MULTI_SCREEN */ | 2607 | #else /* not MULTI_SCREEN */ |
| 2615 | extern Lisp_Object get_minibuffer (); | 2608 | extern Lisp_Object get_minibuffer (); |
| 2616 | 2609 | ||
| 2617 | root_window = make_window (); | 2610 | SCREEN_ROOT_WINDOW (selected_screen) = make_window (); |
| 2618 | minibuf_window = make_window (); | 2611 | minibuf_window = make_window (); |
| 2619 | 2612 | ||
| 2620 | XWINDOW (root_window)->next = minibuf_window; | 2613 | XWINDOW (SCREEN_ROOT_WINDOW (selected_screen))->next = minibuf_window; |
| 2621 | XWINDOW (minibuf_window)->prev = root_window; | 2614 | XWINDOW (minibuf_window)->prev = SCREEN_ROOT_WINDOW (selected_screen); |
| 2622 | 2615 | ||
| 2623 | /* These values 9 and 10 are arbitrary, | 2616 | /* These values 9 and 10 are arbitrary, |
| 2624 | just so that there is "something there." | 2617 | just so that there is "something there." |
| 2625 | Correct values are put in in init_xdisp */ | 2618 | Correct values are put in in init_xdisp */ |
| 2626 | 2619 | ||
| 2627 | XFASTINT (XWINDOW (root_window)->width) = 10; | 2620 | XFASTINT (XWINDOW (SCREEN_ROOT_WINDOW (selected_screen))->width) = 10; |
| 2628 | XFASTINT (XWINDOW (minibuf_window)->width) = 10; | 2621 | XFASTINT (XWINDOW (minibuf_window)->width) = 10; |
| 2629 | 2622 | ||
| 2630 | XFASTINT (XWINDOW (root_window)->height) = 9; | 2623 | XFASTINT (XWINDOW (SCREEN_ROOT_WINDOW (selected_screen))->height) = 9; |
| 2631 | XFASTINT (XWINDOW (minibuf_window)->top) = 9; | 2624 | XFASTINT (XWINDOW (minibuf_window)->top) = 9; |
| 2632 | XFASTINT (XWINDOW (minibuf_window)->height) = 1; | 2625 | XFASTINT (XWINDOW (minibuf_window)->height) = 1; |
| 2633 | 2626 | ||
| 2634 | /* Prevent error in Fset_window_buffer. */ | 2627 | /* Prevent error in Fset_window_buffer. */ |
| 2635 | XWINDOW (root_window)->buffer = Qt; | 2628 | XWINDOW (SCREEN_ROOT_WINDOW (selected_screen))->buffer = Qt; |
| 2636 | XWINDOW (minibuf_window)->buffer = Qt; | 2629 | XWINDOW (minibuf_window)->buffer = Qt; |
| 2637 | 2630 | ||
| 2638 | /* Now set them up for real. */ | 2631 | /* Now set them up for real. */ |
| 2639 | Fset_window_buffer (root_window, Fcurrent_buffer ()); | 2632 | Fset_window_buffer (SCREEN_ROOT_WINDOW (selected_screen), |
| 2633 | Fcurrent_buffer ()); | ||
| 2640 | Fset_window_buffer (minibuf_window, get_minibuffer (0)); | 2634 | Fset_window_buffer (minibuf_window, get_minibuffer (0)); |
| 2641 | 2635 | ||
| 2642 | selected_window = root_window; | 2636 | selected_window = SCREEN_ROOT_WINDOW (selected_screen); |
| 2643 | /* Make sure this window seems more recently used than | 2637 | /* Make sure this window seems more recently used than |
| 2644 | a newly-created, never-selected window. Increment | 2638 | a newly-created, never-selected window. Increment |
| 2645 | window_select_count so the first selection ever will get | 2639 | window_select_count so the first selection ever will get |
diff --git a/src/window.h b/src/window.h index eedaef3be16..62a6c5b0c2e 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | /* Window definitions for GNU Emacs. | 1 | /* Window definitions for GNU Emacs. |
| 2 | Copyright (C) 1985, 1986 Free Software Foundation, Inc. | 2 | Copyright (C) 1985, 1986, 1992 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is part of GNU Emacs. | 4 | This file is part of GNU Emacs. |
| 5 | 5 | ||
| 6 | GNU Emacs is free software; you can redistribute it and/or modify | 6 | GNU Emacs is free software; you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
| 8 | the Free Software Foundation; either version 1, or (at your option) | 8 | the Free Software Foundation; either version 2, or (at your option) |
| 9 | any later version. | 9 | any later version. |
| 10 | 10 | ||
| 11 | GNU Emacs is distributed in the hope that it will be useful, | 11 | GNU Emacs is distributed in the hope that it will be useful, |
diff --git a/src/xdisp.c b/src/xdisp.c index 60bdafea9d8..2808c515d47 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -167,31 +167,7 @@ int clip_changed; | |||
| 167 | int windows_or_buffers_changed; | 167 | int windows_or_buffers_changed; |
| 168 | 168 | ||
| 169 | 169 | ||
| 170 | #ifndef MULTI_SCREEN | 170 | /* Nonzero if SCREEN_MESSAGE_BUF (selected_screen) is being used by print; |
| 171 | |||
| 172 | DEFUN ("redraw-display", Fredraw_display, Sredraw_display, 0, 0, "", | ||
| 173 | "Clear the screen and output again what is supposed to appear on it.") | ||
| 174 | () | ||
| 175 | { | ||
| 176 | if (screen_height == 0) abort (); /* Some bug zeros some core */ | ||
| 177 | clear_screen (); | ||
| 178 | fflush (stdout); | ||
| 179 | clear_screen_records (); | ||
| 180 | if (screen_height == 0) abort (); /* Some bug zeros some core */ | ||
| 181 | windows_or_buffers_changed++; | ||
| 182 | /* Mark all windows as INaccurate, | ||
| 183 | so that every window will have its redisplay done. */ | ||
| 184 | mark_window_display_accurate (XWINDOW (minibuf_window)->prev, 0); | ||
| 185 | if (screen_height == 0) abort (); /* Some bug zeros some core */ | ||
| 186 | return Qnil; | ||
| 187 | } | ||
| 188 | |||
| 189 | #endif /* not MULTI_SCREEN */ | ||
| 190 | |||
| 191 | /* Buffer used for messages formatted by `message'. */ | ||
| 192 | char *message_buf; | ||
| 193 | |||
| 194 | /* Nonzero if message_buf is being used by print; | ||
| 195 | zero if being used by message. */ | 171 | zero if being used by message. */ |
| 196 | int message_buf_print; | 172 | int message_buf_print; |
| 197 | 173 | ||
| @@ -310,7 +286,7 @@ echo_area_display () | |||
| 310 | 286 | ||
| 311 | /* If desired cursor location is on this line, put it at end of text */ | 287 | /* If desired cursor location is on this line, put it at end of text */ |
| 312 | if (SCREEN_CURSOR_Y (s) == vpos) | 288 | if (SCREEN_CURSOR_Y (s) == vpos) |
| 313 | SCREEN_CURSOR_X (s) = s->desired_glyphs->used[vpos]; | 289 | SCREEN_CURSOR_X (s) = SCREEN_DESIRED_GLYPHS (s)->used[vpos]; |
| 314 | 290 | ||
| 315 | /* Fill the rest of the minibuffer window with blank lines. */ | 291 | /* Fill the rest of the minibuffer window with blank lines. */ |
| 316 | { | 292 | { |
| @@ -1786,7 +1762,7 @@ display_mode_line (w) | |||
| 1786 | and the rest of this line is mode lines of the sibling windows). */ | 1762 | and the rest of this line is mode lines of the sibling windows). */ |
| 1787 | if (XFASTINT (w->width) == SCREEN_WIDTH (s) | 1763 | if (XFASTINT (w->width) == SCREEN_WIDTH (s) |
| 1788 | || XFASTINT (XWINDOW (w->parent)->width) == SCREEN_WIDTH (s)) | 1764 | || XFASTINT (XWINDOW (w->parent)->width) == SCREEN_WIDTH (s)) |
| 1789 | s->desired_glyphs->highlight[vpos] = mode_line_inverse_video; | 1765 | SCREEN_DESIRED_GLYPHS (s)->highlight[vpos] = mode_line_inverse_video; |
| 1790 | 1766 | ||
| 1791 | #ifdef HAVE_X_WINDOWS | 1767 | #ifdef HAVE_X_WINDOWS |
| 1792 | /* I'm trying this out because I saw Unimpress use it, but it's | 1768 | /* I'm trying this out because I saw Unimpress use it, but it's |
| @@ -2325,10 +2301,6 @@ If this is zero, point is always centered after it moves off screen."); | |||
| 2325 | DEFVAR_BOOL ("mode-line-inverse-video", &mode_line_inverse_video, | 2301 | DEFVAR_BOOL ("mode-line-inverse-video", &mode_line_inverse_video, |
| 2326 | "*Non-nil means use inverse video for the mode line."); | 2302 | "*Non-nil means use inverse video for the mode line."); |
| 2327 | mode_line_inverse_video = 1; | 2303 | mode_line_inverse_video = 1; |
| 2328 | |||
| 2329 | #ifndef MULTI_SCREEN | ||
| 2330 | defsubr (&Sredraw_display); | ||
| 2331 | #endif /* MULTI_SCREEN */ | ||
| 2332 | } | 2304 | } |
| 2333 | 2305 | ||
| 2334 | /* initialize the window system */ | 2306 | /* initialize the window system */ |
diff --git a/src/xselect.c.old b/src/xselect.c.old index dea8a1cfca9..8c818b90746 100644 --- a/src/xselect.c.old +++ b/src/xselect.c.old | |||
| @@ -193,7 +193,7 @@ use X selections.") | |||
| 193 | { | 193 | { |
| 194 | BLOCK_INPUT; | 194 | BLOCK_INPUT; |
| 195 | XStoreBytes (x_current_display, | 195 | XStoreBytes (x_current_display, |
| 196 | XSTRING (string)->data, | 196 | (char *) XSTRING (string)->data, |
| 197 | XSTRING (string)->size); | 197 | XSTRING (string)->size); |
| 198 | UNBLOCK_INPUT; | 198 | UNBLOCK_INPUT; |
| 199 | } | 199 | } |
diff --git a/src/xterm.c b/src/xterm.c index 194f8d6177a..43f59d03ad2 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -1522,7 +1522,7 @@ construct_mouse_click (result, event, s, part, prefix) | |||
| 1522 | other kinds of events (focus changes and button clicks, for | 1522 | other kinds of events (focus changes and button clicks, for |
| 1523 | example), or by XQueryPointer calls; when one of these happens, we | 1523 | example), or by XQueryPointer calls; when one of these happens, we |
| 1524 | get another MotionNotify event the next time the mouse moves. This | 1524 | get another MotionNotify event the next time the mouse moves. This |
| 1525 | is at least as efficient than getting motion events when mouse | 1525 | is at least as efficient as getting motion events when mouse |
| 1526 | tracking is on, and I suspect only negligibly worse when tracking | 1526 | tracking is on, and I suspect only negligibly worse when tracking |
| 1527 | is off. | 1527 | is off. |
| 1528 | 1528 | ||
| @@ -1536,6 +1536,14 @@ construct_mouse_click (result, event, s, part, prefix) | |||
| 1536 | static SCREEN_PTR last_mouse_screen; | 1536 | static SCREEN_PTR last_mouse_screen; |
| 1537 | static XRectangle last_mouse_glyph; | 1537 | static XRectangle last_mouse_glyph; |
| 1538 | 1538 | ||
| 1539 | /* This is a hack. We would really prefer that XTmouse_position would | ||
| 1540 | return the time associated with the position it returns, but there | ||
| 1541 | doesn't seem to be any way to wrest the timestamp from the server | ||
| 1542 | along with the position query. So, we just keep track of the time | ||
| 1543 | of the last movement we received, and return that in hopes that | ||
| 1544 | it's somewhat accurate. */ | ||
| 1545 | static Time last_mouse_movement_time; | ||
| 1546 | |||
| 1539 | /* Function to report a mouse movement to the mainstream Emacs code. | 1547 | /* Function to report a mouse movement to the mainstream Emacs code. |
| 1540 | The input handler calls this. | 1548 | The input handler calls this. |
| 1541 | 1549 | ||
| @@ -1549,6 +1557,8 @@ note_mouse_position (screen, event) | |||
| 1549 | XMotionEvent *event; | 1557 | XMotionEvent *event; |
| 1550 | 1558 | ||
| 1551 | { | 1559 | { |
| 1560 | last_mouse_movement_time = event->time; | ||
| 1561 | |||
| 1552 | /* Has the mouse moved off the glyph it was on at the last sighting? */ | 1562 | /* Has the mouse moved off the glyph it was on at the last sighting? */ |
| 1553 | if (event->x < last_mouse_glyph.x | 1563 | if (event->x < last_mouse_glyph.x |
| 1554 | || event->x >= last_mouse_glyph.x + last_mouse_glyph.width | 1564 | || event->x >= last_mouse_glyph.x + last_mouse_glyph.width |
| @@ -1580,7 +1590,7 @@ static void | |||
| 1580 | XTmouse_position (s, x, y, time) | 1590 | XTmouse_position (s, x, y, time) |
| 1581 | SCREEN_PTR *s; | 1591 | SCREEN_PTR *s; |
| 1582 | Lisp_Object *x, *y; | 1592 | Lisp_Object *x, *y; |
| 1583 | Lisp_Object *time; | 1593 | unsigned long *time; |
| 1584 | { | 1594 | { |
| 1585 | int ix, iy, dummy; | 1595 | int ix, iy, dummy; |
| 1586 | Display *d = x_current_display; | 1596 | Display *d = x_current_display; |
| @@ -1635,8 +1645,11 @@ XTmouse_position (s, x, y, time) | |||
| 1635 | mouse_moved = 0; | 1645 | mouse_moved = 0; |
| 1636 | 1646 | ||
| 1637 | /* I don't know how to find the time for the last movement; it seems | 1647 | /* I don't know how to find the time for the last movement; it seems |
| 1638 | like XQueryPointer ought to return it, but it doesn't. */ | 1648 | like XQueryPointer ought to return it, but it doesn't. So, we'll |
| 1639 | *time = Qnil; | 1649 | return the time of the last MotionNotify event we received. Note |
| 1650 | that the use of motion hints means that this isn't guaranteed to | ||
| 1651 | be accurate at all. */ | ||
| 1652 | *time = last_mouse_movement_time; | ||
| 1640 | 1653 | ||
| 1641 | UNBLOCK_INPUT; | 1654 | UNBLOCK_INPUT; |
| 1642 | } | 1655 | } |