comparison etc/NEWS @ 26300:25356c16306f

Expanded description of `field' property from Miles Bader.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 02 Nov 1999 12:09:34 +0000
parents 81cd0c225dd9
children 13a14fa14cf2
comparison
equal deleted inserted replaced
26299:94438ac8953f 26300:25356c16306f
1271 1271
1272 There is now code to support an abstraction called `fields' in emacs 1272 There is now code to support an abstraction called `fields' in emacs
1273 buffers. A field is a contiguous region of text with the same `field' 1273 buffers. A field is a contiguous region of text with the same `field'
1274 text-property. 1274 text-property.
1275 1275
1276 Certain functions, such as forward-word, forward-sentence, 1276 Many emacs functions, such as forward-word, forward-sentence,
1277 forward-paragraph, beginning-of-line, etc., stop moving when they come 1277 forward-paragraph, beginning-of-line, etc., stop moving when they come
1278 to the boundary between fields (beginning-of-line and end-of-line will 1278 to the boundary between fields; beginning-of-line and end-of-line will
1279 not let the point move past the field boundary, but other movement 1279 not let the point move past the field boundary, but other movement
1280 commands continue into the next field if repeated). 1280 commands continue into the next field if repeated.
1281
1282 The new function constrain-to-field may be used to achieve similar
1283 behavior; other new field functions include field-beginning, field-end,
1284 erase-field, and field-string.
1285 1281
1286 Now that the minibuffer prompt is inserted into the minibuffer, it is in 1282 Now that the minibuffer prompt is inserted into the minibuffer, it is in
1287 a separate field from the user-input part of the buffer, so that many 1283 a separate field from the user-input part of the buffer, so that common
1288 editing commands treat the user's text separately from the prompt. 1284 editing commands treat the user's text separately from the prompt.
1285
1286 The following functions are defined for operating on fields:
1287
1288 - Function: constrain-to-field NEW-POS OLD-POS &optional ESCAPE-FROM-EDGE ONLY-IN-LINE
1289
1290 Return the position closest to NEW-POS that is in the same field as OLD-POS.
1291 A field is a region of text with the same `field' property.
1292 If NEW-POS is nil, then the current point is used instead, and set to the
1293 constrained position if that is is different.
1294
1295 If OLD-POS is at the boundary of two fields, then the allowable
1296 positions for NEW-POS depends on the value of the optional argument
1297 ESCAPE-FROM-EDGE: If ESCAPE-FROM-EDGE is nil, then NEW-POS is
1298 constrained to the field that has the same `field' text-property
1299 as any new characters inserted at OLD-POS, whereas if ESCAPE-FROM-EDGE
1300 is non-nil, NEW-POS is constrained to the union of the two adjacent
1301 fields.
1302
1303 If the optional argument ONLY-IN-LINE is non-nil and constraining
1304 NEW-POS would move it to a different line, NEW-POS is returned
1305 unconstrained. This useful for commands that move by line, like
1306 C-n or C-a, which should generally respect field boundaries
1307 only in the case where they can still move to the right line.
1308
1309 - Function: erase-field &optional POS
1310
1311 Erases the field surrounding POS.
1312 A field is a region of text with the same `field' property.
1313 If POS is nil, the position of the current buffer's point is used.
1314
1315 - Function: field-beginning &optional POS ESCAPE-FROM-EDGE
1316
1317 Return the beginning of the field surrounding POS.
1318 A field is a region of text with the same `field' property.
1319 If POS is nil, the position of the current buffer's point is used.
1320 If ESCAPE-FROM-EDGE is non-nil and POS is already at beginning of an
1321 field, then the beginning of the *previous* field is returned.
1322
1323 - Function: field-end &optional POS ESCAPE-FROM-EDGE
1324
1325 Return the end of the field surrounding POS.
1326 A field is a region of text with the same `field' property.
1327 If POS is nil, the position of the current buffer's point is used.
1328 If ESCAPE-FROM-EDGE is non-nil and POS is already at end of a field,
1329 then the end of the *following* field is returned.
1330
1331 - Function: field-string &optional POS
1332
1333 Return the contents of the field surrounding POS as a string.
1334 A field is a region of text with the same `field' property.
1335 If POS is nil, the position of the current buffer's point is used.
1336
1337 - Function: field-string-no-properties &optional POS
1338
1339 Return the contents of the field around POS, without text-properties.
1340 A field is a region of text with the same `field' property.
1341 If POS is nil, the position of the current buffer's point is used.
1289 1342
1290 +++ 1343 +++
1291 ** Image support. 1344 ** Image support.
1292 1345
1293 Emacs can now display images. Images are inserted into text by giving 1346 Emacs can now display images. Images are inserted into text by giving