aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann1999-09-13 11:14:08 +0000
committerGerd Moellmann1999-09-13 11:14:08 +0000
commitc0617987c6fecd65469d9e38ae5372b153097583 (patch)
treec36b8756adaa4e1d827e82694f5f77208efd9f6f /src
parent886bd6f2115ee32aae4b0c797d39db18a09c9fc0 (diff)
downloademacs-c0617987c6fecd65469d9e38ae5372b153097583.tar.gz
emacs-c0617987c6fecd65469d9e38ae5372b153097583.zip
(frame_or_selected_frame): Change for Lisp_Object
selected_frame. (Finternal_set_lisp_face_attribute): Ditto. (Finternal_get_lisp_face_attribute): Ditto. (Finternal_lisp_face_empty_p): Ditto. (Fdump_face): Ditto.
Diffstat (limited to 'src')
-rw-r--r--src/xfaces.c42
1 files changed, 17 insertions, 25 deletions
diff --git a/src/xfaces.c b/src/xfaces.c
index d4ec11d5f04..c50a8463744 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -637,27 +637,22 @@ add_to_log (f, format, arg1, arg2)
637} 637}
638 638
639 639
640/* If FRAME is nil, return selected_frame. Otherwise, check that 640/* If FRAME is nil, return a pointer to the selected frame.
641 FRAME is a live frame, and return a pointer to it. NPARAM 641 Otherwise, check that FRAME is a live frame, and return a pointer
642 is the parameter number of FRAME, for CHECK_LIVE_FRAME. This is 642 to it. NPARAM is the parameter number of FRAME, for
643 here because it's a frequent pattern in Lisp function definitions. */ 643 CHECK_LIVE_FRAME. This is here because it's a frequent pattern in
644 Lisp function definitions. */
644 645
645static INLINE struct frame * 646static INLINE struct frame *
646frame_or_selected_frame (frame, nparam) 647frame_or_selected_frame (frame, nparam)
647 Lisp_Object frame; 648 Lisp_Object frame;
648 int nparam; 649 int nparam;
649{ 650{
650 struct frame *f;
651
652 if (NILP (frame)) 651 if (NILP (frame))
653 f = selected_frame; 652 frame = selected_frame;
654 else 653
655 { 654 CHECK_LIVE_FRAME (frame, nparam);
656 CHECK_LIVE_FRAME (frame, nparam); 655 return XFRAME (frame);
657 f = XFRAME (frame);
658 }
659
660 return f;
661} 656}
662 657
663 658
@@ -3174,7 +3169,7 @@ frame.")
3174 else 3169 else
3175 { 3170 {
3176 if (NILP (frame)) 3171 if (NILP (frame))
3177 XSETFRAME (frame, selected_frame); 3172 frame = selected_frame;
3178 3173
3179 CHECK_LIVE_FRAME (frame, 3); 3174 CHECK_LIVE_FRAME (frame, 3);
3180 lface = lface_from_face_name (XFRAME (frame), face, 0); 3175 lface = lface_from_face_name (XFRAME (frame), face, 0);
@@ -3409,7 +3404,7 @@ frame.")
3409 3404
3410 CHECK_STRING (value, 3); 3405 CHECK_STRING (value, 3);
3411 if (EQ (frame, Qt)) 3406 if (EQ (frame, Qt))
3412 f = selected_frame; 3407 f = SELECTED_FRAME ();
3413 else 3408 else
3414 f = check_x_frame (frame); 3409 f = check_x_frame (frame);
3415 3410
@@ -3742,7 +3737,7 @@ frames). If FRAME is omitted or nil, use the selected frame.")
3742 else 3737 else
3743 { 3738 {
3744 if (NILP (frame)) 3739 if (NILP (frame))
3745 XSETFRAME (frame, selected_frame); 3740 frame = selected_frame;
3746 CHECK_LIVE_FRAME (frame, 2); 3741 CHECK_LIVE_FRAME (frame, 2);
3747 lface = lface_from_face_name (XFRAME (frame), symbol, 1); 3742 lface = lface_from_face_name (XFRAME (frame), symbol, 1);
3748 } 3743 }
@@ -3983,12 +3978,9 @@ If FRAME is omitted or nil, use the selected frame.")
3983 int i; 3978 int i;
3984 3979
3985 if (NILP (frame)) 3980 if (NILP (frame))
3986 f = selected_frame; 3981 frame = selected_frame;
3987 else 3982 CHECK_LIVE_FRAME (frame, 0);
3988 { 3983 f = XFRAME (frame);
3989 CHECK_LIVE_FRAME (frame, 0);
3990 f = XFRAME (frame);
3991 }
3992 3984
3993 if (EQ (frame, Qt)) 3985 if (EQ (frame, Qt))
3994 lface = lface_from_face_name (NULL, face, 1); 3986 lface = lface_from_face_name (NULL, face, 1);
@@ -6234,14 +6226,14 @@ DEFUN ("dump-face", Fdump_face, Sdump_face, 0, 1, 0, "")
6234 debug_print (Vface_alternative_font_family_alist); 6226 debug_print (Vface_alternative_font_family_alist);
6235 fprintf (stderr, "\n"); 6227 fprintf (stderr, "\n");
6236 6228
6237 for (i = 0; i < FRAME_FACE_CACHE (selected_frame)->used; ++i) 6229 for (i = 0; i < FRAME_FACE_CACHE (SELECTED_FRAME ())->used; ++i)
6238 Fdump_face (make_number (i)); 6230 Fdump_face (make_number (i));
6239 } 6231 }
6240 else 6232 else
6241 { 6233 {
6242 struct face *face; 6234 struct face *face;
6243 CHECK_NUMBER (n, 0); 6235 CHECK_NUMBER (n, 0);
6244 face = FACE_FROM_ID (selected_frame, XINT (n)); 6236 face = FACE_FROM_ID (SELECTED_FRAME (), XINT (n));
6245 if (face == NULL) 6237 if (face == NULL)
6246 error ("Not a valid face"); 6238 error ("Not a valid face");
6247 dump_realized_face (face); 6239 dump_realized_face (face);