The first part of this section gives details of commands associated with marking, while the second provides details of a few commands whose area is limited to a region. Other region specific commands are available but are dealt with in more appropriate sections of this manual. For example, Write Region is dealt with under the File handling as it involves writing a region to a file.
Details of marks are kept in a mark ring so that previously defined marks can be accessed. The mark ring works like a stack, in that marks are pushed onto the ring and can only be popped off on a "last in first out" basis. Each buffer has its own mark ring.
Note that marks may also be set by using the mouse--see Buffers, windows and the mouse--but also note that a region must be defined
either
by using the mouse
or
by using editor key sequences, as the region may become unset if a combination of the two is used. For example, using Ctrl+Space
to set a mark and then using the mouse to go to the start of the required region unsets the mark.
Note: the editor also records locations of the current point which can be revisited by the commands listed in Locations. Unlike marks, these locations do not interact with the region.
Arguments: None
Key sequence: Ctrl+Space
or Middle Mouse Button
With no prefix argument, pushes the current point onto the mark ring, effectively setting the mark to the current point, and activates the region.
With a prefix argument equal to the value of the prefix-argument-default, Pop and Goto Mark is invoked.
With a prefix argument equal to the square of the prefix-argument-default
(achieved by typing Ctrl+U Ctrl+U
before invoking Set Mark)
, Pop Mark is invoked.
Arguments: None
Key sequence: None
Moves the current point to the mark without saving the current point on the mark ring (in contrast with Exchange Point and Mark). After the current point has been moved to the mark, the mark ring is rotated. The current region is de-activated.
Arguments: None
Key sequence: Meta+Ctrl+Space
Rotates the mark ring so that the previous mark becomes the current mark. The point is not moved but the current region is de-activated.
Arguments: None
Key sequence: Ctrl+X Ctrl+X
editor:exchange-point-and-mark-command p &optional buffer
Sets the mark to the current point and moves the current point to the previous mark. This command can therefore be used to examine the extent of the current region.
The argument buffer is the buffer in which to exchange the point and mark. The default value is the current buffer.
Arguments:
number
Key sequence: Meta+@
Marks the word following the current point. A prefix argument, if supplied, specifies the number of words marked.
Arguments: None
Key sequence: None
Puts the mark at the end of the current sentence and the current point at the start of the current sentence. The sentence thereby becomes the current region. If the current point is initially located between two sentences then the mark and current point are placed around the next sentence.
Arguments: None
Key sequence: Meta+H
Puts the mark at the end of the current paragraph and the current point at the start of the current paragraph. The paragraph thereby becomes the current region. If the current point is initially located between two paragraphs, then the mark and current point are placed around the next paragraph.
Arguments: None
Key sequence: Ctrl+X H
Sets the mark at the end of the current buffer and the current point at the beginning of the current buffer. The current region is thereby set as the whole of the buffer.
A non-nil prefix argument causes the mark to be set as the start of the buffer and the current point at the end.
Records the starting location (see Locations).
Arguments: None
Key sequence: None
Displays a count of the total number of words in the region between the current point and the mark.
Arguments: None
Key sequence: None
Displays a count of the total number of lines in the region between the current point and the mark.
If the region between the current point and the mark contains more lines than the value of this editor variable, then any destructive operation on the region prompts the user for confirmation before being executed.
Arguments: None
Key sequence: None
Prints the current region, using capi:print-text
. See the
CAPI User Guide and Reference Manual
for details of this function.
LispWorks Editor User Guide (Macintosh version) - 17 Aug 2017