comparison src/indent.c @ 185:3d6bfa290dbd r20-3b19

Import from CVS: tag r20-3b19
author cvs
date Mon, 13 Aug 2007 09:55:28 +0200
parents 8eaf7971accc
children c5d627a313b1
comparison
equal deleted inserted replaced
184:bcd2674570bf 185:3d6bfa290dbd
112 112
113 #endif /* REGION_CACHE_NEEDS_WORK */ 113 #endif /* REGION_CACHE_NEEDS_WORK */
114 114
115 115
116 /* Cancel any recorded value of the horizontal position. */ 116 /* Cancel any recorded value of the horizontal position. */
117 117
118 void 118 void
119 invalidate_current_column (void) 119 invalidate_current_column (void)
120 { 120 {
121 last_known_column_point = -1; 121 last_known_column_point = -1;
122 } 122 }
241 minimum = Qzero; 241 minimum = Qzero;
242 else 242 else
243 CHECK_INT (minimum); 243 CHECK_INT (minimum);
244 244
245 XSETBUFFER (buffer, buf); 245 XSETBUFFER (buffer, buf);
246 246
247 fromcol = current_column (buf); 247 fromcol = current_column (buf);
248 mincol = fromcol + XINT (minimum); 248 mincol = fromcol + XINT (minimum);
249 if (mincol < XINT (col)) mincol = XINT (col); 249 if (mincol < XINT (col)) mincol = XINT (col);
250 250
251 if (fromcol == mincol) 251 if (fromcol == mincol)
252 return make_int (mincol); 252 return make_int (mincol);
253 253
254 if (tab_width <= 0 || tab_width > 1000) tab_width = 8; 254 if (tab_width <= 0 || tab_width > 1000) tab_width = 8;
255 255
256 if (!NILP (Fextent_at (make_int (BUF_PT (buf)), buffer, Qinvisible, 256 if (!NILP (Fextent_at (make_int (BUF_PT (buf)), buffer, Qinvisible,
257 Qnil, Qnil))) 257 Qnil, Qnil)))
258 { 258 {
259 Bufpos last_visible = last_visible_position (BUF_PT (buf), buf); 259 Bufpos last_visible = last_visible_position (BUF_PT (buf), buf);
260 260
261 opoint = BUF_PT (buf); 261 opoint = BUF_PT (buf);
262 if (last_visible >= BUF_BEGV (buf)) 262 if (last_visible >= BUF_BEGV (buf))
263 BUF_SET_PT (buf, last_visible); 263 BUF_SET_PT (buf, last_visible);
264 else 264 else
265 error ("Visible portion of buffer not modifiable"); 265 error ("Visible portion of buffer not modifiable");
266 } 266 }
267 267
268 if (indent_tabs_mode) 268 if (indent_tabs_mode)
269 { 269 {