[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [h-e-w] key-binding: C-s and ESC
From: |
David Vanderschel |
Subject: |
Re: [h-e-w] key-binding: C-s and ESC |
Date: |
08 Nov 2002 17:17:03 -0600 |
I had written:
>> Interestingly, I have defined C-f in my own
>> isearch-mode-map; but, in my case, it is to add a
>> single character after point to the search string
>> (analogous to C-w, but less greedy). Even more useful
>> is my C-b which removes a single character (because
>> C-w is sometimes _too_ greedy).
On Friday, November 08, "Nascif Abousalh-Neto" <address@hidden> wrote:
>Your extensions (C-b, C-f) to the isearch mode map
>seem to be quite useful, would you mind posting them?
Yes, actually; I would mind. I did it by hacking the
isearch-yank function in an older version of
isearch.el (from the version 19 I was running under
OS/2 five years ago). I introduced isearch-yank-char
and isearch-unyank-char using the hacked isearch-yank
with two new definitions for the "chunk" argument.
The current version of isearch.el does not even seem
to use the old isearch-yank helper function I hacked.
Even though my isearch-yank-char and
isearch-unyank-char do still work correctly for me, I
do not think it appropriate to post such code.
I am also not very proud of how I did it. It was
simple to make it push the stack for both yank-char
and unyank-char, but that does not really make much
sense. OTOH, I did not understand well enough how the
code worked in its larger context to modify it in a
more reasonable fashion (nor was I willing to spend
more time trying to figure it out).
If there is someone more familiar with the guts of
isearch who would like to reimplement this more nearly
correctly, I would be happy to share privately the
crude thing I have now. It works in 20.7.3, but I
cannot guarantee it for 21. (When I moved over from
OS/2 to Windows 98 about four years ago, I forgot to
byte compile it - and, believe it or not, the .elc
from OS/2 worked correctly with ntemacs! I believe
that the changes between 19 and 20 which affected .elc
format had been folded into the last '19' version
Eberhard Mattes made for OS/2.)
I do think this is useful additional function for
emacs. I use it frequently myself.
Regards,
David V.
- [h-e-w] key-binding: C-s and ESC, Daniel Hegyi, 2002/11/08
- Re: [h-e-w] key-binding: C-s and ESC, David Vanderschel, 2002/11/08
- RE: [h-e-w] key-binding: C-s and ESC, Nascif Abousalh-Neto, 2002/11/08
- Re: [h-e-w] key-binding: C-s and ESC, Daniel Hegyi, 2002/11/08
- RE: [h-e-w] key-binding: C-s and ESC, Jonathan Epstein, 2002/11/08
- Re: [h-e-w] key-binding: C-s and ESC, Daniel Hegyi, 2002/11/08
- Re: [h-e-w] key-binding: C-s and ESC,
David Vanderschel <=