narrow-buffer - Hide buffer lines
n narrow-buffer
The effect of narrow-buffer depends on the argument given, defined as follows:-
1
2
3
4
When a narrow is created the buffer mode narrow(2m) is automatically set, when the last is removed this mode is deleted.
For example, if the buffer contains the following text:
1 Richmond 2 Lafayette 3 Bloomington 4 Indianapolis 5 Gary 6
If the mark is on line 2 and the current point is on line 4, executing:-
4 narrow-buffer
Creates one narrow, narrowing out line 2 and 3. Line 4 becomes the narrow anchor line, when the narrow is removed lines 2 and 3 will be inserted before line 4. The buffer will become:-
1 Richmond 4 Indianapolis 5 Gary
If instead the following was executed:-
3 narrow-buffer
Two narrows are created, the first narrowing out line 4 and 5 (line 6, the last line, being the anchor line) the second narrowing out line 1 (line 2 being the anchor line). The buffer will become:-
2 Lafayette 3 Bloomington 6
Executing narrow-buffer with an argument of 2 will only work on the anchor lines, namely 4 in the first example and 2 and 6 in the second.
Alpha mark set by set-alpha-mark(2) in text which is subsequently narrowed out will automatically remove the narrow if the user returns to the mark using goto-alpha-mark(2).
get-next-line(2) operates on the unnarrowed buffer and will remove any narrows hiding the 'next' line.
c-hash-eval(3) macro defined in cmacros.emf uses narrow-buffer to hide regions of source code which has been #defined out, improving readability.
vm(3) defined in vm.emf uses narrow-buffer with appropriate arguments to append-buffer(2) and write-buffer(2) to write out only parts of the current buffer.
(c) Copyright JASSPA 1999
Last Modified: 1999/01/13
Generated On: 1999/12/01