diff options
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 84 |
1 files changed, 28 insertions, 56 deletions
diff --git a/src/lisp.h b/src/lisp.h index 5daddb7d335..b19745baf91 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -734,6 +734,7 @@ extern Lisp_Object Qarrayp, Qbufferp, Qbuffer_or_string_p, Qchar_table_p; | |||
| 734 | extern Lisp_Object Qconsp, Qfloatp, Qintegerp, Qlambda, Qlistp, Qmarkerp, Qnil; | 734 | extern Lisp_Object Qconsp, Qfloatp, Qintegerp, Qlambda, Qlistp, Qmarkerp, Qnil; |
| 735 | extern Lisp_Object Qnumberp, Qstringp, Qsymbolp, Qvectorp; | 735 | extern Lisp_Object Qnumberp, Qstringp, Qsymbolp, Qvectorp; |
| 736 | extern Lisp_Object Qvector_or_char_table_p, Qwholenump; | 736 | extern Lisp_Object Qvector_or_char_table_p, Qwholenump; |
| 737 | extern Lisp_Object Qwindow; | ||
| 737 | extern Lisp_Object Ffboundp (Lisp_Object); | 738 | extern Lisp_Object Ffboundp (Lisp_Object); |
| 738 | extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object); | 739 | extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object); |
| 739 | 740 | ||
| @@ -865,11 +866,7 @@ make_lisp_proc (struct Lisp_Process *p) | |||
| 865 | #define XSETSTRING(a, b) ((a) = make_lisp_ptr (b, Lisp_String)) | 866 | #define XSETSTRING(a, b) ((a) = make_lisp_ptr (b, Lisp_String)) |
| 866 | #define XSETSYMBOL(a, b) ((a) = make_lisp_ptr (b, Lisp_Symbol)) | 867 | #define XSETSYMBOL(a, b) ((a) = make_lisp_ptr (b, Lisp_Symbol)) |
| 867 | #define XSETFLOAT(a, b) ((a) = make_lisp_ptr (b, Lisp_Float)) | 868 | #define XSETFLOAT(a, b) ((a) = make_lisp_ptr (b, Lisp_Float)) |
| 868 | |||
| 869 | /* Misc types. */ | ||
| 870 | |||
| 871 | #define XSETMISC(a, b) ((a) = make_lisp_ptr (b, Lisp_Misc)) | 869 | #define XSETMISC(a, b) ((a) = make_lisp_ptr (b, Lisp_Misc)) |
| 872 | #define XSETMARKER(a, b) (XSETMISC (a, b), XMISCTYPE (a) = Lisp_Misc_Marker) | ||
| 873 | 870 | ||
| 874 | /* Pseudovector types. */ | 871 | /* Pseudovector types. */ |
| 875 | 872 | ||
| @@ -2163,38 +2160,6 @@ enum char_bits | |||
| 2163 | CHARACTERBITS = 22 | 2160 | CHARACTERBITS = 22 |
| 2164 | }; | 2161 | }; |
| 2165 | 2162 | ||
| 2166 | /* Structure to hold mouse highlight data. This is here because other | ||
| 2167 | header files need it for defining struct x_output etc. */ | ||
| 2168 | typedef struct { | ||
| 2169 | /* These variables describe the range of text currently shown in its | ||
| 2170 | mouse-face, together with the window they apply to. As long as | ||
| 2171 | the mouse stays within this range, we need not redraw anything on | ||
| 2172 | its account. Rows and columns are glyph matrix positions in | ||
| 2173 | MOUSE_FACE_WINDOW. */ | ||
| 2174 | int mouse_face_beg_row, mouse_face_beg_col; | ||
| 2175 | int mouse_face_beg_x, mouse_face_beg_y; | ||
| 2176 | int mouse_face_end_row, mouse_face_end_col; | ||
| 2177 | int mouse_face_end_x, mouse_face_end_y; | ||
| 2178 | Lisp_Object mouse_face_window; | ||
| 2179 | int mouse_face_face_id; | ||
| 2180 | Lisp_Object mouse_face_overlay; | ||
| 2181 | |||
| 2182 | /* FRAME and X, Y position of mouse when last checked for | ||
| 2183 | highlighting. X and Y can be negative or out of range for the frame. */ | ||
| 2184 | struct frame *mouse_face_mouse_frame; | ||
| 2185 | int mouse_face_mouse_x, mouse_face_mouse_y; | ||
| 2186 | |||
| 2187 | /* Nonzero if part of the text currently shown in | ||
| 2188 | its mouse-face is beyond the window end. */ | ||
| 2189 | unsigned mouse_face_past_end : 1; | ||
| 2190 | |||
| 2191 | /* Nonzero means defer mouse-motion highlighting. */ | ||
| 2192 | unsigned mouse_face_defer : 1; | ||
| 2193 | |||
| 2194 | /* Nonzero means that the mouse highlight should not be shown. */ | ||
| 2195 | unsigned mouse_face_hidden : 1; | ||
| 2196 | } Mouse_HLInfo; | ||
| 2197 | |||
| 2198 | /* Data type checking. */ | 2163 | /* Data type checking. */ |
| 2199 | 2164 | ||
| 2200 | LISP_MACRO_DEFUN (NILP, bool, (Lisp_Object x), (x)) | 2165 | LISP_MACRO_DEFUN (NILP, bool, (Lisp_Object x), (x)) |
| @@ -2665,19 +2630,6 @@ typedef jmp_buf sys_jmp_buf; | |||
| 2665 | they are bound by a function application or a let form, stores the | 2630 | they are bound by a function application or a let form, stores the |
| 2666 | code to be executed for unwind-protect forms. | 2631 | code to be executed for unwind-protect forms. |
| 2667 | 2632 | ||
| 2668 | If func is non-zero, undoing this binding applies func to old_value; | ||
| 2669 | This implements record_unwind_protect. | ||
| 2670 | |||
| 2671 | Otherwise, the element is a variable binding. | ||
| 2672 | |||
| 2673 | If the symbol field is a symbol, it is an ordinary variable binding. | ||
| 2674 | |||
| 2675 | Otherwise, it should be a structure (SYMBOL WHERE . CURRENT-BUFFER), | ||
| 2676 | which means having bound a local value while CURRENT-BUFFER was active. | ||
| 2677 | If WHERE is nil this means we saw the default value when binding SYMBOL. | ||
| 2678 | WHERE being a buffer or frame means we saw a buffer-local or frame-local | ||
| 2679 | value. Other values of WHERE mean an internal error. | ||
| 2680 | |||
| 2681 | NOTE: The specbinding union is defined here, because SPECPDL_INDEX is | 2633 | NOTE: The specbinding union is defined here, because SPECPDL_INDEX is |
| 2682 | used all over the place, needs to be fast, and needs to know the size of | 2634 | used all over the place, needs to be fast, and needs to know the size of |
| 2683 | union specbinding. But only eval.c should access it. */ | 2635 | union specbinding. But only eval.c should access it. */ |
| @@ -3369,8 +3321,9 @@ extern void del_range_byte (ptrdiff_t, ptrdiff_t, bool); | |||
| 3369 | extern void del_range_both (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t, bool); | 3321 | extern void del_range_both (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t, bool); |
| 3370 | extern Lisp_Object del_range_2 (ptrdiff_t, ptrdiff_t, | 3322 | extern Lisp_Object del_range_2 (ptrdiff_t, ptrdiff_t, |
| 3371 | ptrdiff_t, ptrdiff_t, bool); | 3323 | ptrdiff_t, ptrdiff_t, bool); |
| 3372 | extern void modify_region_1 (ptrdiff_t, ptrdiff_t, bool); | 3324 | extern void modify_text (ptrdiff_t, ptrdiff_t); |
| 3373 | extern void prepare_to_modify_buffer (ptrdiff_t, ptrdiff_t, ptrdiff_t *); | 3325 | extern void prepare_to_modify_buffer (ptrdiff_t, ptrdiff_t, ptrdiff_t *); |
| 3326 | extern void prepare_to_modify_buffer_1 (ptrdiff_t, ptrdiff_t, ptrdiff_t *); | ||
| 3374 | extern void signal_after_change (ptrdiff_t, ptrdiff_t, ptrdiff_t); | 3327 | extern void signal_after_change (ptrdiff_t, ptrdiff_t, ptrdiff_t); |
| 3375 | extern void adjust_after_insert (ptrdiff_t, ptrdiff_t, ptrdiff_t, | 3328 | extern void adjust_after_insert (ptrdiff_t, ptrdiff_t, ptrdiff_t, |
| 3376 | ptrdiff_t, ptrdiff_t); | 3329 | ptrdiff_t, ptrdiff_t); |
| @@ -3744,11 +3697,12 @@ extern Lisp_Object internal_condition_case_n | |||
| 3744 | Lisp_Object, Lisp_Object (*) (Lisp_Object, ptrdiff_t, Lisp_Object *)); | 3697 | Lisp_Object, Lisp_Object (*) (Lisp_Object, ptrdiff_t, Lisp_Object *)); |
| 3745 | extern void specbind (Lisp_Object, Lisp_Object); | 3698 | extern void specbind (Lisp_Object, Lisp_Object); |
| 3746 | extern void record_unwind_protect (void (*) (Lisp_Object), Lisp_Object); | 3699 | extern void record_unwind_protect (void (*) (Lisp_Object), Lisp_Object); |
| 3747 | extern void record_unwind_protect_int (void (*) (int), int); | ||
| 3748 | extern void record_unwind_protect_ptr (void (*) (void *), void *); | 3700 | extern void record_unwind_protect_ptr (void (*) (void *), void *); |
| 3701 | extern void record_unwind_protect_int (void (*) (int), int); | ||
| 3749 | extern void record_unwind_protect_void (void (*) (void)); | 3702 | extern void record_unwind_protect_void (void (*) (void)); |
| 3750 | extern void record_unwind_protect_nothing (void); | 3703 | extern void record_unwind_protect_nothing (void); |
| 3751 | extern void clear_unwind_protect (ptrdiff_t); | 3704 | extern void clear_unwind_protect (ptrdiff_t); |
| 3705 | extern void set_unwind_protect (ptrdiff_t, void (*) (Lisp_Object), Lisp_Object); | ||
| 3752 | extern void set_unwind_protect_ptr (ptrdiff_t, void (*) (void *), void *); | 3706 | extern void set_unwind_protect_ptr (ptrdiff_t, void (*) (void *), void *); |
| 3753 | extern Lisp_Object unbind_to (ptrdiff_t, Lisp_Object); | 3707 | extern Lisp_Object unbind_to (ptrdiff_t, Lisp_Object); |
| 3754 | extern _Noreturn void error (const char *, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2); | 3708 | extern _Noreturn void error (const char *, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2); |
| @@ -3797,9 +3751,7 @@ extern void fix_start_end_in_overlays (ptrdiff_t, ptrdiff_t); | |||
| 3797 | extern void report_overlay_modification (Lisp_Object, Lisp_Object, bool, | 3751 | extern void report_overlay_modification (Lisp_Object, Lisp_Object, bool, |
| 3798 | Lisp_Object, Lisp_Object, Lisp_Object); | 3752 | Lisp_Object, Lisp_Object, Lisp_Object); |
| 3799 | extern bool overlay_touches_p (ptrdiff_t); | 3753 | extern bool overlay_touches_p (ptrdiff_t); |
| 3800 | extern Lisp_Object Vbuffer_alist; | ||
| 3801 | extern Lisp_Object other_buffer_safely (Lisp_Object); | 3754 | extern Lisp_Object other_buffer_safely (Lisp_Object); |
| 3802 | extern Lisp_Object Qpriority, Qwindow, Qbefore_string, Qafter_string; | ||
| 3803 | extern Lisp_Object get_truename_buffer (Lisp_Object); | 3755 | extern Lisp_Object get_truename_buffer (Lisp_Object); |
| 3804 | extern void init_buffer_once (void); | 3756 | extern void init_buffer_once (void); |
| 3805 | extern void init_buffer (void); | 3757 | extern void init_buffer (void); |
| @@ -3830,6 +3782,9 @@ extern Lisp_Object Qfile_directory_p; | |||
| 3830 | extern Lisp_Object Qinsert_file_contents; | 3782 | extern Lisp_Object Qinsert_file_contents; |
| 3831 | extern Lisp_Object Qfile_name_history; | 3783 | extern Lisp_Object Qfile_name_history; |
| 3832 | extern Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object); | 3784 | extern Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object); |
| 3785 | extern Lisp_Object write_region (Lisp_Object, Lisp_Object, Lisp_Object, | ||
| 3786 | Lisp_Object, Lisp_Object, Lisp_Object, | ||
| 3787 | Lisp_Object, int); | ||
| 3833 | EXFUN (Fread_file_name, 6); /* Not a normal DEFUN. */ | 3788 | EXFUN (Fread_file_name, 6); /* Not a normal DEFUN. */ |
| 3834 | extern void close_file_unwind (int); | 3789 | extern void close_file_unwind (int); |
| 3835 | extern void fclose_unwind (void *); | 3790 | extern void fclose_unwind (void *); |
| @@ -3862,8 +3817,8 @@ extern ptrdiff_t fast_looking_at (Lisp_Object, ptrdiff_t, ptrdiff_t, | |||
| 3862 | ptrdiff_t, ptrdiff_t, Lisp_Object); | 3817 | ptrdiff_t, ptrdiff_t, Lisp_Object); |
| 3863 | extern ptrdiff_t find_newline (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t, | 3818 | extern ptrdiff_t find_newline (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t, |
| 3864 | ptrdiff_t, ptrdiff_t *, ptrdiff_t *, bool); | 3819 | ptrdiff_t, ptrdiff_t *, ptrdiff_t *, bool); |
| 3865 | extern EMACS_INT scan_newline (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t, | 3820 | extern ptrdiff_t scan_newline (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t, |
| 3866 | EMACS_INT, bool); | 3821 | ptrdiff_t, bool); |
| 3867 | extern ptrdiff_t find_newline_no_quit (ptrdiff_t, ptrdiff_t, | 3822 | extern ptrdiff_t find_newline_no_quit (ptrdiff_t, ptrdiff_t, |
| 3868 | ptrdiff_t, ptrdiff_t *); | 3823 | ptrdiff_t, ptrdiff_t *); |
| 3869 | extern ptrdiff_t find_before_next_newline (ptrdiff_t, ptrdiff_t, | 3824 | extern ptrdiff_t find_before_next_newline (ptrdiff_t, ptrdiff_t, |
| @@ -4096,7 +4051,6 @@ extern void init_sys_modes (struct tty_display_info *); | |||
| 4096 | extern void reset_sys_modes (struct tty_display_info *); | 4051 | extern void reset_sys_modes (struct tty_display_info *); |
| 4097 | extern void init_all_sys_modes (void); | 4052 | extern void init_all_sys_modes (void); |
| 4098 | extern void reset_all_sys_modes (void); | 4053 | extern void reset_all_sys_modes (void); |
| 4099 | extern void flush_pending_output (int) ATTRIBUTE_CONST; | ||
| 4100 | extern void child_setup_tty (int); | 4054 | extern void child_setup_tty (int); |
| 4101 | extern void setup_pty (int); | 4055 | extern void setup_pty (int); |
| 4102 | extern int set_window_size (int, int, int); | 4056 | extern int set_window_size (int, int, int); |
| @@ -4213,6 +4167,11 @@ extern void syms_of_xml (void); | |||
| 4213 | extern void xml_cleanup_parser (void); | 4167 | extern void xml_cleanup_parser (void); |
| 4214 | #endif | 4168 | #endif |
| 4215 | 4169 | ||
| 4170 | #ifdef HAVE_ZLIB | ||
| 4171 | /* Defined in decompress.c. */ | ||
| 4172 | extern void syms_of_decompress (void); | ||
| 4173 | #endif | ||
| 4174 | |||
| 4216 | #ifdef HAVE_DBUS | 4175 | #ifdef HAVE_DBUS |
| 4217 | /* Defined in dbusbind.c. */ | 4176 | /* Defined in dbusbind.c. */ |
| 4218 | void syms_of_dbusbind (void); | 4177 | void syms_of_dbusbind (void); |
| @@ -4246,10 +4205,17 @@ extern void *xnrealloc (void *, ptrdiff_t, ptrdiff_t); | |||
| 4246 | extern void *xpalloc (void *, ptrdiff_t *, ptrdiff_t, ptrdiff_t, ptrdiff_t); | 4205 | extern void *xpalloc (void *, ptrdiff_t *, ptrdiff_t, ptrdiff_t, ptrdiff_t); |
| 4247 | 4206 | ||
| 4248 | extern char *xstrdup (const char *); | 4207 | extern char *xstrdup (const char *); |
| 4208 | extern char *xlispstrdup (Lisp_Object); | ||
| 4249 | extern void xputenv (const char *); | 4209 | extern void xputenv (const char *); |
| 4250 | 4210 | ||
| 4251 | extern char *egetenv (const char *); | 4211 | extern char *egetenv (const char *); |
| 4252 | 4212 | ||
| 4213 | /* Copy Lisp string to temporary (allocated on stack) C string. */ | ||
| 4214 | |||
| 4215 | #define xlispstrdupa(string) \ | ||
| 4216 | memcpy (alloca (SBYTES (string) + 1), \ | ||
| 4217 | SSDATA (string), SBYTES (string) + 1) | ||
| 4218 | |||
| 4253 | /* Set up the name of the machine we're running on. */ | 4219 | /* Set up the name of the machine we're running on. */ |
| 4254 | extern void init_system_name (void); | 4220 | extern void init_system_name (void); |
| 4255 | 4221 | ||
| @@ -4326,6 +4292,12 @@ extern void *record_xmalloc (size_t); | |||
| 4326 | memory_full (SIZE_MAX); \ | 4292 | memory_full (SIZE_MAX); \ |
| 4327 | } while (0) | 4293 | } while (0) |
| 4328 | 4294 | ||
| 4295 | /* Do a `for' loop over alist values. */ | ||
| 4296 | |||
| 4297 | #define FOR_EACH_ALIST_VALUE(head_var, list_var, value_var) \ | ||
| 4298 | for (list_var = head_var; \ | ||
| 4299 | (CONSP (list_var) && (value_var = XCDR (XCAR (list_var)), 1)); \ | ||
| 4300 | list_var = XCDR (list_var)) | ||
| 4329 | 4301 | ||
| 4330 | /* Check whether it's time for GC, and run it if so. */ | 4302 | /* Check whether it's time for GC, and run it if so. */ |
| 4331 | 4303 | ||