Changeset 1693

Show
Ignore:
Timestamp:
1998年02月17日 01時45分19秒 (11 years ago)
Author:
himi
Message:

Import Original Emacs 21.0.104.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/GNU/src/xfaces.c

    r1677 r1693  
    474474int face_change_count; 
    475475 
     476/* Incremented for every change in the `menu' face.  */ 
     477 
     478int menu_face_change_count; 
     479 
    476480/* Non-zero means don't display bold text if a face's foreground 
    477481   and background colors are the inverse of the default colors of the 
     
    494498#endif 
    495499 
    496 /* Non-zero means the definition of the `menu' face for new frames has 
    497    been changed.  */ 
    498  
    499 int menu_face_changed_default; 
    500500 
    501501  
     
    598598static GC x_create_gc P_ ((struct frame *, unsigned long, XGCValues *)); 
    599599static void x_free_gc P_ ((struct frame *, GC)); 
    600 static void clear_font_table P_ ((struct x_display_info *)); 
     600static void clear_font_table P_ ((struct frame *)); 
    601601 
    602602#ifdef WINDOWSNT 
     
    980980      || ++clear_font_table_count == CLEAR_FONT_TABLE_COUNT) 
    981981    { 
    982       struct x_display_info *dpyinfo; 
    983        
    984       /* Fonts are common for frames on one display, i.e. on 
    985          one X screen.  */ 
    986       for (dpyinfo = x_display_list; dpyinfo; dpyinfo = dpyinfo->next) 
    987         if (dpyinfo->n_fonts > CLEAR_FONT_TABLE_NFONTS) 
    988           clear_font_table (dpyinfo); 
    989        
    990982      /* From time to time see if we can unload some fonts.  This also 
    991983         frees all realized faces on all frames.  Fonts needed by 
     
    995987      FOR_EACH_FRAME (tail, frame) 
    996988        { 
    997           struct frame *f = XFRAME (frame); 
     989          f = XFRAME (frame); 
    998990          if (FRAME_WINDOW_P (f) 
    999991              && FRAME_X_DISPLAY_INFO (f)->n_fonts > CLEAR_FONT_TABLE_NFONTS) 
    1000             free_all_realized_faces (frame); 
     992            { 
     993              free_all_realized_faces (frame); 
     994              clear_font_table (f); 
     995            } 
    1001996        } 
    1002997    } 
     
    10351030 
    10361031 
    1037 /* Remove fonts from the font table of DPYINFO except for the default 
    1038    ASCII fonts of frames on that display.  Called from clear_face_cache 
     1032/* Remove those fonts from the font table of frame F exept for the 
     1033   default ASCII font for the frame.  Called from clear_face_cache 
    10391034   from time to time.  */ 
    10401035 
    10411036static void 
    1042 clear_font_table (dpyinfo) 
    1043      struct x_display_info *dpyinfo; 
    1044 
     1037clear_font_table (f) 
     1038     struct frame *f; 
     1039
     1040  struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 
    10451041  int i; 
    10461042 
    1047   /* Free those fonts that are not used by frames on DPYINFO.  */ 
     1043  xassert (FRAME_WINDOW_P (f)); 
     1044 
     1045  /* Free those fonts that are not used by the frame F as the default.  */ 
    10481046  for (i = 0; i < dpyinfo->n_fonts; ++i) 
    10491047    { 
    10501048      struct font_info *font_info = dpyinfo->font_table + i; 
    1051       Lisp_Object tail, frame; 
    1052  
    1053       /* Check if slot is already free.  */ 
    1054       if (font_info->name == NULL) 
    1055         continue; 
    1056  
    1057       /* Don't free a default font of some frame on this display.  */ 
    1058       FOR_EACH_FRAME (tail, frame) 
    1059         { 
    1060           struct frame *f = XFRAME (frame); 
    1061           if (FRAME_WINDOW_P (f) 
    1062               && FRAME_X_DISPLAY_INFO (f) == dpyinfo 
    1063               && font_info->font == FRAME_FONT (f)) 
    1064             break; 
    1065         } 
    1066  
    1067       if (!NILP (tail)) 
     1049 
     1050      if (!font_info->name 
     1051          || font_info->font == FRAME_FONT (f)) 
    10681052        continue; 
    10691053 
     
    37713755  "Set attribute ATTR of FACE to VALUE.\n\ 
    37723756FRAME being a frame means change the face on that frame.\n\ 
    3773 FRAME nil means change the face of the selected frame.\n\ 
     3757FRAME nil means change change the face of the selected frame.\n\ 
    37743758FRAME t means change the default for new frames.\n\ 
    37753759FRAME 0 means change the face on all frames, and change the default\n\ 
     
    41274111          /* Changed font-related attributes of the `default' face are 
    41284112             reflected in changed `font' frame parameters. */ 
    4129           if (FRAMEP (frame) 
    4130               && (font_related_attr_p || font_attr_p) 
     4113          if ((font_related_attr_p || font_attr_p) 
    41314114              && lface_fully_specified_p (XVECTOR (lface)->contents)) 
    41324115            set_font_frame_param (frame, lface); 
     
    41744157#endif /* HAVE_WINDOW_SYSTEM */ 
    41754158      else if (EQ (face, Qmenu)) 
    4176         { 
    4177           /* Indicate that we have to update the menu bar when 
    4178              realizing faces on FRAME.  FRAME t change the 
    4179              default for new frames.  We do this by setting 
    4180              setting the flag in new face caches   */ 
    4181           if (FRAMEP (frame)) 
    4182             { 
    4183               struct frame *f = XFRAME (frame); 
    4184               if (FRAME_FACE_CACHE (f) == NULL) 
    4185                 FRAME_FACE_CACHE (f) = make_face_cache (f); 
    4186               FRAME_FACE_CACHE (f)->menu_face_changed_p = 1; 
    4187             } 
    4188           else 
    4189             menu_face_changed_default = 1; 
    4190         } 
     4159        ++menu_face_change_count; 
    41914160 
    41924161      if (!NILP (param)) 
     
    44844453 
    44854454      if (changed_p && f->output_data.x->menubar_widget) 
    4486         free_frame_menubar (f); 
     4455        { 
     4456          free_frame_menubar (f); 
     4457          set_frame_menubar (f, 1, 1); 
     4458        } 
    44874459    } 
    44884460} 
     
    49864958  c->faces_by_id = (struct face **) xmalloc (c->size * sizeof *c->faces_by_id); 
    49874959  c->f = f; 
    4988   c->menu_face_changed_p = menu_face_changed_default; 
    49894960  return c; 
    49904961} 
     
    60536024  int count = BINDING_STACK_SIZE (); 
    60546025 
    6055   /* Block input here so that we won't be surprised by an X expose 
    6056      event, for instance, without having the faces set up.  */ 
     6026  /* Block input there so that we won't be surprised by an X expose 
     6027     event, for instance without having the faces set up.  */ 
    60576028  BLOCK_INPUT; 
    60586029  specbind (Qscalable_fonts_allowed, Qt); 
     
    60716042 
    60726043      /* Reflect changes in the `menu' face in menu bars.  */ 
    6073       if (FRAME_FACE_CACHE (f)->menu_face_changed_p
     6044      if (menu_face_change_count
    60746045        { 
    6075           FRAME_FACE_CACHE (f)->menu_face_changed_p = 0
     6046          --menu_face_change_count
    60766047#ifdef USE_X_TOOLKIT 
    60776048          x_update_menu_appearance (f); 
  • branches/GNU/src/xmenu.c

    r1689 r1693  
    16911691 
    16921692      /* Save the frame's previous menu bar contents data.  */ 
    1693       if (previous_menu_items_used) 
    1694         bcopy (XVECTOR (f->menu_bar_vector)->contents, previous_items, 
    1695                previous_menu_items_used * sizeof (Lisp_Object)); 
     1693      bcopy (XVECTOR (f->menu_bar_vector)->contents, previous_items, 
     1694             previous_menu_items_used * sizeof (Lisp_Object)); 
    16961695 
    16971696      /* Fill in the current menu bar contents.  */ 
    16981697      menu_items = f->menu_bar_vector; 
    1699       menu_items_allocated = VECTORP (menu_items) ? ASIZE (menu_items) : 0
     1698      menu_items_allocated = XVECTOR (menu_items)->size
    17001699      init_menu_items (); 
    17011700      for (i = 0; i < XVECTOR (items)->size; i += 4) 
  • branches/GNU/src/xrdb.c

    r1689 r1693  
    3434 
    3535#if 1 /* I'd really appreciate it if this code could go away...  -JimB */ 
    36 /* This avoids lossage in the `dual-universe' headers on AT&T SysV 
    37    X11.  Don't do it on Solaris, because it breaks compilation with 
    38    XFree86 4.0.3 (and probably many other X11R6 releases) on Solaris 
    39    2 */ 
    40 #if defined(USG5) && !defined(SOLARIS2) 
     36/* this avoids lossage in the `dual-universe' headers on AT&T SysV X11 */ 
     37#ifdef USG5 
    4138#ifndef SYSV 
    4239#define SYSV 
    4340#endif 
    44 #endif /* USG5 && !SOLARIS2 */ 
     41#endif /* USG5 */ 
    4542 
    4643#endif /* 1 */