Changes between Version 3 and Version 4 of HemlockProgrammer/RepresentationOfText


Ignore:
Timestamp:
Jan 13, 2008, 7:15:42 PM (12 years ago)
Author:
gz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HemlockProgrammer/RepresentationOfText

    v3 v4  
    1212text primitives.
    1313
    14 linep line [Function]
     14`linep` line [Function]
    1515
    1616This function returns t if line is a line object, otherwise nil.
    1717
    18 line-string line [Function]
     18`line-string` line [Function]
    1919
    2020Given a line, this function returns as a simple string the characters
     
    2525that string.
    2626
    27 line-previous line [Function]
    28 
    29 line-next line [Function]
     27`line-previous` line [Function]
     28
     29`line-next` line [Function]
    3030
    3131Given a line, line-previous returns the previous line or nil if there
     
    3333line or nil.
    3434
    35 line-buffer line [Function]
     35`line-buffer` line [Function]
    3636
    3737This function returns the buffer which contains this line. Since a
     
    3939returns nil.
    4040
    41 line-length line [Function]
     41`line-length` line [Function]
    4242
    4343This function returns the number of characters in the line. This
    4444excludes the newline character at the end.
    4545
    46 line-character line index [Function]
     46`line-character` line index [Function]
    4747
    4848This function returns the character at position index within line. It
     
    5151returns a #\newline character.
    5252
    53 line-plist line [Function]
     53`line-plist` line [Function]
    5454
    5555This function returns the property-list for line. setf, getf, putf and
     
    5858contents.
    5959
    60 line-signature line [Function]
     60`line-signature` line [Function]
    6161
    6262This function returns an object that serves as a signature for a
     
    8282This section discusses the very basic operations involving marks, but
    8383a lot of Hemlock programming is built on altering some text at a mark.
    84 For more extended uses of marks see chapter 4.
     84For more extended uses of marks see [HemlockProgrammer/AlteringAndSearchingText Altering And Searching Text].
    8585
    8686=== 2.2.1. Kinds of Marks ===
     
    9696
    9797There are two different kinds of permanent marks which differ only in
    98 their behavior when text is insertedat the position of the mark; text
     98their behavior when text is inserted at the position of the mark; text
    9999is inserted to the left of a left-inserting mark and to the right of
    100100right-inserting mark.
     
    102102=== 2.2.2. Mark Functions ===
    103103
    104 markp mark [Function]
    105 
    106 This function returnstifmarkis amarkobject, otherwisenil.
    107 
    108 mark-line mark [Function]
    109 
    110 This function returns the line to whichmarkpoints.
    111 
    112 mark-charpos mark [Function]
    113 
    114 This function returns the character position of the character
    115 after mark. If mark's line has no next line, this returns the length of
    116 the line as usual; however, there is actually is no character after
    117 the mark.
    118 
    119 
    120 mark-kind mark [Function]
    121 
    122 This function returns one of :right-inserting, :left-inserting or
    123 :temporary depending on the mark's kind.  A corresponding setf form
     104`markp` mark [Function]
     105
     106This function returns t if mark is a mark object, otherwise nil.
     107
     108`mark-line` mark [Function]
     109
     110This function returns the line to which mark points.
     111
     112`mark-charpos` mark [Function]
     113
     114This function returns the character position ''in the line'' of the character
     115after mark, i.e. the number of characters before the mark in the mark's line.
     116
     117`mark-buffer` mark [Function]
     118
     119Returns the buffer containing this mark.
     120
     121`mark-absolute-position` mark [Function]
     122
     123This function returns the character position ''in the buffer'' of the character
     124after the mark, i.e. the number of characters before the mark in the mark's
     125buffer.
     126
     127`mark-kind` mark [Function]
     128
     129This function returns one of `:right-inserting`, `:left-inserting` or
     130`:temporary` depending on the mark's kind.  A corresponding setf form
    124131changes the mark's kind.
    125132
    126 previous-character mark [Function]
    127 
    128 next-character mark [Function]
     133`previous-character` mark [Function]
     134
     135`next-character` mark [Function]
    129136
    130137This function returns the character immediately before (after) the
     
    136143=== 2.2.3. Making Marks ===
    137144
    138 markline charpos &optional kind [Function]
     145`mark` line charpos &optional kind [Function]
    139146
    140147This function returns a mark object that points to the charpos'th
    141148character of the line. Kind is the kind of mark to create, one
    142 of :temporary, :left-inserting, or:right-inserting. The default is
     149of `:temporary`, `:left-inserting`, or `:right-inserting`. The default is
    143150:temporary.
    144151
    145 copy-mark mark &optional kind [Function]
     152`copy-mark` mark &optional kind [Function]
    146153
    147154This function returns a new mark pointing to the same position and of
    148155the same kind, or of kind kind if it is supplied.
    149156
    150 delete-mark mark [Function]
     157`delete-mark` mark [Function]
    151158
    152159This function deletes mark. Delete any permanent marks when you are
    153160finished using it.
    154161
    155 with-mark ({(mark pos [kind])}*) {form}* [Macro]
     162`with-mark` ({(mark pos [kind])}*) {form}* [Macro]
    156163
    157164This macro binds to each variable mark a mark of kind kind, which
    158 defaults to :temporary, pointing to the same position as the
     165defaults to `:temporary`, pointing to the same position as the
    159166markpos. On exit from the scope the mark is deleted.  The value of the
    160167last form is the value returned.
     
    167174sentences, paragraphs, Lisp forms, etc.
    168175
    169 move-to-position mark charpos &optional line [Function]
     176`move-to-position` mark charpos &optional line [Function]
    170177
    171178This function changes the mark to point to the given character
    172179position on the line line. Line defaults to mark's line.
    173180
    174 move-mark mark new-position [Function]
     181`move-to-absolute-position` mark position [Function]
     182
     183This function changes the mark to point to the given character
     184position in the buffer.
     185
     186
     187`move-mark` mark new-position [Function]
    175188
    176189This function moves mark to the same position as the
    177190mark new-position and returns it.
    178191
    179 line-startmark &optional line [Function]
    180 
    181 line-endmark &optional line [Function]
     192`line-start` mark &optional line [Function]
     193
     194`line-end` mark &optional line [Function]
    182195
    183196This function changes mark to point to the beginning or the end of
    184197line and returns it. Line defaults to mark's line.
    185198
    186 buffer-start mark &optionalbuffer [Function]
    187 
    188 buffer-end mark &optionalbuffer [Function]
     199`buffer-start` mark &optional buffer [Function]
     200
     201`buffer-end` mark &optional buffer [Function]
    189202
    190203These functions change mark to point to the beginning or end of
     
    193206from any buffer.
    194207
    195 mark-before mark [Function]
    196 
    197 mark-after mark [Function]
     208`mark-before` mark [Function]
     209
     210`mark-after` mark [Function]
    198211
    199212These functions change mark to point one character before or after the
     
    201214position, then they return nil and leave mark unmodified.
    202215
    203 character-offset mark n [Function]
     216`character-offset` mark n [Function]
    204217
    205218This function changes mark to point n characters after (n before if n
     
    208221unmodified.
    209222
    210 line-offset mark n &optional charpos [Function]
     223`line-offset` mark n &optional charpos [Function]
    211224
    212225This function changes mark to point n lines after (n before if n is
     
    230243=== 2.3.1. Region Functions ===
    231244
    232 region start end [Function]
     245`region` start end [Function]
    233246
    234247This function returns a region constructed from the marks start and
     
    236249for start to come after end.
    237250
    238 regionp region [Function]
     251`regionp` region [Function]
    239252
    240253This function returns t if region is a region object, otherwise nil.
    241254
    242 make-empty-region [Function]
     255`make-empty-region` [Function]
    243256
    244257This function returns a region with start and end marks pointing to
    245 the start of one empty line.  The start mark is a :right-inserting
    246 mark, and the end is a :left-inserting mark.
    247 
    248 copy-region region [Function]
     258the start of one empty line.  The start mark is a `:right-inserting`
     259mark, and the end is a `:left-inserting` mark.
     260
     261`copy-region` region [Function]
    249262
    250263This function returns a region containing a copy of the text in the
    251264specified region. The resulting region is completely disjoint
    252 from region with respect to data references---marks, lines, text, etc.
    253 
    254 region-to-string region [Function]
    255 
    256 string-to-region string [Function]
     265from region with respect to data references --- marks, lines, text, etc.
     266
     267`region-to-string` region [Function]
     268
     269`string-to-region` string [Function]
    257270
    258271These functions coerce regions to Lisp strings and vice versa.  Within
    259272the string, lines are delimited by newline characters.
    260273
    261 line-to-region line [Function]
     274`line-to-region` line [Function]
    262275
    263276This function returns a region containing all the characters on
    264 line. The first mark is :right-inserting and the last is
    265 :left-inserting.
    266 
    267 region-start region [Function]
    268 
    269 region-end region [Function]
     277line. The first mark is `:right-inserting` and the last is
     278`:left-inserting`.
     279
     280`region-start` region [Function]
     281
     282`region-end` region [Function]
    270283
    271284This function returns the start or end mark of region.
    272285
    273 region-bounds region [Function]
     286`region-bounds` region [Function]
    274287
    275288This function returns as multiple-values the starting and ending marks
    276289of region.
    277290
    278 set-region-bounds region start end [Function]
     291`set-region-bounds` region start end [Function]
    279292
    280293This function sets the start and end of region to start and end. It is
    281294an error for start to be after or in a different buffer from end.
    282295
    283 count-lines region [Function]
     296`count-lines` region [Function]
    284297
    285298This function returns the number of lines in the region, first and
     
    289302added at the beginning, it would be two lines.
    290303
    291 count-characters region [Function]
     304`count-characters` region [Function]
    292305
    293306This function returns the number of characters in a given region. This
    294307counts line breaks as one character.
    295308
    296 check-region-query-size region [Function]
    297 
    298 Region Query Size (initial value 30) [Hemlock Variable]
    299 
    300 check-region-query-size counts the lines in region, and if their
    301 number exceeds the Region Query Size threshold, it prompts the user
    302 for confirmation.  This should be used in commands that perform
    303 destructive operations and are not undoable.  If the user responds
    304 negatively, then this signals an editor-error, aborting whatever
    305 command was in progress.
     309
    306310
    307311[HemlockProgrammer Back to Table of Contents]