diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lisp.h | 70 |
1 files changed, 37 insertions, 33 deletions
diff --git a/src/lisp.h b/src/lisp.h index f634982d6ae..e564029169b 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -79,7 +79,7 @@ enum Lisp_Misc_Type | |||
| 79 | Lisp_Misc_Buffer_Local_Value, | 79 | Lisp_Misc_Buffer_Local_Value, |
| 80 | Lisp_Misc_Some_Buffer_Local_Value, | 80 | Lisp_Misc_Some_Buffer_Local_Value, |
| 81 | Lisp_Misc_Overlay, | 81 | Lisp_Misc_Overlay, |
| 82 | Lisp_Misc_Display_Objfwd, | 82 | Lisp_Misc_Kboard_Objfwd, |
| 83 | /* Currently floats are not a misc type, | 83 | /* Currently floats are not a misc type, |
| 84 | but let's define this in case we want to change that. */ | 84 | but let's define this in case we want to change that. */ |
| 85 | Lisp_Misc_Float, | 85 | Lisp_Misc_Float, |
| @@ -384,7 +384,7 @@ extern int pure_size; | |||
| 384 | #define XBUFFER_OBJFWD(a) (&(XMISC(a)->u_buffer_objfwd)) | 384 | #define XBUFFER_OBJFWD(a) (&(XMISC(a)->u_buffer_objfwd)) |
| 385 | #define XBUFFER_LOCAL_VALUE(a) (&(XMISC(a)->u_buffer_local_value)) | 385 | #define XBUFFER_LOCAL_VALUE(a) (&(XMISC(a)->u_buffer_local_value)) |
| 386 | #define XOVERLAY(a) (&(XMISC(a)->u_overlay)) | 386 | #define XOVERLAY(a) (&(XMISC(a)->u_overlay)) |
| 387 | #define XDISPLAY_OBJFWD(a) (&(XMISC(a)->u_display_objfwd)) | 387 | #define XKBOARD_OBJFWD(a) (&(XMISC(a)->u_kboard_objfwd)) |
| 388 | 388 | ||
| 389 | /* Pseudovector types. */ | 389 | /* Pseudovector types. */ |
| 390 | #define XPROCESS(a) ((struct Lisp_Process *) XPNTR(a)) | 390 | #define XPROCESS(a) ((struct Lisp_Process *) XPNTR(a)) |
| @@ -486,17 +486,18 @@ typedef struct interval *INTERVAL; | |||
| 486 | #endif /* USE_TEXT_PROPERTIES */ | 486 | #endif /* USE_TEXT_PROPERTIES */ |
| 487 | 487 | ||
| 488 | #define ECHOBUFSIZE 300 | 488 | #define ECHOBUFSIZE 300 |
| 489 | /* All of the per-display objects, packaged together in a struct. */ | 489 | /* When more than one keyboard is in use (via make-frame-on-display), |
| 490 | typedef struct PERDISPLAY PERDISPLAY; | 490 | each will have a separate instance of this structure. */ |
| 491 | struct PERDISPLAY | 491 | typedef struct KBOARD KBOARD; |
| 492 | struct KBOARD | ||
| 492 | { | 493 | { |
| 493 | PERDISPLAY *next_perdisplay; | 494 | KBOARD *next_kboard; |
| 494 | 495 | ||
| 495 | /* The state of a prefix arg. */ | 496 | /* The state of a prefix arg. */ |
| 496 | Lisp_Object prefix_factor, prefix_value; | 497 | Lisp_Object prefix_factor, prefix_value; |
| 497 | int prefix_sign, prefix_partial; | 498 | int prefix_sign, prefix_partial; |
| 498 | 499 | ||
| 499 | /* Unread events specific to this display. */ | 500 | /* Unread events specific to this kboard. */ |
| 500 | Lisp_Object kbd_queue; | 501 | Lisp_Object kbd_queue; |
| 501 | 502 | ||
| 502 | /* Non-nil while a kbd macro is being defined. */ | 503 | /* Non-nil while a kbd macro is being defined. */ |
| @@ -528,7 +529,11 @@ struct PERDISPLAY | |||
| 528 | int kbd_queue_has_data; | 529 | int kbd_queue_has_data; |
| 529 | 530 | ||
| 530 | /* Placeholder for future vars that will be moved here. */ | 531 | /* Placeholder for future vars that will be moved here. */ |
| 531 | Lisp_Object unused[18]; | 532 | Lisp_Object unused[17]; |
| 533 | |||
| 534 | /* This is normally 1, but can be larger if you have multiple screens | ||
| 535 | on a single X display. */ | ||
| 536 | int reference_count; | ||
| 532 | 537 | ||
| 533 | /* Nonzero means echo each character as typed. */ | 538 | /* Nonzero means echo each character as typed. */ |
| 534 | int immediate_echo; | 539 | int immediate_echo; |
| @@ -545,26 +550,25 @@ struct PERDISPLAY | |||
| 545 | char echobuf[ECHOBUFSIZE]; | 550 | char echobuf[ECHOBUFSIZE]; |
| 546 | }; | 551 | }; |
| 547 | 552 | ||
| 548 | #ifdef MULTI_PERDISPLAY | 553 | #ifdef MULTI_KBOARD |
| 549 | /* The perdisplay object associated with a particular frame. */ | 554 | /* Temporarily used before a frame has been opened, and for termcap frames */ |
| 550 | extern PERDISPLAY *get_perdisplay (); | 555 | extern KBOARD *initial_kboard; |
| 551 | 556 | ||
| 552 | /* The perdisplay object associated with the command currently being read | 557 | /* The kboard object associated with the command currently being read |
| 553 | or executed. */ | 558 | or executed. */ |
| 554 | extern PERDISPLAY *current_perdisplay; | 559 | extern KBOARD *current_kboard; |
| 555 | 560 | ||
| 556 | /* A list of all perdisplay objects, linked through next_perdisplay. */ | 561 | /* A list of all kboard objects, linked through next_kboard. */ |
| 557 | extern PERDISPLAY *all_perdisplays; | 562 | extern KBOARD *all_kboards; |
| 558 | 563 | ||
| 559 | /* Nonzero if current_perdisplay has exclusive use of the keyboard. | 564 | /* Nonzero if current_kboard has exclusive use of the keyboard. |
| 560 | Usually this means that a command is being executed. */ | 565 | Usually this means that a command is being executed. */ |
| 561 | extern int display_locked; | 566 | extern int kboard_locked; |
| 562 | #else | 567 | #else |
| 563 | extern PERDISPLAY the_only_perdisplay; | 568 | extern KBOARD the_only_kboard; |
| 564 | #define get_perdisplay(f) (&the_only_perdisplay) | 569 | #define current_kboard (&the_only_kboard) |
| 565 | #define current_perdisplay (&the_only_perdisplay) | 570 | #define all_kboards (&the_only_kboard) |
| 566 | #define all_perdisplays (&the_only_perdisplay) | 571 | #define kboard_locked 1 |
| 567 | #define display_locked 1 | ||
| 568 | #endif | 572 | #endif |
| 569 | 573 | ||
| 570 | /* In a cons, the markbit of the car is the gc mark bit */ | 574 | /* In a cons, the markbit of the car is the gc mark bit */ |
| @@ -759,10 +763,10 @@ struct Lisp_Overlay | |||
| 759 | }; | 763 | }; |
| 760 | 764 | ||
| 761 | /* Like Lisp_Objfwd except that value lives in a slot in the | 765 | /* Like Lisp_Objfwd except that value lives in a slot in the |
| 762 | current perdisplay. */ | 766 | current kboard. */ |
| 763 | struct Lisp_Display_Objfwd | 767 | struct Lisp_Kboard_Objfwd |
| 764 | { | 768 | { |
| 765 | int type : 16; /* = Lisp_Misc_Display_Objfwd */ | 769 | int type : 16; /* = Lisp_Misc_Kboard_Objfwd */ |
| 766 | int spacer : 16; | 770 | int spacer : 16; |
| 767 | int offset; | 771 | int offset; |
| 768 | }; | 772 | }; |
| @@ -779,7 +783,7 @@ union Lisp_Misc | |||
| 779 | struct Lisp_Buffer_Objfwd u_buffer_objfwd; | 783 | struct Lisp_Buffer_Objfwd u_buffer_objfwd; |
| 780 | struct Lisp_Buffer_Local_Value u_buffer_local_value; | 784 | struct Lisp_Buffer_Local_Value u_buffer_local_value; |
| 781 | struct Lisp_Overlay u_overlay; | 785 | struct Lisp_Overlay u_overlay; |
| 782 | struct Lisp_Display_Objfwd u_display_objfwd; | 786 | struct Lisp_Kboard_Objfwd u_kboard_objfwd; |
| 783 | }; | 787 | }; |
| 784 | 788 | ||
| 785 | #ifdef LISP_FLOAT_TYPE | 789 | #ifdef LISP_FLOAT_TYPE |
| @@ -938,8 +942,8 @@ typedef unsigned char UCHAR; | |||
| 938 | #define GC_BUFFER_LOCAL_VALUEP(x) (GC_MISCP (x) && XMISC (x)->type == Lisp_Misc_Buffer_Local_Value) | 942 | #define GC_BUFFER_LOCAL_VALUEP(x) (GC_MISCP (x) && XMISC (x)->type == Lisp_Misc_Buffer_Local_Value) |
| 939 | #define SOME_BUFFER_LOCAL_VALUEP(x) (MISCP (x) && XMISC (x)->type == Lisp_Misc_Some_Buffer_Local_Value) | 943 | #define SOME_BUFFER_LOCAL_VALUEP(x) (MISCP (x) && XMISC (x)->type == Lisp_Misc_Some_Buffer_Local_Value) |
| 940 | #define GC_SOME_BUFFER_LOCAL_VALUEP(x) (GC_MISCP (x) && XMISC (x)->type == Lisp_Misc_Some_Buffer_Local_Value) | 944 | #define GC_SOME_BUFFER_LOCAL_VALUEP(x) (GC_MISCP (x) && XMISC (x)->type == Lisp_Misc_Some_Buffer_Local_Value) |
| 941 | #define DISPLAY_OBJFWDP(x) (MISCP (x) && XMISC (x)->type == Lisp_Misc_Display_Objfwd) | 945 | #define KBOARD_OBJFWDP(x) (MISCP (x) && XMISC (x)->type == Lisp_Misc_Kboard_Objfwd) |
| 942 | #define GC_DISPLAY_OBJFWDP(x) (GC_MISCP (x) && XMISC (x)->type == Lisp_Misc_Display_Objfwd) | 946 | #define GC_KBOARD_OBJFWDP(x) (GC_MISCP (x) && XMISC (x)->type == Lisp_Misc_Kboard_Objfwd) |
| 943 | 947 | ||
| 944 | 948 | ||
| 945 | /* True if object X is a pseudovector whose code is CODE. */ | 949 | /* True if object X is a pseudovector whose code is CODE. */ |
| @@ -1142,7 +1146,7 @@ extern void defsubr (); | |||
| 1142 | extern void defvar_lisp (); | 1146 | extern void defvar_lisp (); |
| 1143 | extern void defvar_bool (); | 1147 | extern void defvar_bool (); |
| 1144 | extern void defvar_int (); | 1148 | extern void defvar_int (); |
| 1145 | extern void defvar_display (); | 1149 | extern void defvar_kboard (); |
| 1146 | 1150 | ||
| 1147 | /* Macros we use to define forwarded Lisp variables. | 1151 | /* Macros we use to define forwarded Lisp variables. |
| 1148 | These are used in the syms_of_FILENAME functions. */ | 1152 | These are used in the syms_of_FILENAME functions. */ |
| @@ -1153,10 +1157,10 @@ extern void defvar_display (); | |||
| 1153 | #define DEFVAR_INT(lname, vname, doc) defvar_int (lname, vname) | 1157 | #define DEFVAR_INT(lname, vname, doc) defvar_int (lname, vname) |
| 1154 | #define DEFVAR_PER_BUFFER(lname, vname, type, doc) \ | 1158 | #define DEFVAR_PER_BUFFER(lname, vname, type, doc) \ |
| 1155 | defvar_per_buffer (lname, vname, type, 0) | 1159 | defvar_per_buffer (lname, vname, type, 0) |
| 1156 | #define DEFVAR_DISPLAY(lname, vname, doc) \ | 1160 | #define DEFVAR_KBOARD(lname, vname, doc) \ |
| 1157 | defvar_display (lname, \ | 1161 | defvar_kboard (lname, \ |
| 1158 | (int)((char *)(¤t_perdisplay->vname) \ | 1162 | (int)((char *)(¤t_kboard->vname) \ |
| 1159 | - (char *)current_perdisplay)) | 1163 | - (char *)current_kboard)) |
| 1160 | 1164 | ||
| 1161 | /* Structure for recording Lisp call stack for backtrace purposes. */ | 1165 | /* Structure for recording Lisp call stack for backtrace purposes. */ |
| 1162 | 1166 | ||