aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann1999-11-02 12:09:34 +0000
committerGerd Moellmann1999-11-02 12:09:34 +0000
commit9a9dfda89626c95ef44346f5516ada32cd42abba (patch)
tree03abf162c42665a01802ab862bb96b6e2f5e804f
parentd21bd3fbdb8a0db127ff5732b8b934db74212e07 (diff)
downloademacs-9a9dfda89626c95ef44346f5516ada32cd42abba.tar.gz
emacs-9a9dfda89626c95ef44346f5516ada32cd42abba.zip
Expanded description of `field' property from Miles Bader.
-rw-r--r--etc/NEWS69
1 files changed, 61 insertions, 8 deletions
diff --git a/etc/NEWS b/etc/NEWS
index cea0444e1c8..b6694344c17 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1273,20 +1273,73 @@ There is now code to support an abstraction called `fields' in emacs
1273buffers. A field is a contiguous region of text with the same `field' 1273buffers. A field is a contiguous region of text with the same `field'
1274text-property. 1274text-property.
1275 1275
1276Certain functions, such as forward-word, forward-sentence, 1276Many emacs functions, such as forward-word, forward-sentence,
1277forward-paragraph, beginning-of-line, etc., stop moving when they come 1277forward-paragraph, beginning-of-line, etc., stop moving when they come
1278to the boundary between fields (beginning-of-line and end-of-line will 1278to the boundary between fields; beginning-of-line and end-of-line will
1279not let the point move past the field boundary, but other movement 1279not let the point move past the field boundary, but other movement
1280commands continue into the next field if repeated). 1280commands continue into the next field if repeated.
1281
1282The new function constrain-to-field may be used to achieve similar
1283behavior; other new field functions include field-beginning, field-end,
1284erase-field, and field-string.
1285 1281
1286Now that the minibuffer prompt is inserted into the minibuffer, it is in 1282Now that the minibuffer prompt is inserted into the minibuffer, it is in
1287a separate field from the user-input part of the buffer, so that many 1283a separate field from the user-input part of the buffer, so that common
1288editing commands treat the user's text separately from the prompt. 1284editing commands treat the user's text separately from the prompt.
1289 1285
1286The 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
1290Return the position closest to NEW-POS that is in the same field as OLD-POS.
1291A field is a region of text with the same `field' property.
1292If NEW-POS is nil, then the current point is used instead, and set to the
1293constrained position if that is is different.
1294
1295If OLD-POS is at the boundary of two fields, then the allowable
1296positions for NEW-POS depends on the value of the optional argument
1297ESCAPE-FROM-EDGE: If ESCAPE-FROM-EDGE is nil, then NEW-POS is
1298constrained to the field that has the same `field' text-property
1299as any new characters inserted at OLD-POS, whereas if ESCAPE-FROM-EDGE
1300is non-nil, NEW-POS is constrained to the union of the two adjacent
1301fields.
1302
1303If the optional argument ONLY-IN-LINE is non-nil and constraining
1304NEW-POS would move it to a different line, NEW-POS is returned
1305unconstrained. This useful for commands that move by line, like
1306C-n or C-a, which should generally respect field boundaries
1307only in the case where they can still move to the right line.
1308
1309- Function: erase-field &optional POS
1310
1311Erases the field surrounding POS.
1312A field is a region of text with the same `field' property.
1313If POS is nil, the position of the current buffer's point is used.
1314
1315- Function: field-beginning &optional POS ESCAPE-FROM-EDGE
1316
1317Return the beginning of the field surrounding POS.
1318A field is a region of text with the same `field' property.
1319If POS is nil, the position of the current buffer's point is used.
1320If ESCAPE-FROM-EDGE is non-nil and POS is already at beginning of an
1321field, then the beginning of the *previous* field is returned.
1322
1323- Function: field-end &optional POS ESCAPE-FROM-EDGE
1324
1325Return the end of the field surrounding POS.
1326A field is a region of text with the same `field' property.
1327If POS is nil, the position of the current buffer's point is used.
1328If ESCAPE-FROM-EDGE is non-nil and POS is already at end of a field,
1329then the end of the *following* field is returned.
1330
1331- Function: field-string &optional POS
1332
1333Return the contents of the field surrounding POS as a string.
1334A field is a region of text with the same `field' property.
1335If POS is nil, the position of the current buffer's point is used.
1336
1337- Function: field-string-no-properties &optional POS
1338
1339Return the contents of the field around POS, without text-properties.
1340A field is a region of text with the same `field' property.
1341If POS is nil, the position of the current buffer's point is used.
1342
1290+++ 1343+++
1291** Image support. 1344** Image support.
1292 1345