diff options
| author | Dmitry Antipov | 2012-08-01 09:11:36 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2012-08-01 09:11:36 +0400 |
| commit | 3a45383a47009a5e6a15a4005ad95ecf63539182 (patch) | |
| tree | 77f59be478e92b130263034efa3ca94e203cee38 /src/buffer.c | |
| parent | c1dbc63c93c5702da44ef7e3cc281ac3bb7941ce (diff) | |
| download | emacs-3a45383a47009a5e6a15a4005ad95ecf63539182.tar.gz emacs-3a45383a47009a5e6a15a4005ad95ecf63539182.zip | |
Use INTERNAL_FIELD for windows.
* src/window.h (WVAR): New macro.
(struct window): Change Lisp_Object members to INTERNAL_FIELD.
* src/alloc.c, src/buffer.c, src/composite.c, src/dispextern.h:
* src/dispnew.c, src/editfns.c, src/fileio.c, src/font.c, src/fontset.c:
* src/frame.c, src/frame.h, src/fringe.c, src/indent.c, src/insdel.c:
* src/keyboard.c, src/keymap.c, src/lisp.h, src/minibuf.c, src/nsterm.m:
* src/print.c, src/textprop.c, src/w32fns.c, src/w32menu.c, src/w32term.c:
* src/window.c, src/xdisp.c, src/xfaces.c, src/xfns.c, src/xmenu.c:
* src/xterm.c: Users changed.
* admin/coccinelle/window.cocci: Semantic patch to replace direct
access to Lisp_Object members of struct window to WVAR.
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/buffer.c b/src/buffer.c index 4168fa8f027..e70360f5173 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -1557,7 +1557,7 @@ cleaning up all windows currently displaying the buffer to be killed. */) | |||
| 1557 | since anything can happen within do_yes_or_no_p. */ | 1557 | since anything can happen within do_yes_or_no_p. */ |
| 1558 | 1558 | ||
| 1559 | /* Don't kill the minibuffer now current. */ | 1559 | /* Don't kill the minibuffer now current. */ |
| 1560 | if (EQ (buffer, XWINDOW (minibuf_window)->buffer)) | 1560 | if (EQ (buffer, WVAR (XWINDOW (minibuf_window), buffer))) |
| 1561 | return Qnil; | 1561 | return Qnil; |
| 1562 | 1562 | ||
| 1563 | /* When we kill an ordinary buffer which shares it's buffer text | 1563 | /* When we kill an ordinary buffer which shares it's buffer text |
| @@ -1608,7 +1608,7 @@ cleaning up all windows currently displaying the buffer to be killed. */) | |||
| 1608 | /* If the buffer now current is shown in the minibuffer and our buffer | 1608 | /* If the buffer now current is shown in the minibuffer and our buffer |
| 1609 | is the sole other buffer give up. */ | 1609 | is the sole other buffer give up. */ |
| 1610 | XSETBUFFER (tem, current_buffer); | 1610 | XSETBUFFER (tem, current_buffer); |
| 1611 | if (EQ (tem, XWINDOW (minibuf_window)->buffer) | 1611 | if (EQ (tem, WVAR (XWINDOW (minibuf_window), buffer)) |
| 1612 | && EQ (buffer, Fother_buffer (buffer, Qnil, Qnil))) | 1612 | && EQ (buffer, Fother_buffer (buffer, Qnil, Qnil))) |
| 1613 | return Qnil; | 1613 | return Qnil; |
| 1614 | 1614 | ||
| @@ -2190,12 +2190,13 @@ DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text, | |||
| 2190 | while (NILP (Fmemq (w, ws))) | 2190 | while (NILP (Fmemq (w, ws))) |
| 2191 | { | 2191 | { |
| 2192 | ws = Fcons (w, ws); | 2192 | ws = Fcons (w, ws); |
| 2193 | if (MARKERP (XWINDOW (w)->pointm) | 2193 | if (MARKERP (WVAR (XWINDOW (w), pointm)) |
| 2194 | && (EQ (XWINDOW (w)->buffer, buf1) | 2194 | && (EQ (WVAR (XWINDOW (w), buffer), buf1) |
| 2195 | || EQ (XWINDOW (w)->buffer, buf2))) | 2195 | || EQ (WVAR (XWINDOW (w), buffer), buf2))) |
| 2196 | Fset_marker (XWINDOW (w)->pointm, | 2196 | Fset_marker (WVAR (XWINDOW (w), pointm), |
| 2197 | make_number (BUF_BEGV (XBUFFER (XWINDOW (w)->buffer))), | 2197 | make_number |
| 2198 | XWINDOW (w)->buffer); | 2198 | (BUF_BEGV (XBUFFER (WVAR (XWINDOW (w), buffer)))), |
| 2199 | WVAR (XWINDOW (w), buffer)); | ||
| 2199 | w = Fnext_window (w, Qt, Qt); | 2200 | w = Fnext_window (w, Qt, Qt); |
| 2200 | } | 2201 | } |
| 2201 | } | 2202 | } |
| @@ -3671,7 +3672,7 @@ modify_overlay (struct buffer *buf, ptrdiff_t start, ptrdiff_t end) | |||
| 3671 | 3672 | ||
| 3672 | /* If this is a buffer not in the selected window, | 3673 | /* If this is a buffer not in the selected window, |
| 3673 | we must do other windows. */ | 3674 | we must do other windows. */ |
| 3674 | if (buf != XBUFFER (XWINDOW (selected_window)->buffer)) | 3675 | if (buf != XBUFFER (WVAR (XWINDOW (selected_window), buffer))) |
| 3675 | windows_or_buffers_changed = 1; | 3676 | windows_or_buffers_changed = 1; |
| 3676 | /* If multiple windows show this buffer, we must do other windows. */ | 3677 | /* If multiple windows show this buffer, we must do other windows. */ |
| 3677 | else if (buffer_shared > 1) | 3678 | else if (buffer_shared > 1) |