From ddaa36e16efa267f40158baca709a58d2d748743 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 28 Jul 2008 12:25:11 +0000 Subject: [PATCH] * lisp.h (init_weak_hash_tables, syms_of_font) (xd_read_queued_messages, syms_of_dbusbind): Declare. (remove_hash_entry): Don't declare. * eval.c (maybe_call_debugger): Make static and move before use. * gtkutil.c: Include if HAVE_XFT. * xdisp.c: Include "gtkutil.h" if USE_GTK. * xterm.h (x_set_frame_alpha): Declare. --- src/ChangeLog | 10 +++++++++ src/eval.c | 60 +++++++++++++++++++++++++-------------------------- src/gtkutil.c | 3 +++ src/lisp.h | 11 +++++++++- src/xdisp.c | 3 +++ src/xterm.h | 1 + 6 files changed, 57 insertions(+), 31 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 3bf0a6a9b1..bde16b646a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2008-07-28 Andreas Schwab + + * lisp.h (init_weak_hash_tables, syms_of_font) + (xd_read_queued_messages, syms_of_dbusbind): Declare. + (remove_hash_entry): Don't declare. + * eval.c (maybe_call_debugger): Make static and move before use. + * gtkutil.c: Include if HAVE_XFT. + * xdisp.c: Include "gtkutil.h" if USE_GTK. + * xterm.h (x_set_frame_alpha): Declare. + 2008-07-28 Jan Djärv * gtkutil.c (menu_nav_ended): Revert change from 2008-07-24. diff --git a/src/eval.c b/src/eval.c index 045d6090a3..fc69f8bb80 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1875,6 +1875,36 @@ skip_debugger (conditions, data) return 0; } +/* Call the debugger if calling it is currently enabled for CONDITIONS. + SIG and DATA describe the signal, as in find_handler_clause. */ + +static int +maybe_call_debugger (conditions, sig, data) + Lisp_Object conditions, sig, data; +{ + Lisp_Object combined_data; + + combined_data = Fcons (sig, data); + + if ( + /* Don't try to run the debugger with interrupts blocked. + The editing loop would return anyway. */ + ! INPUT_BLOCKED_P + /* Does user want to enter debugger for this kind of error? */ + && (EQ (sig, Qquit) + ? debug_on_quit + : wants_debugger (Vdebug_on_error, conditions)) + && ! skip_debugger (conditions, combined_data) + /* rms: what's this for? */ + && when_entered_debugger < num_nonmacro_input_events) + { + call_debugger (Fcons (Qerror, Fcons (combined_data, Qnil))); + return 1; + } + + return 0; +} + /* Value of Qlambda means we have called debugger and user has continued. There are two ways to pass SIG and DATA: = SIG is the error symbol, and DATA is the rest of the data. @@ -1975,36 +2005,6 @@ find_handler_clause (handlers, conditions, sig, data) return Qnil; } -/* Call the debugger if calling it is currently enabled for CONDITIONS. - SIG and DATA describe the signal, as in find_handler_clause. */ - -int -maybe_call_debugger (conditions, sig, data) - Lisp_Object conditions, sig, data; -{ - Lisp_Object combined_data; - - combined_data = Fcons (sig, data); - - if ( - /* Don't try to run the debugger with interrupts blocked. - The editing loop would return anyway. */ - ! INPUT_BLOCKED_P - /* Does user wants to enter debugger for this kind of error? */ - && (EQ (sig, Qquit) - ? debug_on_quit - : wants_debugger (Vdebug_on_error, conditions)) - && ! skip_debugger (conditions, combined_data) - /* rms: what's this for? */ - && when_entered_debugger < num_nonmacro_input_events) - { - call_debugger (Fcons (Qerror, Fcons (combined_data, Qnil))); - return 1; - } - - return 0; -} - /* dump an error message; called like printf */ /* VARARGS 1 */ diff --git a/src/gtkutil.c b/src/gtkutil.c index 2d47068293..65b67e3d24 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -36,6 +36,9 @@ along with GNU Emacs. If not, see . */ #include "coding.h" #include +#ifdef HAVE_XFT +#include +#endif #define FRAME_TOTAL_PIXEL_HEIGHT(f) \ (FRAME_PIXEL_HEIGHT (f) + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f)) diff --git a/src/lisp.h b/src/lisp.h index 872a8c9d99..d7fcd0a178 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2350,7 +2350,7 @@ int hash_lookup P_ ((struct Lisp_Hash_Table *, Lisp_Object, unsigned *)); int hash_put P_ ((struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object, unsigned)); void hash_clear P_ ((struct Lisp_Hash_Table *)); -void remove_hash_entry P_ ((struct Lisp_Hash_Table *, int)); +void init_weak_hash_tables P_ ((void)); extern void init_fns P_ ((void)); EXFUN (Fsxhash, 1); EXFUN (Fmake_hash_table, MANY); @@ -3285,6 +3285,9 @@ extern void fatal P_ ((const char *msgid, ...)) NO_RETURN; EXFUN (Fdelete_terminal, 2); extern void syms_of_terminal P_ ((void)); +/* Defined in font.c */ +extern void syms_of_font P_ ((void)); + #ifdef HAVE_WINDOW_SYSTEM /* Defined in fontset.c */ extern void syms_of_fontset P_ ((void)); @@ -3329,6 +3332,12 @@ EXFUN (Fmsdos_downcase_filename, 1); /* Defined in (x|w32)fns.c... */ extern int have_menus_p P_ ((void)); #endif + +#ifdef HAVE_DBUS +/* Defined in dbusbind.c */ +void xd_read_queued_messages P_ ((void)); +void syms_of_dbusbind P_ ((void)); +#endif /* Nonzero means Emacs has already been initialized. Used during startup to detect startup of dumped Emacs. */ diff --git a/src/xdisp.c b/src/xdisp.c index ba8ff1b685..88882cf1a1 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -199,6 +199,9 @@ along with GNU Emacs. If not, see . */ #ifdef HAVE_NS #include "nsterm.h" #endif +#ifdef USE_GTK +#include "gtkutil.h" +#endif #include "font.h" diff --git a/src/xterm.h b/src/xterm.h index 581f8ca23c..3643883402 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -385,6 +385,7 @@ extern Lisp_Object Vx_pixel_size_width_font_regexp; extern struct x_display_info *x_display_info_for_display P_ ((Display *)); extern struct x_display_info *x_display_info_for_name P_ ((Lisp_Object)); +extern void x_set_frame_alpha P_ ((struct frame *)); extern struct x_display_info *x_term_init P_ ((Lisp_Object, char *, char *)); extern int x_display_ok P_ ((const char *)); -- 2.20.1