aboutsummaryrefslogtreecommitdiffstats
path: root/src/indent.c
diff options
context:
space:
mode:
authorDmitry Antipov2012-08-06 14:24:26 +0400
committerDmitry Antipov2012-08-06 14:24:26 +0400
commit077288cf3f654776ee44bc9b56954c4e26b10d96 (patch)
tree00bbcb4dab9c879efde73a01786977b1c1364f67 /src/indent.c
parent71688bd7f9169c12ea8be54e084470f19d44ce44 (diff)
downloademacs-077288cf3f654776ee44bc9b56954c4e26b10d96.tar.gz
emacs-077288cf3f654776ee44bc9b56954c4e26b10d96.zip
Separate read and write access to Lisp_Object slots of struct window.
* window.h (WGET, WSET): New macros similar to AREF and ASET. * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c: * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c: * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m: * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c: * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
Diffstat (limited to 'src/indent.c')
-rw-r--r--src/indent.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/indent.c b/src/indent.c
index a6a9a9a0073..fca9f4c9271 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -258,7 +258,7 @@ skip_invisible (ptrdiff_t pos, ptrdiff_t *next_boundary_p, ptrdiff_t to, Lisp_Ob
258 the next property change */ 258 the next property change */
259 prop = Fget_char_property (position, Qinvisible, 259 prop = Fget_char_property (position, Qinvisible,
260 (!NILP (window) 260 (!NILP (window)
261 && EQ (WVAR (XWINDOW (window), buffer), buffer)) 261 && EQ (WGET (XWINDOW (window), buffer), buffer))
262 ? window : buffer); 262 ? window : buffer);
263 inv_p = TEXT_PROP_MEANS_INVISIBLE (prop); 263 inv_p = TEXT_PROP_MEANS_INVISIBLE (prop);
264 /* When counting columns (window == nil), don't skip over ellipsis text. */ 264 /* When counting columns (window == nil), don't skip over ellipsis text. */
@@ -1173,14 +1173,14 @@ compute_motion (ptrdiff_t from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_
1173 width = window_body_cols (win); 1173 width = window_body_cols (win);
1174 /* We must make room for continuation marks if we don't have fringes. */ 1174 /* We must make room for continuation marks if we don't have fringes. */
1175#ifdef HAVE_WINDOW_SYSTEM 1175#ifdef HAVE_WINDOW_SYSTEM
1176 if (!FRAME_WINDOW_P (XFRAME (WVAR (win, frame)))) 1176 if (!FRAME_WINDOW_P (XFRAME (WGET (win, frame))))
1177#endif 1177#endif
1178 width -= 1; 1178 width -= 1;
1179 } 1179 }
1180 1180
1181 continuation_glyph_width = 1; 1181 continuation_glyph_width = 1;
1182#ifdef HAVE_WINDOW_SYSTEM 1182#ifdef HAVE_WINDOW_SYSTEM
1183 if (FRAME_WINDOW_P (XFRAME (WVAR (win, frame)))) 1183 if (FRAME_WINDOW_P (XFRAME (WGET (win, frame))))
1184 continuation_glyph_width = 0; /* In the fringe. */ 1184 continuation_glyph_width = 0; /* In the fringe. */
1185#endif 1185#endif
1186 1186
@@ -1787,7 +1787,7 @@ visible section of the buffer, and pass LINE and COL as TOPOS. */)
1787 ? (window_body_cols (w) 1787 ? (window_body_cols (w)
1788 - ( 1788 - (
1789#ifdef HAVE_WINDOW_SYSTEM 1789#ifdef HAVE_WINDOW_SYSTEM
1790 FRAME_WINDOW_P (XFRAME (WVAR (w, frame))) ? 0 : 1790 FRAME_WINDOW_P (XFRAME (WGET (w, frame))) ? 0 :
1791#endif 1791#endif
1792 1)) 1792 1))
1793 : XINT (XCAR (topos))), 1793 : XINT (XCAR (topos))),
@@ -1837,7 +1837,7 @@ vmotion (register ptrdiff_t from, register EMACS_INT vtarget, struct window *w)
1837 1837
1838 /* If the window contains this buffer, use it for getting text properties. 1838 /* If the window contains this buffer, use it for getting text properties.
1839 Otherwise use the current buffer as arg for doing that. */ 1839 Otherwise use the current buffer as arg for doing that. */
1840 if (EQ (WVAR (w, buffer), Fcurrent_buffer ())) 1840 if (EQ (WGET (w, buffer), Fcurrent_buffer ()))
1841 text_prop_object = window; 1841 text_prop_object = window;
1842 else 1842 else
1843 text_prop_object = Fcurrent_buffer (); 1843 text_prop_object = Fcurrent_buffer ();
@@ -1998,14 +1998,14 @@ whether or not it is currently displayed in some window. */)
1998 1998
1999 old_buffer = Qnil; 1999 old_buffer = Qnil;
2000 GCPRO3 (old_buffer, old_charpos, old_bytepos); 2000 GCPRO3 (old_buffer, old_charpos, old_bytepos);
2001 if (XBUFFER (WVAR (w, buffer)) != current_buffer) 2001 if (XBUFFER (WGET (w, buffer)) != current_buffer)
2002 { 2002 {
2003 /* Set the window's buffer temporarily to the current buffer. */ 2003 /* Set the window's buffer temporarily to the current buffer. */
2004 old_buffer = WVAR (w, buffer); 2004 old_buffer = WGET (w, buffer);
2005 old_charpos = XMARKER (WVAR (w, pointm))->charpos; 2005 old_charpos = XMARKER (WGET (w, pointm))->charpos;
2006 old_bytepos = XMARKER (WVAR (w, pointm))->bytepos; 2006 old_bytepos = XMARKER (WGET (w, pointm))->bytepos;
2007 XSETBUFFER (WVAR (w, buffer), current_buffer); 2007 WSET (w, buffer, Fcurrent_buffer ());
2008 set_marker_both (WVAR (w, pointm), WVAR (w, buffer), 2008 set_marker_both (WGET (w, pointm), WGET (w, buffer),
2009 BUF_PT (current_buffer), BUF_PT_BYTE (current_buffer)); 2009 BUF_PT (current_buffer), BUF_PT_BYTE (current_buffer));
2010 } 2010 }
2011 2011
@@ -2137,7 +2137,7 @@ whether or not it is currently displayed in some window. */)
2137 } 2137 }
2138 move_it_in_display_line 2138 move_it_in_display_line
2139 (&it, ZV, 2139 (&it, ZV,
2140 (int)(cols * FRAME_COLUMN_WIDTH (XFRAME (WVAR (w, frame))) + 0.5), 2140 (int)(cols * FRAME_COLUMN_WIDTH (XFRAME (WGET (w, frame))) + 0.5),
2141 MOVE_TO_X); 2141 MOVE_TO_X);
2142 } 2142 }
2143 2143
@@ -2147,8 +2147,8 @@ whether or not it is currently displayed in some window. */)
2147 2147
2148 if (BUFFERP (old_buffer)) 2148 if (BUFFERP (old_buffer))
2149 { 2149 {
2150 WVAR (w, buffer) = old_buffer; 2150 WSET (w, buffer, old_buffer);
2151 set_marker_both (WVAR (w, pointm), WVAR (w, buffer), 2151 set_marker_both (WGET (w, pointm), WGET (w, buffer),
2152 old_charpos, old_bytepos); 2152 old_charpos, old_bytepos);
2153 } 2153 }
2154 2154