comparison src/xfaces.c @ 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 109c0a603543
children 075ad6932e06 dbcd0af66869 4c90ffeb71c5
comparison
equal deleted inserted replaced
56175:b53351ef3125 56176:21c659556daa
3894 3894
3895 3895
3896 DEFUN ("internal-copy-lisp-face", Finternal_copy_lisp_face, 3896 DEFUN ("internal-copy-lisp-face", Finternal_copy_lisp_face,
3897 Sinternal_copy_lisp_face, 4, 4, 0, 3897 Sinternal_copy_lisp_face, 4, 4, 0,
3898 doc: /* Copy face FROM to TO. 3898 doc: /* Copy face FROM to TO.
3899 If FRAME is t, copy the global face definition of FROM to the 3899 If FRAME is t, copy the global face definition of FROM.
3900 global face definition of TO. Otherwise, copy the frame-local 3900 Otherwise, copy the frame-local definition of FROM on FRAME.
3901 definition of FROM on FRAME to the frame-local definition of TO 3901 If NEW-FRAME is a frame, copy that data into the frame-local
3902 on NEW-FRAME, or FRAME if NEW-FRAME is nil. 3902 definition of TO on NEW-FRAME. If NEW-FRAME is nil.
3903 3903 FRAME controls where the data is copied to.
3904 Value is TO. */) 3904
3905 The value is TO. */)
3905 (from, to, frame, new_frame) 3906 (from, to, frame, new_frame)
3906 Lisp_Object from, to, frame, new_frame; 3907 Lisp_Object from, to, frame, new_frame;
3907 { 3908 {
3908 Lisp_Object lface, copy; 3909 Lisp_Object lface, copy;
3909 3910
3910 CHECK_SYMBOL (from); 3911 CHECK_SYMBOL (from);
3911 CHECK_SYMBOL (to); 3912 CHECK_SYMBOL (to);
3912 if (NILP (new_frame))
3913 new_frame = frame;
3914 3913
3915 if (EQ (frame, Qt)) 3914 if (EQ (frame, Qt))
3916 { 3915 {
3917 /* Copy global definition of FROM. We don't make copies of 3916 /* Copy global definition of FROM. We don't make copies of
3918 strings etc. because 20.2 didn't do it either. */ 3917 strings etc. because 20.2 didn't do it either. */
3920 copy = Finternal_make_lisp_face (to, Qnil); 3919 copy = Finternal_make_lisp_face (to, Qnil);
3921 } 3920 }
3922 else 3921 else
3923 { 3922 {
3924 /* Copy frame-local definition of FROM. */ 3923 /* Copy frame-local definition of FROM. */
3924 if (NILP (new_frame))
3925 new_frame = frame;
3925 CHECK_LIVE_FRAME (frame); 3926 CHECK_LIVE_FRAME (frame);
3926 CHECK_LIVE_FRAME (new_frame); 3927 CHECK_LIVE_FRAME (new_frame);
3927 lface = lface_from_face_name (XFRAME (frame), from, 1); 3928 lface = lface_from_face_name (XFRAME (frame), from, 1);
3928 copy = Finternal_make_lisp_face (to, new_frame); 3929 copy = Finternal_make_lisp_face (to, new_frame);
3929 } 3930 }