diff options
| author | Dmitry Antipov | 2012-11-03 09:11:34 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2012-11-03 09:11:34 +0400 |
| commit | b6a9e8b1a2ed4dbf77aa51d3817c9f47c1cb16b4 (patch) | |
| tree | f469b6af821b39f50db51a57fc71a5a01d71680e /src/window.c | |
| parent | f7e65065fc261e4ec4bcf93b2c329d0c078750a8 (diff) | |
| download | emacs-b6a9e8b1a2ed4dbf77aa51d3817c9f47c1cb16b4.tar.gz emacs-b6a9e8b1a2ed4dbf77aa51d3817c9f47c1cb16b4.zip | |
* 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.
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/window.c b/src/window.c index 8dbecf9c81e..766765cfa09 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -774,8 +774,7 @@ area is only partially visible, that counts as a whole line; to | |||
| 774 | exclude partially-visible lines, use `window-text-height'. */) | 774 | exclude partially-visible lines, use `window-text-height'. */) |
| 775 | (Lisp_Object window) | 775 | (Lisp_Object window) |
| 776 | { | 776 | { |
| 777 | struct window *w = decode_live_window (window); | 777 | return make_number (window_body_lines (decode_live_window (window))); |
| 778 | return make_number (window_body_lines (w)); | ||
| 779 | } | 778 | } |
| 780 | 779 | ||
| 781 | DEFUN ("window-body-width", Fwindow_body_width, Swindow_body_width, 0, 1, 0, | 780 | 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 | |||
| 787 | expressed as an integer multiple of the default character width. */) | 786 | expressed as an integer multiple of the default character width. */) |
| 788 | (Lisp_Object window) | 787 | (Lisp_Object window) |
| 789 | { | 788 | { |
| 790 | struct window *w = decode_live_window (window); | 789 | return make_number (window_body_cols (decode_live_window (window))); |
| 791 | return make_number (window_body_cols (w)); | ||
| 792 | } | 790 | } |
| 793 | 791 | ||
| 794 | DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, | 792 | 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 | |||
| 2254 | { | 2252 | { |
| 2255 | struct window *w = decode_live_window (*window); | 2253 | struct window *w = decode_live_window (*window); |
| 2256 | 2254 | ||
| 2255 | XSETWINDOW (*window, w); | ||
| 2257 | /* MINIBUF nil may or may not include minibuffers. Decide if it | 2256 | /* MINIBUF nil may or may not include minibuffers. Decide if it |
| 2258 | does. */ | 2257 | does. */ |
| 2259 | if (NILP (*minibuf)) | 2258 | if (NILP (*minibuf)) |