]> code.delx.au - gnu-emacs/blobdiff - src/xfaces.c
* lisp/emacs-lisp/package.el: Fix selected-package logic
[gnu-emacs] / src / xfaces.c
index 7c9f62683fdb4dfbe14afe793bc24be4c072fa9c..d198c4be1a99d77917d2ef7547481f88f22c96aa 100644 (file)
@@ -313,10 +313,10 @@ static int clear_font_table_count;
 
 #endif /* HAVE_WINDOW_SYSTEM */
 
-/* Non-zero means face attributes have been changed since the last
+/* True means face attributes have been changed since the last
    redisplay.  Used in redisplay_internal.  */
 
-int face_change_count;
+bool face_change;
 
 /* True means don't display bold text if a face's foreground
    and background colors are the inverse of the default colors of the
@@ -694,7 +694,7 @@ Optional THOROUGHLY non-nil means try to free unused fonts, too.  */)
   (Lisp_Object thoroughly)
 {
   clear_face_cache (!NILP (thoroughly));
-  ++face_change_count;
+  face_change = true;
   windows_or_buffers_changed = 53;
   return Qnil;
 }
@@ -1822,7 +1822,7 @@ resolve_face_name (Lisp_Object face_name, bool signal_p)
   Lisp_Object tortoise, hare;
 
   if (STRINGP (face_name))
-    face_name = intern (SSDATA (face_name));
+    face_name = Fintern (face_name, Qnil);
 
   if (NILP (face_name) || !SYMBOLP (face_name))
     return face_name;
@@ -2530,11 +2530,11 @@ Value is a vector of face attributes.  */)
   /* Changing a named face means that all realized faces depending on
      that face are invalid.  Since we cannot tell which realized faces
      depend on the face, make sure they are all removed.  This is done
-     by incrementing face_change_count.  The next call to
-     init_iterator will then free realized faces.  */
+     by setting face_change.  The next call to init_iterator will then
+     free realized faces.  */
   if (NILP (Fget (face, Qface_no_inherit)))
     {
-      ++face_change_count;
+      face_change = true;
       windows_or_buffers_changed = 54;
     }
 
@@ -2609,11 +2609,11 @@ The value is TO.  */)
   /* Changing a named face means that all realized faces depending on
      that face are invalid.  Since we cannot tell which realized faces
      depend on the face, make sure they are all removed.  This is done
-     by incrementing face_change_count.  The next call to
-     init_iterator will then free realized faces.  */
+     by setting face_change.  The next call to init_iterator will then
+     free realized faces.  */
   if (NILP (Fget (to, Qface_no_inherit)))
     {
-      ++face_change_count;
+      face_change = true;
       windows_or_buffers_changed = 55;
     }
 
@@ -3107,13 +3107,13 @@ FRAME 0 means change the face on all frames, and change the default
   /* Changing a named face means that all realized faces depending on
      that face are invalid.  Since we cannot tell which realized faces
      depend on the face, make sure they are all removed.  This is done
-     by incrementing face_change_count.  The next call to
-     init_iterator will then free realized faces.  */
+     by setting face_change.  The next call to init_iterator will then
+     free realized faces.  */
   if (!EQ (frame, Qt)
       && NILP (Fget (face, Qface_no_inherit))
       && NILP (Fequal (old_value, value)))
     {
-      ++face_change_count;
+      face_change = true;
       windows_or_buffers_changed = 56;
     }
 
@@ -3281,12 +3281,12 @@ update_face_from_frame_parameter (struct frame *f, Lisp_Object param,
   /* Changing a named face means that all realized faces depending on
      that face are invalid.  Since we cannot tell which realized faces
      depend on the face, make sure they are all removed.  This is done
-     by incrementing face_change_count.  The next call to
-     init_iterator will then free realized faces.  */
+     by setting face_change.  The next call to init_iterator will then
+     free realized faces.  */
   if (!NILP (face)
       && NILP (Fget (face, Qface_no_inherit)))
     {
-      ++face_change_count;
+      face_change = true;
       windows_or_buffers_changed = 57;
     }
 }
@@ -5141,12 +5141,10 @@ static bool
 realize_basic_faces (struct frame *f)
 {
   bool success_p = false;
-  ptrdiff_t count = SPECPDL_INDEX ();
 
   /* Block input here so that we won't be surprised by an X expose
      event, for instance, without having the faces set up.  */
   block_input ();
-  specbind (Qscalable_fonts_allowed, Qt);
 
   if (realize_default_face (f))
     {
@@ -5180,7 +5178,6 @@ realize_basic_faces (struct frame *f)
       success_p = true;
     }
 
-  unbind_to (count, Qnil);
   unblock_input ();
   return success_p;
 }
@@ -5703,7 +5700,7 @@ map_tty_color (struct frame *f, struct face *face,
   if (STRINGP (color)
       && SCHARS (color)
       && CONSP (Vtty_defined_color_alist)
-      && (def = assq_no_quit (color, call1 (Qtty_color_alist, frame)),
+      && (def = assoc_no_quit (color, call1 (Qtty_color_alist, frame)),
          CONSP (def)))
     {
       /* Associations in tty-defined-color-alist are of the form
@@ -5820,7 +5817,7 @@ is non-nil.  */)
   (Lisp_Object suppress)
 {
   tty_suppress_bold_inverse_default_colors_p = !NILP (suppress);
-  ++face_change_count;
+  face_change = true;
   return suppress;
 }
 
@@ -6190,7 +6187,7 @@ where R,G,B are numbers between 0 and 255 and name is an arbitrary string.  */)
   abspath = Fexpand_file_name (filename, Qnil);
 
   block_input ();
-  fp = emacs_fopen (SSDATA (abspath), "rt");
+  fp = emacs_fopen (SSDATA (abspath), "r" FOPEN_TEXT);
   if (fp)
     {
       char buf[512];