emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/fontset.c


From: Kenichi Handa
Subject: [Emacs-diffs] Changes to emacs/src/fontset.c
Date: Thu, 20 Feb 2003 03:40:39 -0500

Index: emacs/src/fontset.c
diff -c emacs/src/fontset.c:1.73 emacs/src/fontset.c:1.74
*** emacs/src/fontset.c:1.73    Fri Jan 17 03:10:00 2003
--- emacs/src/fontset.c Thu Feb 20 03:40:35 2003
***************
*** 955,961 ****
  
  /* Check validity of NAME as a fontset name and return the
     corresponding fontset.  If not valid, signal an error.
!    If NAME is t, return Vdefault_fontset.  */
  
  static Lisp_Object
  check_fontset_name (name)
--- 955,961 ----
  
  /* Check validity of NAME as a fontset name and return the
     corresponding fontset.  If not valid, signal an error.
!    If NAME is nil, return Vdefault_fontset.  */
  
  static Lisp_Object
  check_fontset_name (name)
***************
*** 963,969 ****
  {
    int id;
  
!   if (EQ (name, Qt))
      return Vdefault_fontset;
  
    CHECK_STRING (name);
--- 963,969 ----
  {
    int id;
  
!   if (EQ (name, Qnil))
      return Vdefault_fontset;
  
    CHECK_STRING (name);
***************
*** 1190,1201 ****
  
  
  /* Called from Ffontset_info via map_char_table on each leaf of
     fontset.  ARG is a list (LAST FONT-INFO ...), where LAST is `(last
     ARG)' and FONT-INFOs have this form:
        (CHAR FONT-SPEC) or ((FROM . TO) FONT-SPEC)
     The current leaf is indexed by CHARACTER and has value ELT.  This
     function add the information of the current leaf to ARG by
!    appending a new element or modifying the last element..  */
  
  static void
  accumulate_font_info (arg, character, elt)
--- 1190,1214 ----
  
  
  /* Called from Ffontset_info via map_char_table on each leaf of
+    fontset.  ARG is a copy of the default fontset.  The current leaf
+    is indexed by CHARACTER and has value ELT.  This function override
+    the copy by ELT if ELT is not nil.  */
+ 
+ static void
+ override_font_info (fontset, character, elt)
+      Lisp_Object fontset, character, elt;
+ {
+   if (! NILP (elt))
+     Faset (fontset, character, elt);
+ }
+ 
+ /* Called from Ffontset_info via map_char_table on each leaf of
     fontset.  ARG is a list (LAST FONT-INFO ...), where LAST is `(last
     ARG)' and FONT-INFOs have this form:
        (CHAR FONT-SPEC) or ((FROM . TO) FONT-SPEC)
     The current leaf is indexed by CHARACTER and has value ELT.  This
     function add the information of the current leaf to ARG by
!    appending a new element or modifying the last element.  */
  
  static void
  accumulate_font_info (arg, character, elt)
***************
*** 1284,1289 ****
--- 1297,1310 ----
        if (!NILP (elt)
          && EQ (FONTSET_BASE (elt), fontset))
        realized[n_realized++] = elt;
+     }
+ 
+   if (! EQ (fontset, Vdefault_fontset))
+     {
+       /* Merge FONTSET onto the default fontset.  */
+       val = Fcopy_sequence (Vdefault_fontset);
+       map_char_table (override_font_info, Qnil, fontset, val, 0, indices);
+       fontset = val;
      }
  
    /* Accumulate information of the fontset in VAL.  The format is




reply via email to

[Prev in Thread] Current Thread [Next in Thread]