summaryrefslogtreecommitdiff
path: root/src/indent.c
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2012-11-02 14:34:26 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2012-11-02 14:34:26 +0400
commitb9e9df47f2886bb4b6b67aea8eeb0b015258a063 (patch)
tree0223e720b05e2fe607708a1658d0cbbd14f05e8f /src/indent.c
parentc574bc3409143d0eb3aea1fe3161fac28de7e366 (diff)
downloademacs-b9e9df47f2886bb4b6b67aea8eeb0b015258a063.tar.gz
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.
Diffstat (limited to 'src/indent.c')
-rw-r--r--src/indent.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/indent.c b/src/indent.c
index bbc944d2518..eee96061e25 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -1764,11 +1764,7 @@ visible section of the buffer, and pass LINE and COL as TOPOS. */)
else
hscroll = tab_offset = 0;
- if (NILP (window))
- window = Fselected_window ();
- else
- CHECK_LIVE_WINDOW (window);
- w = XWINDOW (window);
+ w = decode_live_window (window);
if (XINT (from) < BEGV || XINT (from) > ZV)
args_out_of_range_3 (from, make_number (BEGV), make_number (ZV));
@@ -1790,8 +1786,7 @@ visible section of the buffer, and pass LINE and COL as TOPOS. */)
1))
: XINT (XCAR (topos))),
(NILP (width) ? -1 : XINT (width)),
- hscroll, tab_offset,
- XWINDOW (window));
+ hscroll, tab_offset, w);
XSETFASTINT (bufpos, pos->bufpos);
XSETINT (hpos, pos->hpos);
@@ -1988,11 +1983,7 @@ whether or not it is currently displayed in some window. */)
}
CHECK_NUMBER (lines);
- if (! NILP (window))
- CHECK_WINDOW (window);
- else
- window = selected_window;
- w = XWINDOW (window);
+ w = decode_live_window (window);
old_buffer = Qnil;
GCPRO3 (old_buffer, old_charpos, old_bytepos);