+2001-01-08 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.40 is released.
+
2000-12-31 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.39 is released.
* all: port from cygwin setup.
-%%% $Id: ChangeLog,v 1.1.2.4 2000/12/30 10:01:41 andyp Exp $
-$Revision: 1.1.2.4 $
+%%% $Id: ChangeLog,v 1.1.2.5 2000/12/31 12:03:34 martinb Exp $
+$Revision: 1.1.2.5 $
+2001-01-08 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.40 is released.
+
2000-12-31 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.39 is released.
+2001-01-08 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.40 is released.
+
+2001-01-06 Golubev I. N. <gin@mo.msk.ru>
+
+ * regex.c: Replace PREFETCH with REGEX_PREFETCH.
+
+2001-01-06 Martin Buchholz <martin@xemacs.org>
+
+ * alloc.c (dbg_valmask): Make const.
+ * alloc.c (dbg_typemask): Make const.
+ * alloc.c (dbg_USE_UNION_TYPE): Make const.
+ * alloc.c (dbg_valbits): Make const.
+ * alloc.c (dbg_gctypebits): Make const.
+
+2001-01-06 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * redisplay-x.c (x_bevel_area):
+ redisplay.h (struct rune):
+ Typo fixes in comments.
+
+2001-01-05 Andy Piper <andy@xemacs.org>
+
+ * glyphs-x.c (x_redisplay_widget): use size changed for offset
+ adjustment.
+
+ * menubar.c (menubar_visible_p_changed): don't mark frame changed.
+
+2001-01-05 Martin Buchholz <martin@xemacs.org>
+
+ * alloc.c (pure-bytes-used): Remove unused mendacious variable.
+
+ * mule-ccl.c (stack_idx_of_map_multiple):
+ Non const global data must not be initialized!
+ Found by MIYASHITA Hisashi.
+
+2001-01-02 Andy Piper <andy@xemacs.org>
+
+ * frame.c (change_frame_size): make sure frame size is always
+ marked as changed.
+
+ * glyphs.c (image_instance_layout): minor code reuse.
+
+ * window.c (Fcurrent_window_configuration): revert previous
+ change.
+
+2001-01-02 Martin Buchholz <martin@xemacs.org>
+
+ * glyphs.h:
+ * glyphs.c (make_image_instance_cache_hash_table): Use ANSI prototypes.
+
+2000-12-31 Andy Piper <andy@xemacs.org>
+
+ * glyphs-x.c (x_unmap_subwindow): return focus to enclosing frame
+ when widget gets unmapped.
+
+ * event-Xt.c (emacs_Xt_handle_widget_losing_focus): new
+ function. Make sure widgets losing focus don't just drop it.
+ (handle_focus_event_1): record the widget with focus.
+
+2000-12-31 Andy Piper <andy@xemacs.org>
+
+ * window.c (allocate_window): use
+ make_image_instance_cache_hash_table.
+ (make_dummy_parent): ditto.
+ (Fset_window_configuration): ditto.
+
+ * glyphs.h (INSTANTIATOR_TYPE): new macro. declare new functions.
+
+ * glyphs.c (process_image_string_instantiator): use
+ INSTANTIATOR_TYPE.
+ (get_image_instantiator_governing_domain): ditto.
+ (normalize_image_instantiator): ditto.
+ (instantiate_image_instantiator): ditto.
+ (make_image_instance_1): ditto.
+ (image_instantiate): ditto. Key on glyph *and* instantiator type.
+ (instantiator_eq_equal): new function for use with instance hash
+ tables.
+ (instantiator_eq_hash): ditto.
+ (make_image_instance_cache_hash_table): create a suitable hash
+ table for storing image instances.
+
+ * elhash.h (hash_table_weakness): new internal weakness type
+ HASH_TABLE_KEY_CAR_VALUE_WEAK.
+ declare new functions.
+
+ * elhash.c (finish_marking_weak_hash_tables): introduce yet
+ another weakness type for glyphs.
+ (make_standard_lisp_hash_table): new function split out from
+ make_general_lisp_hash_table.
+ (make_lisp_hash_table): call make_standard_lisp_hash_table.
+ (hash_table_instantiate): ditto.
+ (Fmake_hash_table): ditto.
+
2000-12-31 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.39 is released.
about expressions in src/.gdbinit. See src/.gdbinit or src/.dbxrc
to see how this is used. */
-EMACS_UINT dbg_valmask = ((1UL << VALBITS) - 1) << GCBITS;
-EMACS_UINT dbg_typemask = (1UL << GCTYPEBITS) - 1;
+const EMACS_UINT dbg_valmask = ((1UL << VALBITS) - 1) << GCBITS;
+const EMACS_UINT dbg_typemask = (1UL << GCTYPEBITS) - 1;
#ifdef USE_UNION_TYPE
-unsigned char dbg_USE_UNION_TYPE = 1;
+const unsigned char dbg_USE_UNION_TYPE = 1;
#else
-unsigned char dbg_USE_UNION_TYPE = 0;
+const unsigned char dbg_USE_UNION_TYPE = 0;
#endif
-unsigned char dbg_valbits = VALBITS;
-unsigned char dbg_gctypebits = GCTYPEBITS;
+const unsigned char dbg_valbits = VALBITS;
+const unsigned char dbg_gctypebits = GCTYPEBITS;
/* Macros turned into functions for ease of debugging.
Debuggers don't know about macros! */
staticidx = 0;
}
-int pure_bytes_used = 0;
-
void
reinit_alloc (void)
{
See also `consing-since-gc'.
*/ );
- DEFVAR_INT ("pure-bytes-used", &pure_bytes_used /*
-Number of bytes of sharable Lisp data allocated so far.
-*/ );
-
#ifdef DEBUG_XEMACS
DEFVAR_INT ("debug-allocation", &debug_allocation /*
If non-zero, print out information to stderr about all objects allocated.
}
Lisp_Object
-make_general_lisp_hash_table (enum hash_table_test test,
- size_t size,
- double rehash_size,
- double rehash_threshold,
- enum hash_table_weakness weakness)
+make_standard_lisp_hash_table (enum hash_table_test test,
+ size_t size,
+ double rehash_size,
+ double rehash_threshold,
+ enum hash_table_weakness weakness)
{
- Lisp_Object hash_table;
- Lisp_Hash_Table *ht = alloc_lcrecord_type (Lisp_Hash_Table, &lrecord_hash_table);
+ hash_table_hash_function_t hash_function = 0;
+ hash_table_test_function_t test_function = 0;
switch (test)
{
case HASH_TABLE_EQ:
- ht->test_function = 0;
- ht->hash_function = 0;
+ test_function = 0;
+ hash_function = 0;
break;
case HASH_TABLE_EQL:
- ht->test_function = lisp_object_eql_equal;
- ht->hash_function = lisp_object_eql_hash;
+ test_function = lisp_object_eql_equal;
+ hash_function = lisp_object_eql_hash;
break;
case HASH_TABLE_EQUAL:
- ht->test_function = lisp_object_equal_equal;
- ht->hash_function = lisp_object_equal_hash;
+ test_function = lisp_object_equal_equal;
+ hash_function = lisp_object_equal_hash;
break;
default:
abort ();
}
+ return make_general_lisp_hash_table (hash_function, test_function,
+ size, rehash_size, rehash_threshold,
+ weakness);
+}
+
+Lisp_Object
+make_general_lisp_hash_table (hash_table_hash_function_t hash_function,
+ hash_table_test_function_t test_function,
+ size_t size,
+ double rehash_size,
+ double rehash_threshold,
+ enum hash_table_weakness weakness)
+{
+ Lisp_Object hash_table;
+ Lisp_Hash_Table *ht = alloc_lcrecord_type (Lisp_Hash_Table, &lrecord_hash_table);
+
+ ht->test_function = test_function;
+ ht->hash_function = hash_function;
ht->weakness = weakness;
ht->rehash_size =
enum hash_table_weakness weakness,
enum hash_table_test test)
{
- return make_general_lisp_hash_table (test, size, -1.0, -1.0, weakness);
+ return make_standard_lisp_hash_table (test, size, -1.0, -1.0, weakness);
}
/* Pretty reading of hash tables.
}
/* Create the hash table. */
- hash_table = make_general_lisp_hash_table
+ hash_table = make_standard_lisp_hash_table
(decode_hash_table_test (test),
decode_hash_table_size (size),
decode_hash_table_rehash_size (rehash_size),
VALIDATE_VAR (rehash_threshold);
VALIDATE_VAR (weakness);
- return make_general_lisp_hash_table
+ return make_standard_lisp_hash_table
(decode_hash_table_test (test),
decode_hash_table_size (size),
decode_hash_table_rehash_size (rehash_size),
}
break;
+ /* We seem to be sprouting new weakness types at an alarming
+ rate. At least this is not externally visible - and in
+ fact all of these KEY_CAR_* types are only used by the
+ glyph code. */
+ case HASH_TABLE_KEY_CAR_VALUE_WEAK:
+ for (; e < sentinel; e++)
+ if (!HENTRY_CLEAR_P (e))
+ {
+ if (!CONSP (e->key) || marked_p (XCAR (e->key)))
+ {
+ MARK_OBJ (e->key);
+ MARK_OBJ (e->value);
+ }
+ else if (marked_p (e->value))
+ MARK_OBJ (e->key);
+ }
+ break;
+
case HASH_TABLE_VALUE_CAR_WEAK:
for (; e < sentinel; e++)
if (!HENTRY_CLEAR_P (e))
HASH_TABLE_KEY_VALUE_WEAK,
HASH_TABLE_KEY_CAR_WEAK,
HASH_TABLE_VALUE_CAR_WEAK,
+ HASH_TABLE_KEY_CAR_VALUE_WEAK,
HASH_TABLE_WEAK
};
typedef int (*maphash_function_t) (Lisp_Object key, Lisp_Object value,
void* extra_arg);
-Lisp_Object make_general_lisp_hash_table (enum hash_table_test test,
+Lisp_Object make_standard_lisp_hash_table (enum hash_table_test test,
+ size_t size,
+ double rehash_size,
+ double rehash_threshold,
+ enum hash_table_weakness weakness);
+
+Lisp_Object make_general_lisp_hash_table (hash_table_hash_function_t hash_function,
+ hash_table_test_function_t test_function,
size_t size,
double rehash_size,
double rehash_threshold,
static int process_events_occurred;
static int tty_events_occurred;
+static Widget widget_with_focus;
/* Mask of bits indicating the descriptors that we wait for input on */
extern SELECT_TYPE input_wait_mask, process_only_mask, tty_only_mask;
handle_focus_event_1 (struct frame *f, int in_p)
{
#if XtSpecificationRelease > 5
- Widget focus_widget = XtGetKeyboardFocusWidget (FRAME_X_TEXT_WIDGET (f));
+ widget_with_focus = XtGetKeyboardFocusWidget (FRAME_X_TEXT_WIDGET (f));
#endif
#ifdef HAVE_XIM
XIM_focus_event (f, in_p);
#endif /* HAVE_XIM */
+
/* On focus change, clear all memory of sticky modifiers
to avoid non-intuitive behavior. */
clear_sticky_modifiers (XDEVICE (FRAME_DEVICE (f)));
click in the frame. Why is this? */
if (in_p
#if XtSpecificationRelease > 5
- && FRAME_X_TEXT_WIDGET (f) != focus_widget
+ && FRAME_X_TEXT_WIDGET (f) != widget_with_focus
#endif
)
{
lw_set_keyboard_focus (FRAME_X_SHELL_WIDGET (f),
FRAME_X_TEXT_WIDGET (f));
}
+
+ /* We have the focus now. See comment in
+ emacs_Xt_handle_widget_losing_focus (). */
+ if (in_p)
+ widget_with_focus = NULL;
+
/* do the generic event-stream stuff. */
{
Lisp_Object frm;
}
}
+/* The idea here is that when a widget glyph gets unmapped we don't
+ want the focus to stay with it if it has focus - because it may
+ well just get deleted next andthen we have lost the focus until the
+ user does something. So handle_focus_event_1 records the widget
+ with keyboard focus when FocusOut is processed, and then, when a
+ widget gets unmapped, it calls this function to restore focus if
+ appropriate. */
+void emacs_Xt_handle_widget_losing_focus (struct frame* f, Widget losing_widget);
+void
+emacs_Xt_handle_widget_losing_focus (struct frame* f, Widget losing_widget)
+{
+ if (losing_widget == widget_with_focus)
+ {
+ handle_focus_event_1 (f, 1);
+ }
+}
+
/* This is called from the external-widget code */
void emacs_Xt_handle_focus_event (XEvent *event);
XFlush (XtDisplay (shell_widget)); /* hey, I'd like to DEBUG this... */
}
-/* Destroy the X window of frame S. */
+/* Destroy the X window of frame F. */
static void
x_delete_frame (struct frame *f)
{
So deal. */
check_frame_size (f, &newheight, &newwidth);
+ /* Unconditionally mark that the frame has changed size. This is
+ because many things need to know after the
+ fact. f->size_change_pending will get reset below. The most that
+ can happen is that we will cycle through redisplay once more
+ --andy. */
+ MARK_FRAME_SIZE_CHANGED (f);
+
if (delay || in_display || gc_in_progress)
{
- MARK_FRAME_SIZE_CHANGED (f);
f->new_width = newwidth;
f->new_height = newheight;
return;
update_tab_widget_face (widget_value* wv,
Lisp_Image_Instance* ii, Lisp_Object domain);
#endif
+void
+emacs_Xt_handle_widget_losing_focus (struct frame* f, Widget losing_widget);
#include "bitmaps.h"
}
else /* must be a widget */
{
+ /* Since we are being unmapped we want the enclosing frame to
+ get focus. The losing with simple scrolling but is the safest
+ thing to do. */
+ emacs_Xt_handle_widget_losing_focus
+ ( XFRAME (IMAGE_INSTANCE_FRAME (p)),
+ IMAGE_INSTANCE_X_WIDGET_ID (p));
XtUnmapWidget (IMAGE_INSTANCE_X_CLIPWIDGET (p));
}
}
}
/* Adjust offsets within the frame. */
- if (XFRAME (IMAGE_INSTANCE_FRAME (p))->frame_changed)
+ if (XFRAME (IMAGE_INSTANCE_FRAME (p))->size_changed)
{
Arg al[2];
XtSetArg (al [0], XtNx, &IMAGE_INSTANCE_X_WIDGET_XOFFSET (p));
skip it. */
if (!(dest_mask &
IIFORMAT_METH (decode_image_instantiator_format
- (XVECTOR_DATA (typevec)[0], ERROR_ME),
+ (INSTANTIATOR_TYPE (typevec), ERROR_ME),
possible_dest_types, ())))
continue;
if (fast_string_match (exp, 0, data, 0, -1, 0, ERROR_ME, 0) >= 0)
int governing_domain;
struct image_instantiator_methods *meths =
- decode_image_instantiator_format (XVECTOR_DATA (instantiator)[0],
+ decode_image_instantiator_format (INSTANTIATOR_TYPE (instantiator),
ERROR_ME);
governing_domain = IIFORMAT_METH_OR_GIVEN (meths, governing_domain, (),
GOVERNING_DOMAIN_DEVICE);
GCPRO1 (instantiator);
- meths = decode_image_instantiator_format (XVECTOR_DATA (instantiator)[0],
+ meths = decode_image_instantiator_format (INSTANTIATOR_TYPE (instantiator),
ERROR_ME);
RETURN_UNGCPRO (IIFORMAT_METH_OR_GIVEN (meths, normalize,
(instantiator, contype, dest_mask),
struct gcpro gcpro1;
GCPRO1 (ii);
- if (!valid_image_instantiator_format_p (XVECTOR_DATA (instantiator)[0],
+ if (!valid_image_instantiator_format_p (INSTANTIATOR_TYPE (instantiator),
DOMAIN_DEVICE (governing_domain)))
signal_simple_error
("Image instantiator format is invalid in this locale.",
instantiator);
- meths = decode_image_instantiator_format (XVECTOR_DATA (instantiator)[0],
+ meths = decode_image_instantiator_format (INSTANTIATOR_TYPE (instantiator),
ERROR_ME);
MAYBE_IIFORMAT_METH (meths, instantiate, (ii, instantiator, pointer_fg,
pointer_bg, dest_mask, domain));
/* Now do device specific instantiation. */
device_meths = decode_device_ii_format (DOMAIN_DEVICE (governing_domain),
- XVECTOR_DATA (instantiator)[0],
+ INSTANTIATOR_TYPE (instantiator),
ERROR_ME_NOT);
if (!HAS_IIFORMAT_METH_P (meths, instantiate)
GCPRO1 (data);
/* After normalizing the data, it's always either an image instance (which
we filtered out above) or a vector. */
- if (EQ (XVECTOR_DATA (data)[0], Qinherit))
+ if (EQ (INSTANTIATOR_TYPE (data), Qinherit))
signal_simple_error ("Inheritance not allowed here", data);
governing_domain =
get_image_instantiator_governing_domain (data, domain);
assert (XIMAGE_INSTANCE_YOFFSET (image_instance) >= 0
&& XIMAGE_INSTANCE_XOFFSET (image_instance) >= 0);
- type = encode_image_instance_type (IMAGE_INSTANCE_TYPE (ii));
- meths = decode_device_ii_format (Qnil, type, ERROR_ME_NOT);
-
/* If geometry is unspecified then get some reasonable values for it. */
if (width == IMAGE_UNSPECIFIED_GEOMETRY
||
{
int dwidth = IMAGE_UNSPECIFIED_GEOMETRY;
int dheight = IMAGE_UNSPECIFIED_GEOMETRY;
-
/* Get the desired geometry. */
- if (meths && HAS_IIFORMAT_METH_P (meths, query_geometry))
- {
- IIFORMAT_METH (meths, query_geometry, (image_instance, &dwidth, &dheight,
- IMAGE_DESIRED_GEOMETRY,
- domain));
- }
- else
- {
- dwidth = IMAGE_INSTANCE_WIDTH (ii);
- dheight = IMAGE_INSTANCE_HEIGHT (ii);
- }
-
+ image_instance_query_geometry (image_instance,
+ &dwidth, &dheight,
+ IMAGE_DESIRED_GEOMETRY,
+ domain);
/* Compare with allowed geometry. */
if (width == IMAGE_UNSPECIFIED_GEOMETRY)
width = dwidth;
IMAGE_INSTANCE_WIDTH (ii) = width;
IMAGE_INSTANCE_HEIGHT (ii) = height;
- if (IIFORMAT_METH_OR_GIVEN (meths, layout,
- (image_instance, width, height, xoffset, yoffset,
- domain), 1))
- /* Do not clear the dirty flag here - redisplay will do this for
- us at the end. */
- IMAGE_INSTANCE_LAYOUT_CHANGED (ii) = 0;
+ type = encode_image_instance_type (IMAGE_INSTANCE_TYPE (ii));
+ meths = decode_device_ii_format (Qnil, type, ERROR_ME_NOT);
+
+ MAYBE_IIFORMAT_METH (meths, layout,
+ (image_instance, width, height, xoffset, yoffset,
+ domain));
+ /* Do not clear the dirty flag here - redisplay will do this for
+ us at the end. */
+ IMAGE_INSTANCE_LAYOUT_CHANGED (ii) = 0;
}
/* Update an image instance from its changed instantiator. */
mark_object (IMAGE_SPECIFIER_ATTACHEE_PROPERTY (image));
}
+static int
+instantiator_eq_equal (Lisp_Object obj1, Lisp_Object obj2)
+{
+ if (EQ (obj1, obj2))
+ return 1;
+
+ else if (CONSP (obj1) && CONSP (obj2))
+ {
+ return instantiator_eq_equal (XCAR (obj1), XCAR (obj2))
+ &&
+ instantiator_eq_equal (XCDR (obj1), XCDR (obj2));
+ }
+ return 0;
+}
+
+static hashcode_t
+instantiator_eq_hash (Lisp_Object obj)
+{
+ if (CONSP (obj))
+ {
+ /* no point in worrying about tail recursion, since we're not
+ going very deep */
+ return HASH2 (instantiator_eq_hash (XCAR (obj)),
+ instantiator_eq_hash (XCDR (obj)));
+ }
+ return LISP_HASH (obj);
+}
+
+/* We need a special hash table for storing image instances. */
+Lisp_Object
+make_image_instance_cache_hash_table (void)
+{
+ return make_general_lisp_hash_table
+ (instantiator_eq_hash, instantiator_eq_equal,
+ 30, -1.0, -1.0,
+ HASH_TABLE_KEY_CAR_VALUE_WEAK);
+}
+
static Lisp_Object
image_instantiate_cache_result (Lisp_Object locative)
{
instantiator, domain);
}
else if (VECTORP (instantiator)
- && EQ (XVECTOR_DATA (instantiator)[0], Qinherit))
+ && EQ (INSTANTIATOR_TYPE (instantiator), Qinherit))
{
assert (XVECTOR_LENGTH (instantiator) == 3);
return (FACE_PROPERTY_INSTANCE
{
Lisp_Object instance = Qnil;
Lisp_Object subtable = Qnil;
- Lisp_Object ls3 = Qnil;
+ /* #### Should this be GCPRO'd? */
+ Lisp_Object hash_key = Qnil;
Lisp_Object pointer_fg = Qnil;
Lisp_Object pointer_bg = Qnil;
Lisp_Object governing_domain =
{
pointer_fg = FACE_FOREGROUND (Vpointer_face, domain);
pointer_bg = FACE_BACKGROUND (Vpointer_face, domain);
- ls3 = list3 (glyph, pointer_fg, pointer_bg);
+ hash_key = list4 (glyph, INSTANTIATOR_TYPE (instantiator),
+ pointer_fg, pointer_bg);
}
+ else
+ /* We cannot simply key on the glyph since fallbacks could use
+ the same glyph but have a totally different instantiator
+ type. Thus we key on the glyph and the type (but not any
+ other parts of the instantiator. */
+ hash_key = list2 (glyph, INSTANTIATOR_TYPE (instantiator));
/* First look in the device cache. */
if (DEVICEP (governing_domain))
have to use EQUAL because we massaged the
instantiator into a cons3 also containing the
foreground and background of the pointer face. */
+ subtable = make_image_instance_cache_hash_table ();
- subtable = make_lisp_hash_table
- (20, pointerp ? HASH_TABLE_KEY_CAR_WEAK
- : HASH_TABLE_KEY_WEAK,
- pointerp ? HASH_TABLE_EQUAL
- : HASH_TABLE_EQ);
Fputhash (make_int (dest_mask), subtable,
XDEVICE (governing_domain)->image_instance_cache);
instance = Qunbound;
}
else
{
- instance = Fgethash (pointerp ? ls3 : glyph,
- subtable, Qunbound);
+ instance = Fgethash (hash_key, subtable, Qunbound);
}
}
else if (WINDOWP (governing_domain))
/* Subwindows have a per-window cache and have to be treated
differently. */
instance =
- Fgethash (pointerp ? ls3 : glyph,
+ Fgethash (hash_key,
XWINDOW (governing_domain)->subwindow_instance_cache,
Qunbound);
}
{
Lisp_Object locative =
noseeum_cons (Qnil,
- noseeum_cons (pointerp ? ls3 : glyph,
+ noseeum_cons (hash_key,
DEVICEP (governing_domain) ? subtable
: XWINDOW (governing_domain)
->subwindow_instance_cache));
#ifdef ERROR_CHECK_GLYPHS
if (image_instance_type_to_mask (XIMAGE_INSTANCE_TYPE (instance))
& (IMAGE_SUBWINDOW_MASK | IMAGE_WIDGET_MASK))
- assert (EQ (Fgethash ((pointerp ? ls3 : glyph),
+ assert (EQ (Fgethash (hash_key,
XWINDOW (governing_domain)
->subwindow_instance_cache,
Qunbound), instance));
possible to make changes that don't get reflected in the
display. */
update_image_instance (instance, instantiator);
- free_list (ls3);
+ free_list (hash_key);
}
#ifdef ERROR_CHECK_GLYPHS
#define IIFORMAT_INHERITS_SHARED_DEVMETHOD(type, from, format, m, fromformat) \
(type##_##format##_image_instantiator_methods->m##_method = from##_##fromformat##_##m)
+#define INSTANTIATOR_TYPE(inst) (XVECTOR_DATA ((inst))[0])
+
struct image_instantiator_methods *
decode_device_ii_format (Lisp_Object device, Lisp_Object format,
Error_behavior errb);
int width, int height, int xoffset, int yoffset,
Lisp_Object domain);
int invalidate_glyph_geometry_maybe (Lisp_Object glyph_or_ii, struct window* w);
+Lisp_Object make_image_instance_cache_hash_table (void);
DECLARE_DOESNT_RETURN (incompatible_image_types (Lisp_Object instantiator,
int given_dest_mask,
Lisp_Object oldval)
{
MARK_MENUBAR_CHANGED;
- /* This is to force subwindow offsets to be recalculated - see
- x_redisplay_widget (). */
- MARK_FRAME_CHANGED (WINDOW_XFRAME (w));
}
static void
/* If this variable is non-zero, it indicates the stack_idx
of immediately called by CCL_MapMultiple. */
-static int stack_idx_of_map_multiple = 0;
+static int stack_idx_of_map_multiple;
#define PUSH_MAPPING_STACK(restlen, orig) \
do { \
/*****************************************************************************
x_bevel_area
- Draw a shadows for the given area in the given face.
+ Draw shadows for the given area in the given face.
****************************************************************************/
static void
x_bevel_area (struct window *w, face_index findex,
union /* Information specific to the type of rune */
{
- /* #### GLyphs are rare. Is it really necessary to waste 8 bytes on every
+ /* #### Glyphs are rare. Is it really necessary to waste 8 bytes on every
rune for that?! */
/* DGLYPH */
struct
/* Call before fetching a character with *d. This switches over to
string2 if necessary. */
-#define PREFETCH() \
+#define REGEX_PREFETCH() \
while (d == dend) \
{ \
/* End of string2 => fail. */ \
Emchar pat_ch, buf_ch;
Bytecount pat_len;
- PREFETCH ();
+ REGEX_PREFETCH ();
pat_ch = charptr_emchar (p);
buf_ch = charptr_emchar (d);
if (RE_TRANSLATE (buf_ch) != pat_ch)
mcnt -= pat_len;
#else /* not MULE */
- PREFETCH ();
+ REGEX_PREFETCH ();
if ((unsigned char) RE_TRANSLATE (*d++) != *p++)
goto fail;
mcnt--;
{
do
{
- PREFETCH ();
+ REGEX_PREFETCH ();
if (*d++ != *p++) goto fail;
}
while (--mcnt);
case anychar:
DEBUG_PRINT1 ("EXECUTING anychar.\n");
- PREFETCH ();
+ REGEX_PREFETCH ();
if ((!(bufp->syntax & RE_DOT_NEWLINE) && TRANSLATE (*d) == '\n')
|| (bufp->syntax & RE_DOT_NOT_NULL && TRANSLATE (*d) == '\000'))
DEBUG_PRINT2 ("EXECUTING charset%s.\n", not ? "_not" : "");
- PREFETCH ();
+ REGEX_PREFETCH ();
c = TRANSLATE (*d); /* The character to match. */
/* Cast to `unsigned' instead of `unsigned char' in case the
DEBUG_PRINT2 ("EXECUTING charset_mule%s.\n", not ? "_not" : "");
- PREFETCH ();
+ REGEX_PREFETCH ();
c = charptr_emchar ((const Bufbyte *) d);
c = TRANSLATE_EXTENDED_UNSAFE (c); /* The character to match. */
if (d2 == dend2) break;
/* If necessary, advance to next segment in data. */
- PREFETCH ();
+ REGEX_PREFETCH ();
/* How many characters left in this segment to match. */
mcnt = dend - d;
int matches;
Emchar emch;
- PREFETCH ();
+ REGEX_PREFETCH ();
emch = charptr_emchar ((const Bufbyte *) d);
matches = (SYNTAX_UNSAFE
(XCHAR_TABLE (regex_emacs_buffer->mirror_syntax_table),
Emchar emch;
mcnt = *p++;
- PREFETCH ();
+ REGEX_PREFETCH ();
emch = charptr_emchar ((const Bufbyte *) d);
INC_CHARPTR (d);
if (check_category_char(emch, regex_emacs_buffer->category_table,
#else /* not emacs */
case wordchar:
DEBUG_PRINT1 ("EXECUTING non-Emacs wordchar.\n");
- PREFETCH ();
+ REGEX_PREFETCH ();
if (!WORDCHAR_P_UNSAFE ((int) (*d)))
goto fail;
SET_REGS_MATCHED ();
case notwordchar:
DEBUG_PRINT1 ("EXECUTING non-Emacs notwordchar.\n");
- PREFETCH ();
+ REGEX_PREFETCH ();
if (!WORDCHAR_P_UNSAFE ((int) (*d)))
goto fail;
SET_REGS_MATCHED ();
p->face_cachels = Dynarr_new (face_cachel);
p->glyph_cachels = Dynarr_new (glyph_cachel);
p->line_start_cache = Dynarr_new (line_start_cache);
- p->subwindow_instance_cache = make_lisp_hash_table (30,
- HASH_TABLE_KEY_VALUE_WEAK,
- HASH_TABLE_EQ);
+ p->subwindow_instance_cache = make_image_instance_cache_hash_table ();
+
p->line_cache_last_updated = Qzero;
INIT_DISP_VARIABLE (last_point_x, 0);
INIT_DISP_VARIABLE (last_point_y, 0);
p->face_cachels = Dynarr_new (face_cachel);
p->glyph_cachels = Dynarr_new (glyph_cachel);
p->subwindow_instance_cache =
- make_lisp_hash_table (30,
- HASH_TABLE_KEY_VALUE_WEAK,
- HASH_TABLE_EQ);
+ make_image_instance_cache_hash_table ();
/* Put new into window structure in place of window */
replace_window (window, new);
set. */
if (NILP (w->subwindow_instance_cache))
w->subwindow_instance_cache =
- make_lisp_hash_table (30,
- HASH_TABLE_KEY_VALUE_WEAK,
- HASH_TABLE_EQ);
+ make_image_instance_cache_hash_table ();
+
SET_LAST_MODIFIED (w, 1);
SET_LAST_FACECHANGE (w);
w->config_mark = 0;
/*
config->frame_width = FRAME_WIDTH (f);
config->frame_height = FRAME_HEIGHT (f); */
- /* When using `push-window-configuration', often the minibuffer ends
+ /* #### When using `push-window-configuration', often the minibuffer ends
up as the selected window because functions run as the result of
user interaction e.g. hyper-apropos. It seems to me the sensible
- thing to do is not record the minibuffer here. */
+ thing to do is not record the minibuffer here.
+
+ #### Unfortunately this is a change to previous behaviour, however logical
+ it may be, so revert for the moment. */
+#if 0
if (FRAME_MINIBUF_ONLY_P (f) || minibuf_level)
config->current_window = FRAME_SELECTED_WINDOW (f);
else
config->current_window = FRAME_LAST_NONMINIBUF_WINDOW (f);
+#endif
+ config->current_window = FRAME_SELECTED_WINDOW (f);
XSETBUFFER (config->current_buffer, current_buffer);
config->minibuffer_scroll_window = Vminibuffer_scroll_window;
config->root_window = FRAME_ROOT_WINDOW (f);
+2001-01-08 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.40 is released.
+
2000-12-31 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.39 is released.