? gw.patch ? munge.awk ? Root ? tabfix.patch ? tmp ? ToDo ? etc/anim.gif ? etc/ChangeLog ? lib-src/patch.exe.core ? lib-src/run.res ? lisp/.emacs_andyp ? lisp/but.patch ? lisp/f.patch ? lisp/fl.el ? lisp/font-lock.el.dist ? lisp/font-lock.el.new ? lisp/gserv.patch ? lisp/mule ? lisp/prim ? lisp/sel.patch ? lisp/wid-edit.el.new ? lwlib/hi.patch ? lwlib/hilit.patch ? lwlib/tmp ? lwlib/tsync.patch ? lwlib/xlwtabs.c.new ? man/internals/patch.exe.core ? modules/ChangeLog ? modules/gg.patch ? nt/Installation ? nt/obj ? nt/puresize-adjust.h ? nt/xemacs.mak+ ? nt/xemacs95.mak ? src/cc1.exe.stackdump ? src/dialog-msw.c.new ? src/dist ? src/emacs.c.mine ? src/emacs.c.new ? src/glyphs-x.c- ? src/gut.patch ? src/l ? src/lay.tgz ? src/mkdc ? src/new ? src/Readme.txt ? src/redisplay-output.c.new ? src/symsinit.h.mine ? src/t.c ? src/TDOC ? src/temacs-lineno.plog ? src/temacs.exe.core ? src/temacs.exe.stackdump ? src/temacs.plog ? src/tstdoc ? src/weblogic.log ? src/xemacs.exe.stackdump ? src/s/.emacs_andyp ? src/s/mingw32.h.new ? src/s/mn.patch ? src/s/wn.patch Index: lib-src/movemail.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/lib-src/movemail.c,v retrieving revision 1.13.2.12 diff -u -r1.13.2.12 movemail.c --- lib-src/movemail.c 2000/02/07 00:02:03 1.13.2.12 +++ lib-src/movemail.c 2000/02/17 13:43:22 @@ -204,7 +204,9 @@ #define DEFAULT_LOCKING DOTLOCKING #endif +#ifndef DISABLE_DIRECT_ACCESS static void lock_dot(char *); +#endif static void unlock_dot(char *); static int parse_lock_method(char *); static char *unparse_lock_method(int); @@ -566,6 +568,7 @@ static char *dotlock_filename = NULL; +#ifndef DISABLE_DIRECT_ACCESS static void lock_dot(char *filename) { @@ -625,6 +628,7 @@ } strcpy(dotlock_filename, filename); } +#endif /* not DISABLE_DIRECT_ACCESS */ static void unlock_dot(char *filename) Index: lisp/buffer.el =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/lisp/buffer.el,v retrieving revision 1.3.2.3 diff -u -r1.3.2.3 buffer.el --- lisp/buffer.el 1999/08/05 10:22:37 1.3.2.3 +++ lisp/buffer.el 2000/02/17 13:43:22 @@ -60,11 +60,10 @@ (set-buffer-major-mode buf)))) (push-window-configuration) (set-buffer buf) - (or norecord (record-buffer buf)) (set-window-buffer (if (eq (selected-window) (minibuffer-window)) (next-window (minibuffer-window)) (selected-window)) - buf) + buf norecord) buf)) (defun pop-to-buffer (bufname &optional not-this-window-p on-frame) Index: lisp/gutter-items.el =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/lisp/Attic/gutter-items.el,v retrieving revision 1.1.2.27 diff -u -r1.1.2.27 gutter-items.el --- lisp/gutter-items.el 2000/02/07 20:53:54 1.1.2.27 +++ lisp/gutter-items.el 2000/02/17 13:43:25 @@ -160,7 +160,7 @@ "For use as a value for `buffers-tab-switch-to-buffer-function'." (unless (eq (window-buffer) buffer) (if (> (length (windows-of-buffer buffer)) 0) - (select-window (car (windows-of-buffer buffer))) + (select-window (car (windows-of-buffer buffer)) t) (switch-to-buffer buffer t)))) (defun select-buffers-tab-buffers-by-mode (buf1 buf2) Index: lwlib/xlwgauge.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/lwlib/Attic/xlwgauge.c,v retrieving revision 1.1.2.8 diff -u -r1.1.2.8 xlwgauge.c --- lwlib/xlwgauge.c 2000/01/28 12:45:48 1.1.2.8 +++ lwlib/xlwgauge.c 2000/02/17 13:43:29 @@ -466,7 +466,7 @@ if( gw->gauge.nlabels > 1 ) { char label[20], *s = label ; - int len, w,h =0 ; + int xlen, wd,h =0 ; if( gw->gauge.orientation == XtorientHorizontal ) y = gw->gauge.lmargin + gw->label.font->max_bounds.ascent - 1 ; @@ -483,13 +483,13 @@ s = gw->gauge.labels[i] ; if( s != NULL ) { x = e0 + i*(e1-e0-1)/(gw->gauge.nlabels-1) ; - len = strlen(s) ; + xlen = strlen(s) ; if( gw->gauge.orientation == XtorientHorizontal ) { - w = XTextWidth(gw->label.font, s, len) ; - XDrawString(dpy,win,gc, x-w/2,y, s,len) ; + wd = XTextWidth(gw->label.font, s, xlen) ; + XDrawString(dpy,win,gc, x-wd/2,y, s,xlen) ; } else { - XDrawString(dpy,win,gc, y,x+h, s,len) ; + XDrawString(dpy,win,gc, y,x+h, s,xlen) ; } } } Index: nt/inc/sys/time.h =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/nt/inc/sys/time.h,v retrieving revision 1.1 diff -u -r1.1 time.h --- nt/inc/sys/time.h 1997/04/02 04:35:24 1.1 +++ nt/inc/sys/time.h 2000/02/17 13:43:43 @@ -4,11 +4,15 @@ #include +#if defined(__MINGW32__) +#include +#else struct timeval { long tv_sec; /* seconds */ long tv_usec; /* microseconds */ }; +#endif struct timezone { Index: src/glyphs-msw.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/glyphs-msw.c,v retrieving revision 1.21.2.43 diff -u -r1.21.2.43 glyphs-msw.c --- src/glyphs-msw.c 2000/02/09 19:20:17 1.21.2.43 +++ src/glyphs-msw.c 2000/02/17 13:44:15 @@ -2509,7 +2509,9 @@ static void mswindows_button_update (Lisp_Object image_instance) { + /* This function can GC if IN_REDISPLAY is false. */ Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); + /* buttons checked or otherwise */ if (gui_item_selected_p (IMAGE_INSTANCE_WIDGET_ITEM (ii))) SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii), @@ -2723,7 +2725,7 @@ { Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); - if (IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii)); + if (IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii)) { HWND wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii); int i = 0; Index: src/glyphs-x.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/glyphs-x.c,v retrieving revision 1.49.2.54 diff -u -r1.49.2.54 glyphs-x.c --- src/glyphs-x.c 2000/02/13 20:22:25 1.49.2.54 +++ src/glyphs-x.c 2000/02/17 13:44:27 @@ -2180,31 +2180,11 @@ static void x_update_widget (Lisp_Image_Instance *p) { + /* This function can GC if IN_REDISPLAY is false. */ #ifdef HAVE_WIDGETS widget_value* wv = 0; Boolean deep_p = False; - /* Possibly update the size. */ - if (IMAGE_INSTANCE_SIZE_CHANGED (p)) - { - Arg al[2]; - - assert (IMAGE_INSTANCE_X_WIDGET_ID (p) && - IMAGE_INSTANCE_X_CLIPWIDGET (p)) ; - if ( !XtIsManaged(IMAGE_INSTANCE_X_WIDGET_ID (p)) - || - IMAGE_INSTANCE_X_WIDGET_ID (p)->core.being_destroyed ) - { - Lisp_Object sw; - XSETIMAGE_INSTANCE (sw, p); - signal_simple_error ("XEmacs bug: subwindow is deleted", sw); - } - - XtSetArg (al [0], XtNwidth, (Dimension)IMAGE_INSTANCE_WIDTH (p)); - XtSetArg (al [1], XtNheight, (Dimension)IMAGE_INSTANCE_HEIGHT (p)); - XtSetValues (IMAGE_INSTANCE_X_WIDGET_ID (p), al, 2); - } - /* First get the items if they have changed since this is a structural change. */ if (IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (p)) { @@ -2234,6 +2214,33 @@ lw_modify_all_widgets (IMAGE_INSTANCE_X_WIDGET_LWID (p), wv, deep_p); free_widget_value_tree (wv); + + /* Possibly update the size. Do this last in case anything has + fiddled with the size previously. */ + /* #### FIXME: for some reason the widget gets resized even when we + don't want it to. This may be a bug in the tab widget. The work + around is to always resize in update - that way we can guarantee + that we get what we should at the expense of a little + performance. */ + if (1 /*IMAGE_INSTANCE_SIZE_CHANGED (p) */) + { + Arg al[2]; + + assert (IMAGE_INSTANCE_X_WIDGET_ID (p) && + IMAGE_INSTANCE_X_CLIPWIDGET (p)) ; + + if (IMAGE_INSTANCE_X_WIDGET_ID (p)->core.being_destroyed + || !XtIsManaged(IMAGE_INSTANCE_X_WIDGET_ID (p))) + { + Lisp_Object sw; + XSETIMAGE_INSTANCE (sw, p); + signal_simple_error ("XEmacs bug: subwindow is deleted", sw); + } + + XtSetArg (al [0], XtNwidth, (Dimension)IMAGE_INSTANCE_WIDTH (p)); + XtSetArg (al [1], XtNheight, (Dimension)IMAGE_INSTANCE_HEIGHT (p)); + XtSetValues (IMAGE_INSTANCE_X_WIDGET_ID (p), al, 2); + } #endif } Index: src/glyphs.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/glyphs.c,v retrieving revision 1.23.2.49 diff -u -r1.23.2.49 glyphs.c --- src/glyphs.c 2000/02/13 20:22:26 1.23.2.49 +++ src/glyphs.c 2000/02/17 13:44:41 @@ -580,6 +580,7 @@ int dest_mask, Lisp_Object glyph) { Lisp_Object ii = allocate_image_instance (device, glyph); + Lisp_Image_Instance* p = XIMAGE_INSTANCE (ii); struct image_instantiator_methods *meths; struct gcpro gcpro1; int methp = 0; @@ -608,6 +609,18 @@ pointer_bg, dest_mask, domain)); UNGCPRO; + /* Some code may have already laid out the widget, if not then do it + here. */ + if (IMAGE_INSTANCE_LAYOUT_CHANGED (p)) + image_instance_layout (ii, IMAGE_UNSPECIFIED_GEOMETRY, + IMAGE_UNSPECIFIED_GEOMETRY, domain); + + /* We *must* have a clean image at this point. */ + IMAGE_INSTANCE_TEXT_CHANGED (p) = 0; + IMAGE_INSTANCE_SIZE_CHANGED (p) = 0; + IMAGE_INSTANCE_LAYOUT_CHANGED (p) = 0; + IMAGE_INSTANCE_DIRTYP (p) = 0; + return ii; } @@ -977,7 +990,6 @@ lp->parent = glyph; /* So that layouts get done. */ lp->layout_changed = 1; - lp->dirty = 1; XSETIMAGE_INSTANCE (val, lp); MARK_GLYPHS_CHANGED; @@ -2672,7 +2684,14 @@ static Lisp_Object image_instantiate_cache_result (Lisp_Object locative) { - /* locative = (instance instantiator . subtable) */ + /* locative = (instance instantiator . subtable) + + So we are using the instantiator as the key and the instance as + the value. Since the hashtable is key-weak this means that the + image instance will stay around as long as the instantiator stays + around. The instantiator is stored in the `image' slot of the + glyph, so as long as the glyph is marked the instantiator will be + as well and hence the cached image instance also.*/ Fputhash (XCAR (XCDR (locative)), XCAR (locative), XCDR (XCDR (locative))); free_cons (XCONS (XCDR (locative))); free_cons (XCONS (locative)); @@ -4252,6 +4271,13 @@ update_subwindow (Lisp_Object subwindow) { Lisp_Image_Instance* ii = XIMAGE_INSTANCE (subwindow); + int count = specpdl_depth (); + + /* The update method is allowed to call eval. Since it is quite + common for this function to get called from somewhere in + redisplay we need to make sure that quits are ignored. Otherwise + Fsignal will abort. */ + specbind (Qinhibit_quit, Qt); if (IMAGE_INSTANCE_TYPE (ii) == IMAGE_WIDGET || @@ -4273,6 +4299,8 @@ } IMAGE_INSTANCE_SIZE_CHANGED (ii) = 0; + + unbind_to (count, Qnil); } /* Update all the subwindows on a frame. */ Index: src/gutter.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/Attic/gutter.c,v retrieving revision 1.1.2.18 diff -u -r1.1.2.18 gutter.c --- src/gutter.c 2000/01/29 12:47:36 1.1.2.18 +++ src/gutter.c 2000/02/17 13:44:44 @@ -337,6 +337,22 @@ redisplay_clear_region (window, findex, x, y, width, height); } +/* #### I don't currently believe that redisplay needs to mark the + glyphs in its structures since these will always be referenced from + somewhere else. However, I'm not sure enough to stake my life on it + at this point, so we do the safe thing. */ + +/* See the comment in image_instantiate_cache_result as to why marking + the glyph will also mark the image_instance. */ +void +mark_gutters (struct frame* f) +{ + if (f->current_display_lines) + mark_redisplay_structs (f->current_display_lines); + if (f->desired_display_lines) + mark_redisplay_structs (f->desired_display_lines); +} + void update_frame_gutters (struct frame *f) { Index: src/gutter.h =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/Attic/gutter.h,v retrieving revision 1.1.2.6 diff -u -r1.1.2.6 gutter.h --- src/gutter.h 2000/01/22 12:04:08 1.1.2.6 +++ src/gutter.h 2000/02/17 13:44:45 @@ -54,6 +54,7 @@ extern Lisp_Object Vgutter_size[4]; extern Lisp_Object Vgutter_border_width[4]; void update_frame_gutters (struct frame *f); +void mark_gutters (struct frame* f); void init_frame_gutters (struct frame *f); void init_device_gutters (struct device *d); void init_global_gutters (struct device *d); Index: src/redisplay.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/redisplay.c,v retrieving revision 1.55.2.39 diff -u -r1.55.2.39 redisplay.c --- src/redisplay.c 2000/02/13 20:22:27 1.55.2.39 +++ src/redisplay.c 2000/02/17 13:45:17 @@ -6027,7 +6027,7 @@ && !f->faces_changed && !f->glyphs_changed && !f->subwindows_changed - && !f->subwindows_state_changed + /* && !f->subwindows_state_changed*/ && !f->point_changed && !f->windows_structure_changed) { @@ -6049,7 +6049,7 @@ && !f->faces_changed && !f->glyphs_changed && !f->subwindows_changed - && !f->subwindows_state_changed + /* && !f->subwindows_state_changed*/ && !f->windows_structure_changed) { if (point_visible (w, pointm, CURRENT_DISP) @@ -6108,7 +6108,7 @@ && !f->faces_changed && !f->glyphs_changed && !f->subwindows_changed - && !f->subwindows_state_changed + /* && !f->subwindows_state_changed*/ && !f->windows_structure_changed && !f->frame_changed && !truncation_changed @@ -6363,8 +6363,15 @@ } else mark_subwindow_cachels_as_not_updated (f); + /* We can now update the gutters, safe in the knowledge that our efforts won't get undone. */ + + /* #### This can call lisp, it may be that if the subwindow cachels + have been reset there are no remaining references to the + displayed glyphs and so they get garbage collected. We should + consider putting this call inside the critical redisplay + section. */ update_frame_gutters (f); hold_frame_size_changes (); @@ -7047,7 +7054,9 @@ } } -static void +/* See the comment in image_instantiate_cache_result as to why marking + the glyph will also mark the image_instance. */ +void mark_redisplay_structs (display_line_dynarr *dla) { display_line *dl = Dynarr_atp (dla, 0); @@ -7107,6 +7116,7 @@ struct frame *f = XFRAME (XCAR (frmcons)); update_frame_window_mirror (f); mark_window_mirror (f->root_mirror); + mark_gutters (f); } } Index: src/redisplay.h =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/redisplay.h,v retrieving revision 1.7.2.18 diff -u -r1.7.2.18 redisplay.h --- src/redisplay.h 2000/01/22 12:04:16 1.7.2.18 +++ src/redisplay.h 2000/02/17 13:45:20 @@ -696,6 +696,7 @@ void redisplay_echo_area (void); void free_display_structs (struct window_mirror *mir); void free_display_lines (display_line_dynarr *dla); +void mark_redisplay_structs (display_line_dynarr *dla); void generate_displayable_area (struct window *w, Lisp_Object disp_string, int xpos, int ypos, int width, int height, display_line_dynarr* dl,