diff options
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/window.c b/src/window.c index cf296a707e3..2589596ccfd 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -23,7 +23,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 23 | #define WINDOW_INLINE EXTERN_INLINE | 23 | #define WINDOW_INLINE EXTERN_INLINE |
| 24 | 24 | ||
| 25 | #include <stdio.h> | 25 | #include <stdio.h> |
| 26 | #include <setjmp.h> | ||
| 27 | 26 | ||
| 28 | #include "lisp.h" | 27 | #include "lisp.h" |
| 29 | #include "character.h" | 28 | #include "character.h" |
| @@ -1857,23 +1856,23 @@ return value is a list of elements of the form (PARAMETER . VALUE). */) | |||
| 1857 | DEFUN ("window-parameter", Fwindow_parameter, Swindow_parameter, | 1856 | DEFUN ("window-parameter", Fwindow_parameter, Swindow_parameter, |
| 1858 | 2, 2, 0, | 1857 | 2, 2, 0, |
| 1859 | doc: /* Return WINDOW's value for PARAMETER. | 1858 | doc: /* Return WINDOW's value for PARAMETER. |
| 1860 | WINDOW must be a valid window and defaults to the selected one. */) | 1859 | WINDOW can be any window and defaults to the selected one. */) |
| 1861 | (Lisp_Object window, Lisp_Object parameter) | 1860 | (Lisp_Object window, Lisp_Object parameter) |
| 1862 | { | 1861 | { |
| 1863 | Lisp_Object result; | 1862 | Lisp_Object result; |
| 1864 | 1863 | ||
| 1865 | result = Fassq (parameter, decode_valid_window (window)->window_parameters); | 1864 | result = Fassq (parameter, decode_any_window (window)->window_parameters); |
| 1866 | return CDR_SAFE (result); | 1865 | return CDR_SAFE (result); |
| 1867 | } | 1866 | } |
| 1868 | 1867 | ||
| 1869 | DEFUN ("set-window-parameter", Fset_window_parameter, | 1868 | DEFUN ("set-window-parameter", Fset_window_parameter, |
| 1870 | Sset_window_parameter, 3, 3, 0, | 1869 | Sset_window_parameter, 3, 3, 0, |
| 1871 | doc: /* Set WINDOW's value of PARAMETER to VALUE. | 1870 | doc: /* Set WINDOW's value of PARAMETER to VALUE. |
| 1872 | WINDOW must be a valid window and defaults to the selected one. | 1871 | WINDOW can be any window and defaults to the selected one. |
| 1873 | Return VALUE. */) | 1872 | Return VALUE. */) |
| 1874 | (Lisp_Object window, Lisp_Object parameter, Lisp_Object value) | 1873 | (Lisp_Object window, Lisp_Object parameter, Lisp_Object value) |
| 1875 | { | 1874 | { |
| 1876 | register struct window *w = decode_valid_window (window); | 1875 | register struct window *w = decode_any_window (window); |
| 1877 | Lisp_Object old_alist_elt; | 1876 | Lisp_Object old_alist_elt; |
| 1878 | 1877 | ||
| 1879 | old_alist_elt = Fassq (parameter, w->window_parameters); | 1878 | old_alist_elt = Fassq (parameter, w->window_parameters); |
| @@ -2659,7 +2658,7 @@ window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frame | |||
| 2659 | /* Check for a window that has a killed buffer. */ | 2658 | /* Check for a window that has a killed buffer. */ |
| 2660 | case CHECK_ALL_WINDOWS: | 2659 | case CHECK_ALL_WINDOWS: |
| 2661 | if (! NILP (w->buffer) | 2660 | if (! NILP (w->buffer) |
| 2662 | && NILP (BVAR (XBUFFER (w->buffer), name))) | 2661 | && !BUFFER_LIVE_P (XBUFFER (w->buffer))) |
| 2663 | emacs_abort (); | 2662 | emacs_abort (); |
| 2664 | break; | 2663 | break; |
| 2665 | 2664 | ||
| @@ -3264,7 +3263,7 @@ This function runs `window-scroll-functions' before running | |||
| 3264 | XSETWINDOW (window, w); | 3263 | XSETWINDOW (window, w); |
| 3265 | buffer = Fget_buffer (buffer_or_name); | 3264 | buffer = Fget_buffer (buffer_or_name); |
| 3266 | CHECK_BUFFER (buffer); | 3265 | CHECK_BUFFER (buffer); |
| 3267 | if (NILP (BVAR (XBUFFER (buffer), name))) | 3266 | if (!BUFFER_LIVE_P (XBUFFER (buffer))) |
| 3268 | error ("Attempt to display deleted buffer"); | 3267 | error ("Attempt to display deleted buffer"); |
| 3269 | 3268 | ||
| 3270 | tem = w->buffer; | 3269 | tem = w->buffer; |
| @@ -3329,7 +3328,7 @@ displaying that buffer. */) | |||
| 3329 | 3328 | ||
| 3330 | if (STRINGP (object)) | 3329 | if (STRINGP (object)) |
| 3331 | object = Fget_buffer (object); | 3330 | object = Fget_buffer (object); |
| 3332 | if (BUFFERP (object) && !NILP (BVAR (XBUFFER (object), name))) | 3331 | if (BUFFERP (object) && BUFFER_LIVE_P (XBUFFER (object))) |
| 3333 | { | 3332 | { |
| 3334 | /* Walk all windows looking for buffer, and force update | 3333 | /* Walk all windows looking for buffer, and force update |
| 3335 | of each of those windows. */ | 3334 | of each of those windows. */ |
| @@ -5543,7 +5542,7 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5543 | saved_windows = XVECTOR (data->saved_windows); | 5542 | saved_windows = XVECTOR (data->saved_windows); |
| 5544 | 5543 | ||
| 5545 | new_current_buffer = data->current_buffer; | 5544 | new_current_buffer = data->current_buffer; |
| 5546 | if (NILP (BVAR (XBUFFER (new_current_buffer), name))) | 5545 | if (!BUFFER_LIVE_P (XBUFFER (new_current_buffer))) |
| 5547 | new_current_buffer = Qnil; | 5546 | new_current_buffer = Qnil; |
| 5548 | else | 5547 | else |
| 5549 | { | 5548 | { |
| @@ -5618,7 +5617,7 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5618 | w = XWINDOW (window); | 5617 | w = XWINDOW (window); |
| 5619 | if (!NILP (w->buffer) | 5618 | if (!NILP (w->buffer) |
| 5620 | && !EQ (w->buffer, p->buffer) | 5619 | && !EQ (w->buffer, p->buffer) |
| 5621 | && !NILP (BVAR (XBUFFER (p->buffer), name))) | 5620 | && BUFFER_LIVE_P (XBUFFER (p->buffer))) |
| 5622 | /* If a window we restore gets another buffer, record the | 5621 | /* If a window we restore gets another buffer, record the |
| 5623 | window's old buffer. */ | 5622 | window's old buffer. */ |
| 5624 | call1 (Qrecord_window_buffer, window); | 5623 | call1 (Qrecord_window_buffer, window); |
| @@ -5768,7 +5767,7 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5768 | if (NILP (p->buffer)) | 5767 | if (NILP (p->buffer)) |
| 5769 | /* An internal window. */ | 5768 | /* An internal window. */ |
| 5770 | wset_buffer (w, p->buffer); | 5769 | wset_buffer (w, p->buffer); |
| 5771 | else if (!NILP (BVAR (XBUFFER (p->buffer), name))) | 5770 | else if (BUFFER_LIVE_P (XBUFFER (p->buffer))) |
| 5772 | /* If saved buffer is alive, install it. */ | 5771 | /* If saved buffer is alive, install it. */ |
| 5773 | { | 5772 | { |
| 5774 | wset_buffer (w, p->buffer); | 5773 | wset_buffer (w, p->buffer); |
| @@ -5787,7 +5786,7 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5787 | Fgoto_char (w->pointm); | 5786 | Fgoto_char (w->pointm); |
| 5788 | } | 5787 | } |
| 5789 | else if (!NILP (w->buffer) | 5788 | else if (!NILP (w->buffer) |
| 5790 | && !NILP (BVAR (XBUFFER (w->buffer), name))) | 5789 | && BUFFER_LIVE_P (XBUFFER (w->buffer))) |
| 5791 | /* Keep window's old buffer; make sure the markers are | 5790 | /* Keep window's old buffer; make sure the markers are |
| 5792 | real. */ | 5791 | real. */ |
| 5793 | { | 5792 | { |