Commit b6a9e8b1 authored by Dmitry Antipov's avatar Dmitry Antipov
Browse files

* 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.
parent f7e65065
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.
......
......@@ -4766,7 +4766,6 @@ character at index specified by POSITION. */)
(Lisp_Object position, Lisp_Object window, Lisp_Object string)
{
struct window *w = decode_live_window (window);
ptrdiff_t pos;
if (NILP (string))
{
......@@ -4775,7 +4774,6 @@ character at index specified by POSITION. */)
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
{
......@@ -4783,10 +4781,9 @@ character at index specified by POSITION. */)
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
......
......@@ -774,8 +774,7 @@ area is only partially visible, that counts as a whole line; to
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,
......@@ -787,8 +786,7 @@ marginal areas, or scroll bars. On a graphical display, the width is
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,
......@@ -2254,6 +2252,7 @@ decode_next_window_args (Lisp_Object *window, Lisp_Object *minibuf, Lisp_Object
{
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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment