changeset 56176:21c659556daa

(Finternal_copy_lisp_face): Small cleanup; doc fix.
author Richard M. Stallman <rms@gnu.org>
date Mon, 21 Jun 2004 03:26:32 +0000
parents b53351ef3125
children 419c75bd5054
files src/xfaces.c
diffstat 1 files changed, 9 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfaces.c	Mon Jun 21 03:24:25 2004 +0000
+++ b/src/xfaces.c	Mon Jun 21 03:26:32 2004 +0000
@@ -3896,12 +3896,13 @@
 DEFUN ("internal-copy-lisp-face", Finternal_copy_lisp_face,
        Sinternal_copy_lisp_face, 4, 4, 0,
        doc: /* Copy face FROM to TO.
-If FRAME is t, copy the global face definition of FROM to the
-global face definition of TO.  Otherwise, copy the frame-local
-definition of FROM on FRAME to the frame-local definition of TO
-on NEW-FRAME, or FRAME if NEW-FRAME is nil.
-
-Value is TO.  */)
+If FRAME is t, copy the global face definition of FROM.
+Otherwise, copy the frame-local definition of FROM on FRAME.
+If NEW-FRAME is a frame, copy that data into the frame-local
+definition of TO on NEW-FRAME.  If NEW-FRAME is nil.
+FRAME controls where the data is copied to.
+
+The value is TO.  */)
      (from, to, frame, new_frame)
      Lisp_Object from, to, frame, new_frame;
 {
@@ -3909,8 +3910,6 @@
 
   CHECK_SYMBOL (from);
   CHECK_SYMBOL (to);
-  if (NILP (new_frame))
-    new_frame = frame;
 
   if (EQ (frame, Qt))
     {
@@ -3922,6 +3921,8 @@
   else
     {
       /* Copy frame-local definition of FROM.  */
+      if (NILP (new_frame))
+	new_frame = frame;
       CHECK_LIVE_FRAME (frame);
       CHECK_LIVE_FRAME (new_frame);
       lface = lface_from_face_name (XFRAME (frame), from, 1);