- Subject: Enhancement to yankpop
- From: Dave Kuhlman <dkuhlman@xxxxxxxxxxxxxxx>
- Date: Thu, 21 Aug 2003 13:15:16 -0700
I recently found yp_yank_pop in lib/yankpop.sl along with the
documentation in doc/txt/yankpop.txt. Jed is so cool. I didn't
know that I could get access to the ring of pastebuffers. And,
now that I do, I can copy several things, then paste them in a
series of places without having to flip back and forth to the
place where I copied them. Slick.
But ...
I found it awkward sometimes that I could only cycle through the
ring of pastebuffers in one direction.
So, I added a function to yankpop.sl that cycles in the opposite
direction. OK, so all I really did was to copy yp_yank_pop and
make a couple of small edits.
Is there already a way to do this? Or, is there a way to do
something that makes this unnecessary? It does seem like an
obvious thing to want.
If a similar capability is not already there, I'd like to suggest
that this or something like it be added to Jed.
A patch to lib/yankpop.sl is below.
Dave
==============================================================
--- yankpop.sl 2002-10-19 23:55:30.000000000 -0700
+++ yankpop.new.sl 2003-08-19 14:44:58.000000000 -0700
@@ -99,6 +99,27 @@
yp_yank ();
}
+define yp_yank_repop ()
+{
+ if (strcmp (LAST_KBD_COMMAND, "%yank%"))
+ {
+ error ("The last command must be a yank one.");
+ }
+
+ Kill_Buffer_Yank_Number++;
+ if (Kill_Buffer_Yank_Number > Kill_Buffer_Max_Number)
+ {
+ Kill_Buffer_Yank_Number = 0;
+ }
+
+ % Delete the previous yank
+ push_mark ();
+ goto_user_mark (Kill_Buffer_User_Mark);
+ del_region ();
+
+ yp_yank ();
+}
+
define yp_kill_word ()
{
push_mark(); skip_word();
==============================================================
--
Dave Kuhlman
dkuhlman@xxxxxxxx
http://www.rexx.com/~dkuhlman
--------------------------
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]