From b9e9df47f2886bb4b6b67aea8eeb0b015258a063 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Fri, 2 Nov 2012 14:34:26 +0400 Subject: Window-related stuff cleanup here and there. * dispnew.c (Finternal_show_cursor, Finternal_show_cursor_p): Use decode_any_window. * fringe.c (Ffringe_bitmaps_at_pos): Likewise. * xdisp.c (Fformat_mode_line): Likewise. * font.c (Ffont_at): Use decode_live_window. * indent.c (Fcompute_motion, Fvertical_motion): Likewise. * window.c (decode_next_window_args): Likewise. (decode_any_window): Remove static. * window.h (decode_any_window): Add prototype. * lisp.h (CHECK_VALID_WINDOW, CHECK_LIVE_WINDOW): Move from here... * window.h: ...to here, redefine via WINDOW_VALID_P and WINDOW_LIVE_P, respectively. --- src/fringe.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/fringe.c') diff --git a/src/fringe.c b/src/fringe.c index d788503e91..a126292e1f 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -1731,10 +1731,8 @@ Return nil if POS is not visible in WINDOW. */) struct glyph_row *row; ptrdiff_t textpos; - if (NILP (window)) - window = selected_window; - CHECK_WINDOW (window); - w = XWINDOW (window); + w = decode_any_window (window); + XSETWINDOW (window, w); if (!NILP (pos)) { -- cgit v1.2.3