jed-users mailing list

[2003 Date Index] [2003 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: pop_spot(0)


Dave Kuhlman <dkuhlman@xxxxxxxxxxxxxxx> wrote:
>What I'd expect to be able to do is the following steps:
>
>  1. Set mark
>  2. Move cursor
>  3. Perform first operation, e.g. shift right
>  4. Exchange point and mark
>  5. Perform second operation on same region, e.g. shift right
>      again

You can call "push_mark" twice in the first step.  However, I would
use one of the narrow functions (narrow, or narrow_to_region):

  1.  push_mark ()
  2.  Move cursor to define a region
  3.  narrow_to_region ();
  4.  Operate on region, e.g.,
    
         bob ();  % Goto top of narrowed region
	 do 
	   {
	      insert ("    ");  % shift line to right
	   }
	 while (down (1));      % goto next line

	 % Do something else
	 bob ();
	 do 
	   {
	      do_something_else_to_line ();
	   }
	 while (down (1));      % goto next line
	 
	 % Replace all occurrences of foo in region with bar
	 bob ();
	 replace ("foo", "bar");
	 
  5.  widen_region ();

--John

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2003 date index] [2003 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]