X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/c07bb40b73856e3c40daf1dc6007ea13e3870912..d74d9a81f64671e00b375955eb12d213a0cc3a53:/src/lisp.h diff --git a/src/lisp.h b/src/lisp.h index 7cdd5536bb..65ea46fae1 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -6,7 +6,7 @@ This file is part of GNU Emacs. GNU Emacs is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) +the Free Software Foundation; either version 3, or (at your option) any later version. GNU Emacs is distributed in the hope that it will be useful, @@ -274,7 +274,8 @@ typedef EMACS_INT Lisp_Object; /* In a pseudovector, the size field actually contains a word with one PSEUDOVECTOR_FLAG bit set, and exactly one of the following bits to - indicate the actual type. */ + indicate the actual type. + FIXME: Why a bitset if only one of the bits can ever be set at a time? */ enum pvec_type { PVEC_NORMAL_VECTOR = 0, @@ -288,7 +289,8 @@ enum pvec_type PVEC_BOOL_VECTOR = 0x10000, PVEC_BUFFER = 0x20000, PVEC_HASH_TABLE = 0x40000, - PVEC_TYPE_MASK = 0x7fe00 + PVEC_TERMINAL = 0x80000, + PVEC_TYPE_MASK = 0xffe00 #if 0 /* This is used to make the value of PSEUDOVECTOR_FLAG available to GDB. It doesn't work on OS Alpha. Moved to a variable in @@ -538,6 +540,7 @@ extern size_t pure_size; #define XPROCESS(a) (eassert (GC_PROCESSP(a)),(struct Lisp_Process *) XPNTR(a)) #define XWINDOW(a) (eassert (GC_WINDOWP(a)),(struct window *) XPNTR(a)) +#define XTERMINAL(a) (eassert (GC_TERMINALP(a)),(struct terminal *) XPNTR(a)) #define XSUBR(a) (eassert (GC_SUBRP(a)),(struct Lisp_Subr *) XPNTR(a)) #define XBUFFER(a) (eassert (GC_BUFFERP(a)),(struct buffer *) XPNTR(a)) #define XCHAR_TABLE(a) ((struct Lisp_Char_Table *) XPNTR(a)) @@ -565,6 +568,7 @@ extern size_t pure_size; (XSETPSEUDOVECTOR (a, b, PVEC_WINDOW_CONFIGURATION)) #define XSETPROCESS(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_PROCESS)) #define XSETWINDOW(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_WINDOW)) +#define XSETTERMINAL(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_TERMINAL)) #define XSETSUBR(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_SUBR)) #define XSETCOMPILED(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_COMPILED)) #define XSETBUFFER(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_BUFFER)) @@ -891,7 +895,7 @@ struct Lisp_Subr Lisp_Object (*function) (); short min_args, max_args; char *symbol_name; - char *prompt; + char *intspec; char *doc; }; @@ -1444,7 +1448,7 @@ typedef unsigned char UCHAR; #define GLYPH_CHAR(f, g) (FAST_GLYPH_CHAR (g)) #define GLYPH_FACE(f, g) (FAST_GLYPH_FACE (g)) -/* Return 1 iff GLYPH contains valid character code. */ +/* Return 1 if GLYPH contains valid character code. */ #define GLYPH_CHAR_VALID_P(glyph) CHAR_VALID_P (FAST_GLYPH_CHAR (glyph), 1) /* The ID of the mode line highlighting face. */ @@ -1517,6 +1521,8 @@ typedef unsigned char UCHAR; #define GC_PROCESSP(x) GC_PSEUDOVECTORP (x, PVEC_PROCESS) #define WINDOWP(x) PSEUDOVECTORP (x, PVEC_WINDOW) #define GC_WINDOWP(x) GC_PSEUDOVECTORP (x, PVEC_WINDOW) +#define TERMINALP(x) PSEUDOVECTORP (x, PVEC_TERMINAL) +#define GC_TERMINALP(x) GC_PSEUDOVECTORP (x, PVEC_TERMINAL) #define SUBRP(x) PSEUDOVECTORP (x, PVEC_SUBR) #define GC_SUBRP(x) GC_PSEUDOVECTORP (x, PVEC_SUBR) #define COMPILEDP(x) PSEUDOVECTORP (x, PVEC_COMPILED) @@ -1591,7 +1597,7 @@ typedef unsigned char UCHAR; "dead", which is what we want; this is an argument-checking macro, and the user should never get access to interior windows. - A window of any sort, leaf or interior, is dead iff the buffer, + A window of any sort, leaf or interior, is dead if the buffer, vchild, and hchild members are all nil. */ #define CHECK_LIVE_WINDOW(x) \ @@ -1669,30 +1675,33 @@ typedef unsigned char UCHAR; followed by the address of a vector of Lisp_Objects which contains the argument values. UNEVALLED means pass the list of unevaluated arguments - `prompt' says how to read arguments for an interactive call. - See the doc string for `interactive'. + `intspec' says how interactive arguments are to be fetched. + If the string starts with a `(', `intspec' is evaluated and the resulting + list is the list of arguments. + If it's a string that doesn't start with `(', the value should follow + the one of the doc string for `interactive'. A null string means call interactively with no arguments. `doc' is documentation for the user. */ #if (!defined (__STDC__) && !defined (PROTOTYPES)) \ || defined (USE_NONANSI_DEFUN) -#define DEFUN(lname, fnname, sname, minargs, maxargs, prompt, doc) \ +#define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc) \ Lisp_Object fnname (); \ DECL_ALIGN (struct Lisp_Subr, sname) = \ { PVEC_SUBR | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)), \ - fnname, minargs, maxargs, lname, prompt, 0}; \ + fnname, minargs, maxargs, lname, intspec, 0}; \ Lisp_Object fnname #else /* This version of DEFUN declares a function prototype with the right arguments, so we can catch errors with maxargs at compile-time. */ -#define DEFUN(lname, fnname, sname, minargs, maxargs, prompt, doc) \ +#define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc) \ Lisp_Object fnname DEFUN_ARGS_ ## maxargs ; \ DECL_ALIGN (struct Lisp_Subr, sname) = \ { PVEC_SUBR | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)), \ - fnname, minargs, maxargs, lname, prompt, 0}; \ + fnname, minargs, maxargs, lname, intspec, 0}; \ Lisp_Object fnname /* Note that the weird token-substitution semantics of ANSI C makes @@ -2597,6 +2606,7 @@ extern struct Lisp_Hash_Table *allocate_hash_table P_ ((void)); extern struct window *allocate_window P_ ((void)); extern struct frame *allocate_frame P_ ((void)); extern struct Lisp_Process *allocate_process P_ ((void)); +extern struct terminal *allocate_terminal P_ ((void)); extern int gc_in_progress; extern int abort_on_gc; extern Lisp_Object make_float P_ ((double)); @@ -2992,6 +3002,10 @@ extern Lisp_Object Qvertical_scroll_bar; extern void discard_mouse_events P_ ((void)); EXFUN (Fevent_convert_list, 1); EXFUN (Fread_key_sequence, 5); +EXFUN (Fset_input_interrupt_mode, 1); +EXFUN (Fset_output_flow_control, 2); +EXFUN (Fset_input_meta_mode, 2); +EXFUN (Fset_quit_char, 1); EXFUN (Fset_input_mode, 4); extern int detect_input_pending P_ ((void)); extern int detect_input_pending_ignore_squeezables P_ ((void)); @@ -3005,6 +3019,7 @@ extern void init_keyboard P_ ((void)); extern void syms_of_keyboard P_ ((void)); extern void keys_of_keyboard P_ ((void)); extern char *push_key_description P_ ((unsigned int, char *, int)); +extern void add_user_signal P_ ((int sig, const char *name)); /* defined in indent.c */ @@ -3047,6 +3062,7 @@ EXFUN (Fvisible_frame_list, 0); EXFUN (Fframe_parameter, 2); EXFUN (Fframe_parameters, 1); EXFUN (Fmodify_frame_parameters, 2); +EXFUN (Fframe_with_environment, 1); EXFUN (Fset_frame_height, 3); EXFUN (Fset_frame_width, 3); EXFUN (Fset_frame_size, 3); @@ -3115,7 +3131,7 @@ EXFUN (Fcall_process, MANY); extern int child_setup P_ ((int, int, int, char **, int, Lisp_Object)); extern void init_callproc_1 P_ ((void)); extern void init_callproc P_ ((void)); -extern void set_process_environment P_ ((void)); +extern void set_initial_environment P_ ((void)); extern void syms_of_callproc P_ ((void)); /* defined in doc.c */ @@ -3177,28 +3193,31 @@ EXFUN (Fx_popup_menu, 2); EXFUN (Fx_popup_dialog, 3); extern void syms_of_xmenu P_ ((void)); +/* defined in termchar.h */ +struct tty_display_info; + +/* defined in termhooks.h */ +struct terminal; + /* defined in sysdep.c */ #ifndef HAVE_GET_CURRENT_DIR_NAME extern char *get_current_dir_name P_ ((void)); #endif extern void stuff_char P_ ((char c)); extern void init_sigio P_ ((int)); -extern void request_sigio P_ ((void)); -extern void unrequest_sigio P_ ((void)); -extern void reset_sys_modes P_ ((void)); extern void sys_subshell P_ ((void)); extern void sys_suspend P_ ((void)); extern void discard_tty_input P_ ((void)); -extern void init_sys_modes P_ ((void)); -extern void get_frame_size P_ ((int *, int *)); +extern void init_sys_modes P_ ((struct tty_display_info *)); +extern void reset_sys_modes P_ ((struct tty_display_info *)); +extern void init_all_sys_modes P_ ((void)); +extern void reset_all_sys_modes P_ ((void)); extern void wait_for_termination P_ ((int)); extern void flush_pending_output P_ ((int)); extern void child_setup_tty P_ ((int)); extern void setup_pty P_ ((int)); extern int set_window_size P_ ((int, int, int)); extern void create_process P_ ((Lisp_Object, char **, Lisp_Object)); -extern int tabs_safe_p P_ ((void)); -extern void init_baud_rate P_ ((void)); extern int emacs_open P_ ((const char *, int, int)); extern int emacs_close P_ ((int)); extern int emacs_read P_ ((int, char *, unsigned int)); @@ -3233,6 +3252,9 @@ extern void syms_of_dired P_ ((void)); extern void syms_of_term P_ ((void)); extern void fatal () NO_RETURN; +/* Defined in terminal.c */ +extern void syms_of_terminal P_ ((void)); + #ifdef HAVE_WINDOW_SYSTEM /* Defined in fontset.c */ extern void syms_of_fontset P_ ((void)); @@ -3377,6 +3399,11 @@ extern Lisp_Object Vdirectory_sep_char; #define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b)) +/* Make sure we have abs defined */ +#if !defined(abs) +#define abs(x) ((x) < 0 ? -(x) : (x)) +#endif + /* Return a fixnum or float, depending on whether VAL fits in a Lisp fixnum. */