comparison etc/NEWS @ 30776:ec759fa10ad9

Update `fields' entry.
author Miles Bader <miles@gnu.org>
date Mon, 14 Aug 2000 09:16:49 +0000
parents 408aec5f514c
children 59479ef35bf2
comparison
equal deleted inserted replaced
30775:33d2bde9a99a 30776:ec759fa10ad9
2620 2620
2621 ** New `field' abstraction in buffers. 2621 ** New `field' abstraction in buffers.
2622 2622
2623 There is now code to support an abstraction called `fields' in emacs 2623 There is now code to support an abstraction called `fields' in emacs
2624 buffers. A field is a contiguous region of text with the same `field' 2624 buffers. A field is a contiguous region of text with the same `field'
2625 text-property. 2625 property (which can be a text property or an overlay).
2626 2626
2627 Many emacs functions, such as forward-word, forward-sentence, 2627 Many emacs functions, such as forward-word, forward-sentence,
2628 forward-paragraph, beginning-of-line, etc., stop moving when they come 2628 forward-paragraph, beginning-of-line, etc., stop moving when they come
2629 to the boundary between fields; beginning-of-line and end-of-line will 2629 to the boundary between fields; beginning-of-line and end-of-line will
2630 not let the point move past the field boundary, but other movement 2630 not let the point move past the field boundary, but other movement
2637 a separate field from the user-input part of the buffer, so that common 2637 a separate field from the user-input part of the buffer, so that common
2638 editing commands treat the user's text separately from the prompt. 2638 editing commands treat the user's text separately from the prompt.
2639 2639
2640 The following functions are defined for operating on fields: 2640 The following functions are defined for operating on fields:
2641 2641
2642 - Function: constrain-to-field NEW-POS OLD-POS &optional ESCAPE-FROM-EDGE ONLY-IN-LINE 2642 - Function: constrain-to-field NEW-POS OLD-POS &optional ESCAPE-FROM-EDGE ONLY-IN-LINE INHIBIT-CAPTURE-PROPERTY
2643 2643
2644 Return the position closest to NEW-POS that is in the same field as OLD-POS. 2644 Return the position closest to NEW-POS that is in the same field as OLD-POS.
2645
2645 A field is a region of text with the same `field' property. 2646 A field is a region of text with the same `field' property.
2646 If NEW-POS is nil, then the current point is used instead, and set to the 2647 If NEW-POS is nil, then the current point is used instead, and set to the
2647 constrained position if that is is different. 2648 constrained position if that is is different.
2648 2649
2649 If OLD-POS is at the boundary of two fields, then the allowable 2650 If OLD-POS is at the boundary of two fields, then the allowable
2650 positions for NEW-POS depends on the value of the optional argument 2651 positions for NEW-POS depends on the value of the optional argument
2651 ESCAPE-FROM-EDGE: If ESCAPE-FROM-EDGE is nil, then NEW-POS is 2652 ESCAPE-FROM-EDGE: If ESCAPE-FROM-EDGE is nil, then NEW-POS is
2652 constrained to the field that has the same `field' text-property 2653 constrained to the field that has the same `field' char-property
2653 as any new characters inserted at OLD-POS, whereas if ESCAPE-FROM-EDGE 2654 as any new characters inserted at OLD-POS, whereas if ESCAPE-FROM-EDGE
2654 is non-nil, NEW-POS is constrained to the union of the two adjacent 2655 is non-nil, NEW-POS is constrained to the union of the two adjacent
2655 fields. 2656 fields. Additionally, if two fields are separated by another field with
2657 the special value `boundary', then any point within this special field is
2658 also considered to be `on the boundary'.
2656 2659
2657 If the optional argument ONLY-IN-LINE is non-nil and constraining 2660 If the optional argument ONLY-IN-LINE is non-nil and constraining
2658 NEW-POS would move it to a different line, NEW-POS is returned 2661 NEW-POS would move it to a different line, NEW-POS is returned
2659 unconstrained. This useful for commands that move by line, like 2662 unconstrained. This useful for commands that move by line, like
2660 C-n or C-a, which should generally respect field boundaries 2663 C-n or C-a, which should generally respect field boundaries
2661 only in the case where they can still move to the right line. 2664 only in the case where they can still move to the right line.
2662 2665
2663 - Function: erase-field &optional POS 2666 If the optional argument INHIBIT-CAPTURE-PROPERTY is non-nil, and OLD-POS has
2664 2667 a non-nil property of that name, then any field boundaries are ignored.
2665 Erases the field surrounding POS. 2668
2669 Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil.
2670
2671 - Function: delete-field &optional POS
2672
2673 Delete the field surrounding POS.
2666 A field is a region of text with the same `field' property. 2674 A field is a region of text with the same `field' property.
2667 If POS is nil, the position of the current buffer's point is used. 2675 If POS is nil, the value of point is used for POS.
2668 2676
2669 - Function: field-beginning &optional POS ESCAPE-FROM-EDGE 2677 - Function: field-beginning &optional POS ESCAPE-FROM-EDGE
2670 2678
2671 Return the beginning of the field surrounding POS. 2679 Return the beginning of the field surrounding POS.
2672 A field is a region of text with the same `field' property. 2680 A field is a region of text with the same `field' property.
2673 If POS is nil, the position of the current buffer's point is used. 2681 If POS is nil, the value of point is used for POS.
2674 If ESCAPE-FROM-EDGE is non-nil and POS is already at beginning of an 2682 If ESCAPE-FROM-EDGE is non-nil and POS is at the beginning of its
2675 field, then the beginning of the *previous* field is returned. 2683 field, then the beginning of the *previous* field is returned.
2676 2684
2677 - Function: field-end &optional POS ESCAPE-FROM-EDGE 2685 - Function: field-end &optional POS ESCAPE-FROM-EDGE
2678 2686
2679 Return the end of the field surrounding POS. 2687 Return the end of the field surrounding POS.
2680 A field is a region of text with the same `field' property. 2688 A field is a region of text with the same `field' property.
2681 If POS is nil, the position of the current buffer's point is used. 2689 If POS is nil, the value of point is used for POS.
2682 If ESCAPE-FROM-EDGE is non-nil and POS is already at end of a field, 2690 If ESCAPE-FROM-EDGE is non-nil and POS is at the end of its field,
2683 then the end of the *following* field is returned. 2691 then the end of the *following* field is returned.
2684 2692
2685 - Function: field-string &optional POS 2693 - Function: field-string &optional POS
2686 2694
2687 Return the contents of the field surrounding POS as a string. 2695 Return the contents of the field surrounding POS as a string.
2688 A field is a region of text with the same `field' property. 2696 A field is a region of text with the same `field' property.
2689 If POS is nil, the position of the current buffer's point is used. 2697 If POS is nil, the value of point is used for POS.
2690 2698
2691 - Function: field-string-no-properties &optional POS 2699 - Function: field-string-no-properties &optional POS
2692 2700
2693 Return the contents of the field around POS, without text-properties. 2701 Return the contents of the field around POS, without text-properties.
2694 A field is a region of text with the same `field' property. 2702 A field is a region of text with the same `field' property.
2695 If POS is nil, the position of the current buffer's point is used. 2703 If POS is nil, the value of point is used for POS.
2696 2704
2697 +++ 2705 +++
2698 ** Image support. 2706 ** Image support.
2699 2707
2700 Emacs can now display images. Images are inserted into text by giving 2708 Emacs can now display images. Images are inserted into text by giving