+2012-11-03 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * window.c (decode_next_window_args): Update window arg after
+ calling decode_live_window and so fix crash reported at
+ http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00035.html
+ by Juanma Barranquero <lekktu@gmail.com>.
+ (Fwindow_body_width, Fwindow_body_height): Simplify a bit.
+ * font.c (Ffont_at): Likewise.
+
2012-11-01 Jan Djärv <jan.h.d@swipnet.se>
* widget.c (resize_cb): New function.
(Lisp_Object position, Lisp_Object window, Lisp_Object string)
{
struct window *w = decode_live_window (window);
- ptrdiff_t pos;
if (NILP (string))
{
CHECK_NUMBER_COERCE_MARKER (position);
if (! (BEGV <= XINT (position) && XINT (position) < ZV))
args_out_of_range_3 (position, make_number (BEGV), make_number (ZV));
- pos = XINT (position);
}
else
{
CHECK_STRING (string);
if (! (0 <= XINT (position) && XINT (position) < SCHARS (string)))
args_out_of_range (string, position);
- pos = XINT (position);
}
- return font_at (-1, pos, NULL, w, string);
+ return font_at (-1, XINT (position), NULL, w, string);
}
#if 0
exclude partially-visible lines, use `window-text-height'. */)
(Lisp_Object window)
{
- struct window *w = decode_live_window (window);
- return make_number (window_body_lines (w));
+ return make_number (window_body_lines (decode_live_window (window)));
}
DEFUN ("window-body-width", Fwindow_body_width, Swindow_body_width, 0, 1, 0,
expressed as an integer multiple of the default character width. */)
(Lisp_Object window)
{
- struct window *w = decode_live_window (window);
- return make_number (window_body_cols (w));
+ return make_number (window_body_cols (decode_live_window (window)));
}
DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0,
{
struct window *w = decode_live_window (*window);
+ XSETWINDOW (*window, w);
/* MINIBUF nil may or may not include minibuffers. Decide if it
does. */
if (NILP (*minibuf))