diff options
| author | Miles Bader <miles@gnu.org> | 2004-10-22 10:13:52 +0000 |
|---|---|---|
| committer | Miles Bader <miles@gnu.org> | 2004-10-22 10:13:52 +0000 |
| commit | 5ea24f9468ea9fb01253a98343a67fdb74d1817e (patch) | |
| tree | 434ee6dc5f051d6deaf0c357b97b656d16e4ed12 /src | |
| parent | 56c68b971d6f7665dd035df1ff302d794c0f294a (diff) | |
| parent | d5ddd795bdab373fe62ccfd099c270fd97da0964 (diff) | |
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-62
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-616
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-620
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-622
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-625
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-626
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-627
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-629
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-630
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-632
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-633
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-51
- miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-52
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-53
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-54
- miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-55
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-56
Update from CVS: Add lisp/legacy-gnus-agent.el
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-57
- miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-58
Update from CVS
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 131 | ||||
| -rw-r--r-- | src/Makefile.in | 5 | ||||
| -rw-r--r-- | src/config.in | 12 | ||||
| -rw-r--r-- | src/data.c | 6 | ||||
| -rw-r--r-- | src/doc.c | 16 | ||||
| -rw-r--r-- | src/editfns.c | 2 | ||||
| -rw-r--r-- | src/emacs.c | 65 | ||||
| -rw-r--r-- | src/fontset.c | 18 | ||||
| -rw-r--r-- | src/gtkutil.c | 161 | ||||
| -rw-r--r-- | src/gtkutil.h | 5 | ||||
| -rw-r--r-- | src/lastfile.c | 2 | ||||
| -rw-r--r-- | src/lisp.h | 1 | ||||
| -rw-r--r-- | src/m/ia64.h | 2 | ||||
| -rw-r--r-- | src/search.c | 21 | ||||
| -rw-r--r-- | src/w32.c | 26 | ||||
| -rw-r--r-- | src/w32fns.c | 10 | ||||
| -rw-r--r-- | src/w32term.c | 14 | ||||
| -rw-r--r-- | src/window.c | 11 | ||||
| -rw-r--r-- | src/xdisp.c | 46 | ||||
| -rw-r--r-- | src/xfns.c | 76 | ||||
| -rw-r--r-- | src/xterm.c | 36 | ||||
| -rw-r--r-- | src/xterm.h | 12 |
22 files changed, 417 insertions, 261 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9fedb52f42c..efb792df4d6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,7 +1,136 @@ +2004-10-21 K,Aa(Broly L$,1 q(Brentey <lorentey@elte.hu> + + * xterm.h (x_output): New member `xic_base_fontname'. + (FRAME_XIC_BASE_FONTNAME): New macro. + (xic_free_xfontset): Declare. + + * xfns.c (xic_create_xfontset): Share fontsets between frames + based on base_fontname. + (xic_free_xfontset): New function. + (free_frame_xic): Use it. + (xic_set_xfontset): Ditto. + + * xterm.c (xim_destroy_callback): Ditto. + + +2004-10-20 B. Anyos <banyos@freemail.hu> (tiny change) + + * w32term.c (x_draw_glyph_string): Use overline_color for overlines. + +2004-10-20 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * xterm.h (XSync): If USE_GTK, define XSync as process_all and then + XSync. + + * emacs.c (my_heap_start, heap_bss_diff, MAX_HEAP_BSS_DIFF): + New variables and constant. + (main): Calculate heap_bss_diff. If we are dumping and the + heap_bss_diff is greater than MAX_HEAP_BSS_DIFF, set PER_LINUX32 + and exec ourself again. + (Fdump_emacs): If heap_bss_diff is greater than MAX_HEAP_BSS_DIFF + print a warning. + + * lastfile.c: Make my_endbss and my_endbss_static available on all + platforms. + + * Makefile.in (RUN_TEMACS): Remove @SETARCH@. + * config.in (HAVE_PERSONALITY_LINUX32): Regenerate. + +2004-10-19 Luc Teirlinck <teirllm@auburn.edu> + + * data.c (Flocal_variable_if_set_p): Doc fix. + +2004-10-19 Jason Rumney <jasonr@gnu.org> + + * w32.c (init_environment): Set emacs_dir correctly when running + emacs from the build directory. + +2004-10-19 Richard M. Stallman <rms@gnu.org> + + * editfns.c (Fdelete_and_extract_region): + If region is empty, return null string. + +2004-10-19 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * gtkutil.h (xg_update_scrollbar_pos): Remove arguments real_left + and canon_width. + (xg_frame_cleared): Removed. + + * gtkutil.c (xg_frame_cleared, xg_fixed_handle_expose, + xg_find_top_left_in_fixed): Removed. + (xg_create_scroll_bar): Put an event box widget between + the scroll bar widget and the edit widget. + (xg_show_scroll_bar): Show the parent widget (the event box). + (xg_remove_scroll_bar): Destroy parent (the event box) also. + (xg_update_scrollbar_pos): Remove arguments real_left and canon_width. + Move the parent (the event box) widget inside the fixed widget. + Move window clear to xterm.c. + + * gtkutil.h (xg_frame_cleared): Removed. + + * xterm.c (x_clear_frame): Remove call to xg_frame_cleared + (x_scroll_bar_create, XTset_vertical_scroll_bar): Remove + arguments left and width to xg_update_scrollbar_pos. + (XTset_vertical_scroll_bar): Do x_clear_area for USE_GTK also. + +2004-10-19 Kenichi Handa <handa@m17n.org> + + * xdisp.c (display_mode_element): Fix display of wide chars. + +2004-10-18 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * gtkutil.c (xg_update_scrollbar_pos): Change XClearWindow to + gdk_window_clear and move gdk_window_process_all_updates after + clear so events are sent to the X server in correct order. + +2004-10-18 Kenichi Handa <handa@m17n.org> + + * fontset.c (fs_load_font): Use fast_string_match_ignore_case for + comparing font names. + (fs_query_fontset): Use fast_string_match for comparing fontset names. + (list_fontsets): Likewise. + + * search.c (fast_string_match_ignore_case): New function. + + * lisp.h (fast_string_match_ignore_case): Extern it. + +2004-10-17 Kim F. Storm <storm@cua.dk> + + * xdisp.c (overlay_arrow_at_row): Return overlay string rather + than bitmap if there is not left fringe. + (get_overlay_arrow_glyph_row): Also used on windows system. + (display_line): Display overlay string if no left fringe. + +2004-10-16 Jason Rumney <jasonr@gnu.org> + + * w32fns.c (w32_font_match): Encode font name being matched. + +2004-10-16 Richard M. Stallman <rms@gnu.org> + + * window.c (Fspecial_display_p): Doc fix. + +2004-10-15 Stefan <monnier@iro.umontreal.ca> + + * doc.c (Fsubstitute_command_keys): Fix remap-handling. + Don't ignore menus, because where-is-internal already does it for us. + +2004-10-15 Kim F. Storm <storm@cua.dk> + + * xdisp.c (redisplay_window): Only update fringes and vertical + border on window frames. + +2004-10-14 Andreas Schwab <schwab@suse.de> + + * m/ia64.h (DATA_SEG_BITS): Don't define. + 2004-10-14 Kim F. Storm <storm@cua.dk> * xterm.h: Include Xutil.h after keysym.h to work around bug - (incorrectly recognising AltGr key) in some X versions. + in some X versions. + +2004-10-13 Stefan Monnier <monnier@iro.umontreal.ca> + + * fns.c (map_char_table): Add missing gcpros. 2004-10-13 Stefan Monnier <monnier@iro.umontreal.ca> diff --git a/src/Makefile.in b/src/Makefile.in index 08504dcf725..80789a99e39 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -887,12 +887,7 @@ LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) \ #define OBJECTS_MACHINE #endif -#ifdef HAVE_RANDOM_HEAPSTART -#undef i386 -RUN_TEMACS = @SETARCH@ i386 ./temacs -#else RUN_TEMACS = ./temacs -#endif all: emacs${EXEEXT} OTHER_FILES diff --git a/src/config.in b/src/config.in index 49095ca4e5a..136f4ecd55d 100644 --- a/src/config.in +++ b/src/config.in @@ -414,6 +414,9 @@ Boston, MA 02111-1307, USA. */ /* Define to 1 if you have the <nlist.h> header file. */ #undef HAVE_NLIST_H +/* Define to 1 if personality LINUX32 can be set. */ +#undef HAVE_PERSONALITY_LINUX32 + /* Define to 1 if you have the png library (-lpng). */ #undef HAVE_PNG @@ -432,9 +435,6 @@ Boston, MA 02111-1307, USA. */ /* Define to 1 if you have the `random' function. */ #undef HAVE_RANDOM -/* Define to 1 if this OS randomizes the start address of the heap. */ -#undef HAVE_RANDOM_HEAPSTART - /* Define to 1 if you have the `recvfrom' function. */ #undef HAVE_RECVFROM @@ -757,9 +757,9 @@ Boston, MA 02111-1307, USA. */ /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if you have the ANSI C header files. */ diff --git a/src/data.c b/src/data.c index 558c7a974af..dd26feee264 100644 --- a/src/data.c +++ b/src/data.c @@ -1794,7 +1794,11 @@ BUFFER defaults to the current buffer. */) DEFUN ("local-variable-if-set-p", Flocal_variable_if_set_p, Slocal_variable_if_set_p, 1, 2, 0, - doc: /* Non-nil if VARIABLE will be local in buffer BUFFER if it is set there. + doc: /* Non-nil if VARIABLE will be local in buffer BUFFER when set there. +More precisely, this means that setting the variable \(with `set' or`setq'), +while it does not have a `let'-style binding that was made in BUFFER, +will produce a buffer local binding. See Info node +`(elisp)Creating Buffer-Local'. BUFFER defaults to the current buffer. */) (variable, buffer) register Lisp_Object variable, buffer; diff --git a/src/doc.c b/src/doc.c index 9a787e002d8..f722dd49b76 100644 --- a/src/doc.c +++ b/src/doc.c @@ -774,28 +774,18 @@ thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ int /* Save STRP in IDX. */ idx = strp - SDATA (string); - tem = Fintern (make_string (start, length_byte), Qnil); + name = Fintern (make_string (start, length_byte), Qnil); /* Ignore remappings unless there are no ordinary bindings. */ - tem = Fwhere_is_internal (tem, keymap, Qt, Qnil, Qt); + tem = Fwhere_is_internal (name, keymap, Qt, Qnil, Qt); if (NILP (tem)) - tem = Fwhere_is_internal (tem, keymap, Qt, Qnil, Qnil); + tem = Fwhere_is_internal (name, keymap, Qt, Qnil, Qnil); /* Note the Fwhere_is_internal can GC, so we have to take relocation of string contents into account. */ strp = SDATA (string) + idx; start = SDATA (string) + start_idx; - /* Disregard menu bar bindings; it is positively annoying to - mention them when there's no menu bar, and it isn't terribly - useful even when there is a menu bar. */ - if (!NILP (tem)) - { - firstkey = Faref (tem, make_number (0)); - if (EQ (firstkey, Qmenu_bar)) - tem = Qnil; - } - if (NILP (tem)) /* but not on any keys */ { int offset = bufp - buf; diff --git a/src/editfns.c b/src/editfns.c index 49617f7ebc9..c3a69fc3f0c 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3000,6 +3000,8 @@ DEFUN ("delete-and-extract-region", Fdelete_and_extract_region, Lisp_Object start, end; { validate_region (&start, &end); + if (XINT (start) == XINT (end)) + return build_string (""); return del_range_1 (XINT (start), XINT (end), 1, 1); } diff --git a/src/emacs.c b/src/emacs.c index 5b7394627ef..98572d7e6dc 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -67,6 +67,10 @@ Boston, MA 02111-1307, USA. */ #include <sys/resource.h> #endif +#ifdef HAVE_PERSONALITY_LINUX32 +#include <sys/personality.h> +#endif + #ifndef O_RDWR #define O_RDWR 2 #endif @@ -192,6 +196,17 @@ int display_arg; Tells GC how to save a copy of the stack. */ char *stack_bottom; +/* The address where the heap starts (from the first sbrk (0) call). */ +static void *my_heap_start; + +/* The gap between BSS end and heap start as far as we can tell. */ +static unsigned long heap_bss_diff; + +/* If the gap between BSS end and heap start is larger than this we try to + work around it, and if that fails, output a warning in dump-emacs. */ +#define MAX_HEAP_BSS_DIFF (1024*1024) + + #ifdef HAVE_WINDOW_SYSTEM extern Lisp_Object Vwindow_system; #endif /* HAVE_WINDOW_SYSTEM */ @@ -733,7 +748,11 @@ malloc_initialize_hook () free (malloc_state_ptr); } else - malloc_using_checking = getenv ("MALLOC_CHECK_") != NULL; + { + if (my_heap_start == 0) + my_heap_start = sbrk (0); + malloc_using_checking = getenv ("MALLOC_CHECK_") != NULL; + } } void (*__malloc_initialize_hook) () = malloc_initialize_hook; @@ -809,6 +828,17 @@ main (argc, argv stack_base = &dummy; #endif + if (!initialized) + { + extern char my_endbss[]; + extern char *my_endbss_static; + + if (my_heap_start == 0) + my_heap_start = sbrk (0); + + heap_bss_diff = (char *)my_heap_start - max (my_endbss, my_endbss_static); + } + #ifdef LINUX_SBRK_BUG __sbrk (1); #endif @@ -852,6 +882,28 @@ main (argc, argv } } +#ifdef HAVE_PERSONALITY_LINUX32 + /* See if there is a gap between the end of BSS and the heap. + In that case, set personality and exec ourself again. */ + if (!initialized + && (strcmp (argv[argc-1], "dump") == 0 + || strcmp (argv[argc-1], "bootstrap") == 0) + && heap_bss_diff > MAX_HEAP_BSS_DIFF) + { + if (! getenv ("EMACS_HEAP_EXEC")) + { + /* Set this so we only do this once. */ + putenv("EMACS_HEAP_EXEC=true"); + personality (PER_LINUX32); + execvp (argv[0], argv); + + /* If the exec fails, try to dump anyway. */ + perror ("execvp"); + } + } +#endif /* HAVE_PERSONALITY_LINUX32 */ + + /* Map in shared memory, if we are using that. */ #ifdef HAVE_SHM if (argmatch (argv, argc, "-nl", "--no-shared-memory", 6, NULL, &skip_args)) @@ -2138,6 +2190,17 @@ You must run Emacs in batch mode in order to dump it. */) if (! noninteractive) error ("Dumping Emacs works only in batch mode"); + if (heap_bss_diff > MAX_HEAP_BSS_DIFF) + { + fprintf (stderr, "**************************************************\n"); + fprintf (stderr, "Warning: Your system has a gap between BSS and the\n"); + fprintf (stderr, "heap. This usually means that exec-shield or\n"); + fprintf (stderr, "something similar is in effect. The dump may fail\n"); + fprintf (stderr, "because of this. See the section about exec-shield\n"); + fprintf (stderr, "in etc/PROBLEMS for more information.\n"); + fprintf (stderr, "**************************************************\n"); + } + /* Bind `command-line-processed' to nil before dumping, so that the dumped Emacs will process its command line and set up to work with X windows if appropriate. */ diff --git a/src/fontset.c b/src/fontset.c index 4901fc71419..289f5368a35 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -1126,18 +1126,17 @@ fs_query_fontset (name, regexpp) for (i = 0; i < ASIZE (Vfontset_table); i++) { - Lisp_Object fontset; - unsigned char *this_name; + Lisp_Object fontset, this_name; fontset = FONTSET_FROM_ID (i); if (NILP (fontset) || !BASE_FONTSET_P (fontset)) continue; - this_name = SDATA (FONTSET_NAME (fontset)); + this_name = FONTSET_NAME (fontset); if (regexpp - ? fast_c_string_match_ignore_case (name, this_name) >= 0 - : !strcmp (SDATA (name), this_name)) + ? fast_string_match (name, this_name) >= 0 + : !strcmp (SDATA (name), SDATA (this_name))) return i; } return -1; @@ -1189,19 +1188,18 @@ list_fontsets (f, pattern, size) for (id = 0; id < ASIZE (Vfontset_table); id++) { - Lisp_Object fontset; - unsigned char *name; + Lisp_Object fontset, name; fontset = FONTSET_FROM_ID (id); if (NILP (fontset) || !BASE_FONTSET_P (fontset) || !EQ (frame, FONTSET_FRAME (fontset))) continue; - name = SDATA (FONTSET_NAME (fontset)); + name = FONTSET_NAME (fontset); if (STRINGP (regexp) - ? (fast_c_string_match_ignore_case (regexp, name) < 0) - : strcmp (SDATA (pattern), name)) + ? (fast_string_match (regexp, name) < 0) + : strcmp (SDATA (pattern), SDATA (name))) continue; val = Fcons (Fcopy_sequence (FONTSET_NAME (fontset)), val); diff --git a/src/gtkutil.c b/src/gtkutil.c index fabdae74dc6..8182ff45766 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -550,24 +550,6 @@ xg_resize_outer_widget (f, columns, rows) gdk_window_process_all_updates (); } -/* This gets called after the frame F has been cleared. Since that is - done with X calls, we need to redraw GTK widget (scroll bars). */ -void -xg_frame_cleared (f) - FRAME_PTR f; -{ - GtkWidget *w = f->output_data.x->widget; - - if (w) - { - gtk_container_set_reallocate_redraws (GTK_CONTAINER (w), TRUE); - gtk_container_foreach (GTK_CONTAINER (w), - (GtkCallback) gtk_widget_queue_draw, - 0); - gdk_window_process_all_updates (); - } -} - /* Function to handle resize of our widgets. Since Emacs has some layouts that does not fit well with GTK standard containers, we do most layout manually. @@ -585,8 +567,10 @@ xg_resize_widgets (f, pixelwidth, pixelheight) int columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pixelwidth); if (FRAME_GTK_WIDGET (f) - && (columns != FRAME_COLS (f) || rows != FRAME_LINES (f) - || pixelwidth != FRAME_PIXEL_WIDTH (f) || pixelheight != FRAME_PIXEL_HEIGHT (f))) + && (columns != FRAME_COLS (f) + || rows != FRAME_LINES (f) + || pixelwidth != FRAME_PIXEL_WIDTH (f) + || pixelheight != FRAME_PIXEL_HEIGHT (f))) { struct x_output *x = f->output_data.x; GtkAllocation all; @@ -681,54 +665,6 @@ xg_pix_to_gcolor (w, pixel, c) gdk_colormap_query_color (map, pixel, c); } -/* Turning off double buffering for our GtkFixed widget has the side - effect of turning it off also for its children (scroll bars). - But we want those to be double buffered to not flicker so handle - expose manually here. - WIDGET is the GtkFixed widget that gets exposed. - EVENT is the expose event. - USER_DATA is unused. - - Return TRUE to tell GTK that this expose event has been fully handeled - and that GTK shall do nothing more with it. */ -static gboolean -xg_fixed_handle_expose (GtkWidget *widget, - GdkEventExpose *event, - gpointer user_data) -{ - GList *iter; - - for (iter = GTK_FIXED (widget)->children; iter; iter = g_list_next (iter)) - { - GtkFixedChild *child_data = (GtkFixedChild *) iter->data; - GtkWidget *child = child_data->widget; - GdkWindow *window = child->window; - GdkRegion *region = gtk_widget_region_intersect (child, event->region); - - if (! gdk_region_empty (region)) - { - GdkEvent child_event; - child_event.expose = *event; - child_event.expose.region = region; - - /* Turn on double buffering, i.e. draw to an off screen area. */ - gdk_window_begin_paint_region (window, region); - - /* Tell child to redraw itself. */ - gdk_region_get_clipbox (region, &child_event.expose.area); - gtk_widget_send_expose (child, &child_event); - gdk_window_process_updates (window, TRUE); - - /* Copy off screen area to the window. */ - gdk_window_end_paint (window); - } - - gdk_region_destroy (region); - } - - return TRUE; -} - /* Create and set up the GTK widgets for frame F. Return 0 if creation failed, non-zero otherwise. */ int @@ -804,12 +740,6 @@ xg_create_frame_widgets (f) a lot, so we turn off double buffering. */ gtk_widget_set_double_buffered (wfixed, FALSE); - /* Turning off double buffering above has the side effect of turning - it off also for its children (scroll bars). But we want those - to be double buffered to not flicker so handle expose manually. */ - g_signal_connect (G_OBJECT (wfixed), "expose-event", - G_CALLBACK (xg_fixed_handle_expose), 0); - /* GTK documents says use gtk_window_set_resizable. But then a user can't shrink the window from its starting size. */ gtk_window_set_policy (GTK_WINDOW (wtop), TRUE, TRUE, TRUE); @@ -2770,6 +2700,7 @@ xg_create_scroll_bar (f, bar, scroll_callback, scroll_bar_name) char *scroll_bar_name; { GtkWidget *wscroll; + GtkWidget *webox; GtkObject *vadj; int scroll_id; @@ -2779,6 +2710,7 @@ xg_create_scroll_bar (f, bar, scroll_callback, scroll_bar_name) 0.1, 0.1, 0.1); wscroll = gtk_vscrollbar_new (GTK_ADJUSTMENT (vadj)); + webox = gtk_event_box_new (); gtk_widget_set_name (wscroll, scroll_bar_name); gtk_range_set_update_policy (GTK_RANGE (wscroll), GTK_UPDATE_CONTINUOUS); @@ -2804,11 +2736,18 @@ xg_create_scroll_bar (f, bar, scroll_callback, scroll_bar_name) G_CALLBACK (scroll_bar_button_cb), (gpointer) bar); - gtk_fixed_put (GTK_FIXED (f->output_data.x->edit_widget), - wscroll, -1, -1); + /* The scroll bar widget does not draw on a window of its own. Instead + it draws on the parent window, in this case the edit widget. So + whenever the edit widget is cleared, the scroll bar needs to redraw + also, which causes flicker. Put an event box between the edit widget + and the scroll bar, so the scroll bar instead draws itself on the + event box window. */ + gtk_fixed_put (GTK_FIXED (f->output_data.x->edit_widget), webox, -1, -1); + gtk_container_add (GTK_CONTAINER (webox), wscroll); + /* Set the cursor to an arrow. */ - xg_set_cursor (wscroll, FRAME_X_DISPLAY_INFO (f)->xg_cursor); + xg_set_cursor (webox, FRAME_X_DISPLAY_INFO (f)->xg_cursor); SET_SCROLL_BAR_X_WINDOW (bar, scroll_id); } @@ -2820,7 +2759,7 @@ xg_show_scroll_bar (scrollbar_id) { GtkWidget *w = xg_get_widget_from_map (scrollbar_id); if (w) - gtk_widget_show (w); + gtk_widget_show_all (gtk_widget_get_parent (w)); } /* Remove the scroll bar represented by SCROLLBAR_ID from the frame F. */ @@ -2832,42 +2771,19 @@ xg_remove_scroll_bar (f, scrollbar_id) GtkWidget *w = xg_get_widget_from_map (scrollbar_id); if (w) { + GtkWidget *wparent = gtk_widget_get_parent (w); gtk_widget_destroy (w); + gtk_widget_destroy (wparent); SET_FRAME_GARBAGED (f); } } -/* Find left/top for widget W in GtkFixed widget WFIXED. */ -static void -xg_find_top_left_in_fixed (w, wfixed, left, top) - GtkWidget *w, *wfixed; - int *left, *top; -{ - GList *iter; - - for (iter = GTK_FIXED (wfixed)->children; iter; iter = g_list_next (iter)) - { - GtkFixedChild *child = (GtkFixedChild *) iter->data; - - if (child->widget == w) - { - *left = child->x; - *top = child->y; - return; - } - } - - /* Shall never end up here. */ - abort (); -} - /* Update the position of the vertical scroll bar represented by SCROLLBAR_ID in frame F. TOP/LEFT are the new pixel positions where the bar shall appear. WIDTH, HEIGHT is the size in pixels the bar shall have. */ void -xg_update_scrollbar_pos (f, scrollbar_id, top, left, width, height, - real_left, canon_width) +xg_update_scrollbar_pos (f, scrollbar_id, top, left, width, height) FRAME_PTR f; int scrollbar_id; int top; @@ -2881,44 +2797,11 @@ xg_update_scrollbar_pos (f, scrollbar_id, top, left, width, height, if (wscroll) { GtkWidget *wfixed = f->output_data.x->edit_widget; - - gtk_container_set_reallocate_redraws (GTK_CONTAINER (wfixed), TRUE); + GtkWidget *wparent = gtk_widget_get_parent (wscroll); /* Move and resize to new values. */ - gtk_fixed_move (GTK_FIXED (wfixed), wscroll, left, top); gtk_widget_set_size_request (wscroll, width, height); - - /* Must force out update so changed scroll bars gets redrawn. */ - gdk_window_process_all_updates (); - - /* Scroll bars in GTK has a fixed width, so if we say width 16, it - will only be its fixed width (14 is default) anyway, the rest is - blank. We are drawing the mode line across scroll bars when - the frame is split: - |bar| |fringe| - ---------------- - mode line - ---------------- - |bar| |fringe| - - When we "unsplit" the frame: - - |bar| |fringe| - -| |-| | - m¦ |i| | - -| |-| | - | | | | - - - the remains of the mode line can be seen in these blank spaces. - So we must clear them explicitly. - GTK scroll bars should do that, but they don't. - Also, the canonical width may be wider than the width for the - scroll bar so that there is some space (typically 1 pixel) between - the scroll bar and the edge of the window and between the scroll - bar and the fringe. */ - - XClearWindow (FRAME_X_DISPLAY (f), GTK_WIDGET_TO_X_WIN (wscroll)); + gtk_fixed_move (GTK_FIXED (wfixed), wparent, left, top); SET_FRAME_GARBAGED (f); cancel_mouse_face (f); diff --git a/src/gtkutil.h b/src/gtkutil.h index b35ab94b2cb..c0055f361cc 100644 --- a/src/gtkutil.h +++ b/src/gtkutil.h @@ -168,9 +168,7 @@ extern void xg_update_scrollbar_pos P_ ((FRAME_PTR f, int top, int left, int width, - int height, - int real_left, - int canon_width)); + int height)); extern void xg_set_toolkit_scroll_bar_thumb P_ ((struct scroll_bar *bar, int portion, @@ -184,7 +182,6 @@ extern void free_frame_tool_bar P_ ((FRAME_PTR f)); extern void xg_resize_widgets P_ ((FRAME_PTR f, int pixelwidth, int pixelheight)); -extern void xg_frame_cleared P_ ((FRAME_PTR f)); extern void xg_frame_set_char_size P_ ((FRAME_PTR f, int cols, int rows)); extern GtkWidget * xg_win_to_widget P_ ((Display *dpy, Window wdesc)); diff --git a/src/lastfile.c b/src/lastfile.c index df678b42876..d6292e30040 100644 --- a/src/lastfile.c +++ b/src/lastfile.c @@ -40,7 +40,6 @@ Boston, MA 02111-1307, USA. */ char my_edata[] = "End of Emacs initialized data"; -#if defined(WINDOWSNT) || defined(CYGWIN) /* Help unexec locate the end of the .bss area used by Emacs (which isn't always a separate section in NT executables). */ char my_endbss[1]; @@ -50,7 +49,6 @@ char my_endbss[1]; of the bss area used by Emacs. */ static char _my_endbss[1]; char * my_endbss_static = _my_endbss; -#endif /* arch-tag: 67e81ab4-e14f-44b2-8875-c0c12252223e (do not change this comment) */ diff --git a/src/lisp.h b/src/lisp.h index 4794f77d5a1..5e4d87595eb 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2833,6 +2833,7 @@ EXFUN (Fmatch_end, 1); EXFUN (Flooking_at, 1); extern int fast_string_match P_ ((Lisp_Object, Lisp_Object)); extern int fast_c_string_match_ignore_case P_ ((Lisp_Object, const char *)); +extern int fast_string_match_ignore_case P_ ((Lisp_Object, Lisp_Object)); extern int scan_buffer P_ ((int, int, int, int, int *, int)); extern int scan_newline P_ ((int, int, int, int, int, int)); extern int find_next_newline P_ ((int, int)); diff --git a/src/m/ia64.h b/src/m/ia64.h index 7114382d513..947bb9d4562 100644 --- a/src/m/ia64.h +++ b/src/m/ia64.h @@ -133,8 +133,6 @@ extern void r_alloc_free (); #endif /* not NOT_C_CODE */ -#define DATA_SEG_BITS 0x6000000000000000 - #define HAVE_TEXT_START /* arch-tag: 9b8e9fb2-2e49-4c22-b68f-11a488e77c66 diff --git a/src/search.c b/src/search.c index a00490fd4b3..be2ea2bcd89 100644 --- a/src/search.c +++ b/src/search.c @@ -460,6 +460,27 @@ fast_c_string_match_ignore_case (regexp, string) immediate_quit = 0; return val; } + +/* Like fast_string_match but ignore case. */ + +int +fast_string_match_ignore_case (regexp, string) + Lisp_Object regexp, string; +{ + int val; + struct re_pattern_buffer *bufp; + + bufp = compile_pattern (regexp, 0, Vascii_downcase_table, + 0, STRING_MULTIBYTE (string)); + immediate_quit = 1; + re_match_object = string; + + val = re_search (bufp, (char *) SDATA (string), + SBYTES (string), 0, + SBYTES (string), 0); + immediate_quit = 0; + return val; +} /* The newline cache: remembering which sections of text have no newlines. */ diff --git a/src/w32.c b/src/w32.c index 12d1f21b091..7b54924d736 100644 --- a/src/w32.c +++ b/src/w32.c @@ -1005,6 +1005,32 @@ init_environment (char ** argv) _snprintf (buf, sizeof(buf)-1, "emacs_dir=%s", modname); _putenv (strdup (buf)); } + /* Handle running emacs from the build directory: src/oo-spd/i386/ */ + + /* FIXME: should use substring of get_emacs_configuration (). + But I don't think the Windows build supports alpha, mips etc + anymore, so have taken the easy option for now. */ + else if (p && stricmp (p, "\\i386") == 0) + { + *p = 0; + p = strrchr (modname, '\\'); + if (p != NULL) + { + *p = 0; + p = strrchr (modname, '\\'); + if (p && stricmp (p, "\\src") == 0) + { + char buf[SET_ENV_BUF_SIZE]; + + *p = 0; + for (p = modname; *p; p++) + if (*p == '\\') *p = '/'; + + _snprintf (buf, sizeof(buf)-1, "emacs_dir=%s", modname); + _putenv (strdup (buf)); + } + } + } } for (i = 0; i < (sizeof (env_vars) / sizeof (env_vars[0])); i++) diff --git a/src/w32fns.c b/src/w32fns.c index 2b613931a9c..e5a1ca00cc3 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -5667,12 +5667,14 @@ w32_font_match (fontname, pattern) char * fontname; char * pattern; { - char *regex = alloca (strlen (pattern) * 2 + 3); - char *font_name_copy = alloca (strlen (fontname) + 1); + char *font_name_copy; char *ptr; + Lisp_Object encoded_font_name; + char *regex = alloca (strlen (pattern) * 2 + 3); - /* Copy fontname so we can modify it during comparison. */ - strcpy (font_name_copy, fontname); + /* Convert fontname to unibyte for match. */ + encoded_font_name = string_make_unibyte (build_string (fontname)); + font_name_copy = SDATA (encoded_font_name); ptr = regex; *ptr++ = '^'; diff --git a/src/w32term.c b/src/w32term.c index 574457f727f..a69552a2812 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -1360,7 +1360,6 @@ w32_text_out (s, x, y,chars,nchars) } - static void x_set_glyph_string_clipping P_ ((struct glyph_string *)); static void x_set_glyph_string_gc P_ ((struct glyph_string *)); static void x_draw_glyph_string_background P_ ((struct glyph_string *, @@ -2212,7 +2211,6 @@ x_draw_image_foreground (s) } - /* Draw a relief around the image glyph string S. */ static void @@ -2669,7 +2667,7 @@ x_draw_glyph_string (s) } else { - w32_fill_area (s->f, s->hdc, s->face->underline_color, s->x, + w32_fill_area (s->f, s->hdc, s->face->overline_color, s->x, s->y + dy, s->width, h); } } @@ -2963,14 +2961,6 @@ x_new_focus_frame (dpyinfo, frame) if (old_focus && old_focus->auto_lower) x_lower_frame (old_focus); - - - - - - - - if (dpyinfo->w32_focus_frame && dpyinfo->w32_focus_frame->auto_raise) pending_autoraise_frame = dpyinfo->w32_focus_frame; else @@ -4839,7 +4829,6 @@ w32_read_socket (sd, expected, hold_quit) if (f) x_new_focus_frame (dpyinfo, f); - dpyinfo->grabbed = 0; check_visibility = 1; break; @@ -5057,7 +5046,6 @@ w32_read_socket (sd, expected, hold_quit) } - /*********************************************************************** Text Cursor diff --git a/src/window.c b/src/window.c index 55d7d7d2799..2aa8bed7dbc 100644 --- a/src/window.c +++ b/src/window.c @@ -3214,10 +3214,13 @@ display_buffer_1 (window) } DEFUN ("special-display-p", Fspecial_display_p, Sspecial_display_p, 1, 1, 0, - doc: /* Returns non-nil if a buffer named BUFFER-NAME would be created specially. -The value is actually t if the frame should be called with default frame -parameters, and a list of frame parameters if they were specified. -See `special-display-buffer-names', and `special-display-regexps'. */) + doc: /* Returns non-nil if a buffer named BUFFER-NAME gets a special frame. +If the value is t, a frame would be created for that buffer +using the default frame parameters. If the value is a list, +it is a list of frame parameters that would be used +to make a frame for that buffer. +The variables `special-display-buffer-names' +and `special-display-regexps' control this. */) (buffer_name) Lisp_Object buffer_name; { diff --git a/src/xdisp.c b/src/xdisp.c index 53c03315853..d817e847aa3 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -8087,7 +8087,7 @@ store_frame_title (str, field_width, precision) /* Copy at most PRECISION chars from STR. */ nbytes = strlen (str); - n+= c_string_width (str, nbytes, precision, &dummy, &nbytes); + n += c_string_width (str, nbytes, precision, &dummy, &nbytes); while (nbytes--) store_frame_title_char (*str++); @@ -9634,11 +9634,13 @@ update_overlay_arrows (up_to_date) } -/* Return overlay arrow string at row, or nil. */ +/* Return overlay arrow string to display at row. + Return t if display as bitmap in left fringe. + Return nil if no overlay arrow. */ static Lisp_Object -overlay_arrow_at_row (f, row, pbitmap) - struct frame *f; +overlay_arrow_at_row (it, row, pbitmap) + struct it *it; struct glyph_row *row; int *pbitmap; { @@ -9661,9 +9663,10 @@ overlay_arrow_at_row (f, row, pbitmap) && (MATRIX_ROW_START_CHARPOS (row) == marker_position (val))) { val = overlay_arrow_string_or_property (var, pbitmap); - if (FRAME_WINDOW_P (f)) + if (FRAME_WINDOW_P (it->f) + && WINDOW_LEFT_FRINGE_WIDTH (it->w) > 0) return Qt; - else if (STRINGP (val)) + if (STRINGP (val)) return val; break; } @@ -12317,7 +12320,8 @@ redisplay_window (window, just_this_one_p) } #ifdef HAVE_WINDOW_SYSTEM - if (update_window_fringes (w, 0) + if (FRAME_WINDOW_P (f) + && update_window_fringes (w, 0) && !just_this_one_p && (used_current_matrix_p || overlay_arrow_seen) && !w->pseudo_window_p) @@ -14172,8 +14176,8 @@ usage: (trace-to-stderr STRING &rest OBJECTS) */) Building Desired Matrix Rows ***********************************************************************/ -/* Return a temporary glyph row holding the glyphs of an overlay - arrow. Only used for non-window-redisplay windows. */ +/* Return a temporary glyph row holding the glyphs of an overlay arrow. + Used for non-window-redisplay windows, and for windows w/o left fringe. */ static struct glyph_row * get_overlay_arrow_glyph_row (w, overlay_arrow_string) @@ -15054,11 +15058,11 @@ display_line (it) better to let it be displayed like cursors under X. */ if (! overlay_arrow_seen && (overlay_arrow_string - = overlay_arrow_at_row (it->f, row, &overlay_arrow_bitmap), + = overlay_arrow_at_row (it, row, &overlay_arrow_bitmap), !NILP (overlay_arrow_string))) { /* Overlay arrow in window redisplay is a fringe bitmap. */ - if (!FRAME_WINDOW_P (it->f)) + if (STRINGP (overlay_arrow_string)) { struct glyph_row *arrow_row = get_overlay_arrow_glyph_row (it->w, overlay_arrow_string); @@ -15083,10 +15087,12 @@ display_line (it) row->used[TEXT_AREA] = p2 - row->glyphs[TEXT_AREA]; } } - + else + { + it->w->overlay_arrow_bitmap = overlay_arrow_bitmap; + row->overlay_arrow_p = 1; + } overlay_arrow_seen = 1; - it->w->overlay_arrow_bitmap = overlay_arrow_bitmap; - row->overlay_arrow_p = 1; } /* Compute pixel dimensions of this line. */ @@ -15551,14 +15557,15 @@ display_mode_element (it, depth, field_width, precision, elt, props, risky) if (this - 1 != last) { + int nchars, nbytes; + /* Output to end of string or up to '%'. Field width is length of string. Don't output more than PRECISION allows us. */ --this; - prec = chars_in_text (last, this - last); - if (precision > 0 && prec > precision - n) - prec = precision - n; + prec = c_string_width (last, this - last, precision - n, + &nchars, &nbytes); if (frame_title_ptr) n += store_frame_title (last, 0, prec); @@ -15566,9 +15573,12 @@ display_mode_element (it, depth, field_width, precision, elt, props, risky) { int bytepos = last - lisp_string; int charpos = string_byte_to_char (elt, bytepos); + int endpos = (precision <= 0 ? SCHARS (elt) + : charpos + nchars); + n += store_mode_line_string (NULL, Fsubstring (elt, make_number (charpos), - make_number (charpos + prec)), + make_number (endpos)), 0, 0, 0, Qnil); } else diff --git a/src/xfns.c b/src/xfns.c index e41540a9942..3c8035c925a 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -1921,29 +1921,83 @@ static XIMStyle supported_xim_styles[] = }; -/* Create an X fontset on frame F with base font name - BASE_FONTNAME.. */ +/* Create an X fontset on frame F with base font name BASE_FONTNAME. */ static XFontSet xic_create_xfontset (f, base_fontname) struct frame *f; char *base_fontname; { - XFontSet xfs; + XFontSet xfs = NULL; char **missing_list; int missing_count; char *def_string; + Lisp_Object rest, frame; + + /* See if there is another frame already using same fontset. */ + FOR_EACH_FRAME (rest, frame) + { + struct frame *cf = XFRAME (frame); + if (cf != f && FRAME_LIVE_P (f) && FRAME_X_P (cf) + && FRAME_X_DISPLAY_INFO (cf) == FRAME_X_DISPLAY_INFO (f) + && !strcmp (FRAME_XIC_BASE_FONTNAME (cf), base_fontname)) + { + xfs = FRAME_XIC_FONTSET (cf); + break; + } + } - xfs = XCreateFontSet (FRAME_X_DISPLAY (f), - base_fontname, &missing_list, - &missing_count, &def_string); + if (!xfs) + /* New fontset. */ + xfs = XCreateFontSet (FRAME_X_DISPLAY (f), + base_fontname, &missing_list, + &missing_count, &def_string); if (missing_list) XFreeStringList (missing_list); - /* No need to free def_string. */ + if (FRAME_XIC_BASE_FONTNAME (f)) + xfree (FRAME_XIC_BASE_FONTNAME (f)); + FRAME_XIC_BASE_FONTNAME (f) = xstrdup (base_fontname); + + /* No need to free def_string. */ return xfs; } +/* Free the X fontset of frame F if it is the last frame using it. */ + +void +xic_free_xfontset (f) + struct frame *f; +{ + Lisp_Object rest, frame; + int shared_p = 0; + + if (!FRAME_XIC_FONTSET (f)) + return; + + /* See if there is another frame sharing the same fontset. */ + FOR_EACH_FRAME (rest, frame) + { + struct frame *cf = XFRAME (frame); + if (cf != f && FRAME_LIVE_P (f) && FRAME_X_P (cf) + && FRAME_X_DISPLAY_INFO (cf) == FRAME_X_DISPLAY_INFO (f) + && FRAME_XIC_FONTSET (cf) == FRAME_XIC_FONTSET (f)) + { + shared_p = 1; + break; + } + } + + if (!shared_p) + /* The fontset is not used anymore. It is safe to free it. */ + XFreeFontSet (FRAME_X_DISPLAY (f), FRAME_XIC_FONTSET (f)); + + if (FRAME_XIC_BASE_FONTNAME (f)) + xfree (FRAME_XIC_BASE_FONTNAME (f)); + FRAME_XIC_BASE_FONTNAME (f) = NULL; + FRAME_XIC_FONTSET (f) = NULL; +} + /* Value is the best input style, given user preferences USER (already checked to be supported by Emacs), and styles supported by the @@ -2094,11 +2148,9 @@ free_frame_xic (f) return; XDestroyIC (FRAME_XIC (f)); - if (FRAME_XIC_FONTSET (f)) - XFreeFontSet (FRAME_X_DISPLAY (f), FRAME_XIC_FONTSET (f)); + xic_free_xfontset (f); FRAME_XIC (f) = NULL; - FRAME_XIC_FONTSET (f) = NULL; } @@ -2177,6 +2229,8 @@ xic_set_xfontset (f, base_fontname) XVaNestedList attr; XFontSet xfs; + xic_free_xfontset (f); + xfs = xic_create_xfontset (f, base_fontname); attr = XVaCreateNestedList (0, XNFontSet, xfs, NULL); @@ -2186,8 +2240,6 @@ xic_set_xfontset (f, base_fontname) XSetICValues (FRAME_XIC (f), XNStatusAttributes, attr, NULL); XFree (attr); - if (FRAME_XIC_FONTSET (f)) - XFreeFontSet (FRAME_X_DISPLAY (f), FRAME_XIC_FONTSET (f)); FRAME_XIC_FONTSET (f) = xfs; } diff --git a/src/xterm.c b/src/xterm.c index ef469a2b82e..603df429dce 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -2829,10 +2829,6 @@ x_clear_frame () XFlush (FRAME_X_DISPLAY (f)); -#ifdef USE_GTK - xg_frame_cleared (f); -#endif - UNBLOCK_INPUT; } @@ -4867,9 +4863,7 @@ x_scroll_bar_create (w, top, left, width, height) top, left + VERTICAL_SCROLL_BAR_WIDTH_TRIM, width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2, - max (height, 1), - left, - width); + max (height, 1)); xg_show_scroll_bar (SCROLL_BAR_X_WINDOW (bar)); #else /* not USE_GTK */ Widget scroll_bar = SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar); @@ -5113,18 +5107,6 @@ XTset_vertical_scroll_bar (w, portion, whole, position) #ifdef USE_TOOLKIT_SCROLL_BARS -#ifdef USE_GTK - if (mask) - xg_update_scrollbar_pos (f, - SCROLL_BAR_X_WINDOW (bar), - top, - sb_left + VERTICAL_SCROLL_BAR_WIDTH_TRIM, - sb_width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2, - max (height, 1), - left, - width); -#else /* not USE_GTK */ - /* Move/size the scroll bar widget. */ if (mask) { @@ -5133,13 +5115,21 @@ XTset_vertical_scroll_bar (w, portion, whole, position) if (width > 0 && height > 0) x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), left, top, width, height, False); +#ifdef USE_GTK + xg_update_scrollbar_pos (f, + SCROLL_BAR_X_WINDOW (bar), + top, + sb_left + VERTICAL_SCROLL_BAR_WIDTH_TRIM, + sb_width - VERTICAL_SCROLL_BAR_WIDTH_TRIM *2, + max (height, 1)); +#else /* not USE_GTK */ XtConfigureWidget (SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar), sb_left + VERTICAL_SCROLL_BAR_WIDTH_TRIM, top, sb_width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2, max (height, 1), 0); - } #endif /* not USE_GTK */ + } #else /* not USE_TOOLKIT_SCROLL_BARS */ /* Clear areas not covered by the scroll bar because of @@ -8046,11 +8036,7 @@ xim_destroy_callback (xim, client_data, call_data) if (FRAME_X_DISPLAY_INFO (f) == dpyinfo) { FRAME_XIC (f) = NULL; - if (FRAME_XIC_FONTSET (f)) - { - XFreeFontSet (FRAME_X_DISPLAY (f), FRAME_XIC_FONTSET (f)); - FRAME_XIC_FONTSET (f) = NULL; - } + xic_free_xfontset (f); } } diff --git a/src/xterm.h b/src/xterm.h index 76cba8a2517..4e38ac18e3d 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -21,8 +21,13 @@ Boston, MA 02111-1307, USA. */ #include <X11/Xlib.h> #include <X11/cursorfont.h> + +/* Include Xutil.h after keysym.h to work around a bug that prevents + correct recognition of AltGr key in some X versions. */ + #include <X11/keysym.h> #include <X11/Xutil.h> + #include <X11/Xatom.h> #include <X11/Xresource.h> @@ -45,7 +50,9 @@ typedef Widget xt_or_gtk_widget; typedef GtkWidget *xt_or_gtk_widget; #define XtParent(x) (gtk_widget_get_parent (x)) #undef XSync -#define XSync(d, b) gdk_window_process_all_updates () +#define XSync(d, b) do { gdk_window_process_all_updates (); \ + XSync (d, b); } while (0) + #endif /* USE_GTK */ @@ -596,6 +603,7 @@ struct x_output XIC xic; XIMStyle xic_style; XFontSet xic_xfs; + char *xic_base_fontname; #endif /* Relief GCs, colors etc. */ @@ -730,6 +738,7 @@ enum #define FRAME_X_XIM_STYLES(f) (FRAME_X_DISPLAY_INFO (f)->xim_styles) #define FRAME_XIC_STYLE(f) ((f)->output_data.x->xic_style) #define FRAME_XIC_FONTSET(f) ((f)->output_data.x->xic_xfs) +#define FRAME_XIC_BASE_FONTNAME(f) ((f)->output_data.x->xic_base_fontname) /* Value is the smallest width of any character in any font on frame F. */ @@ -1039,6 +1048,7 @@ extern void x_set_menu_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object)) extern unsigned char * x_encode_text P_ ((Lisp_Object, Lisp_Object, int, int *, int *)); extern void x_implicitly_set_name P_ ((struct frame *, Lisp_Object, Lisp_Object)); +extern void xic_free_xfontset P_ ((struct frame *)); extern void create_frame_xic P_ ((struct frame *)); extern void destroy_frame_xic P_ ((struct frame *)); extern void xic_set_preeditarea P_ ((struct window *, int, int)); |
