Thank you, Alex, for the suggested edits. I moved the enum for cache types into the main struct for multiple_cursor_cache, and also moved the sections that apply to w->mc_elts into the MC_CACHE case instead of the CH_CACHE case. Attached is the updated diff for the new cache management design. struct multiple_cursor_cache { ptrdiff_t allocated; ptrdiff_t used; struct items { int x; int fx; int y; int fy; int hpos; int vpos; int wd; int h; int cursor_type; int cursor_width; struct RGB { double red; double green; double blue; } foreground, background; bool active_p; int glyph_flavor; bool enabled_p; } *caches; enum type_of_cache { NO_CACHE, MC_CACHE, CH_CACHE, FC_CACHE } cache_type; }; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > Date: [04-20-2019 10:17:01] <20 Apr 2019 11:17:01 -0600> > From: Alex Gramiak > To: Keith David Bershatsky > Cc: emacs-devel@gnu.org > Subject: Re: Universal functions to manage multiple window caches. > >* * * > > Looks about what I expected, yeah (you could also have the enum be an > element of each cache type instead of it being global, but it's up to > preference). Though is it your intention to be using w->mc_elts in the > CH_CACHE case instead of w->ch_elts?