jed-users mailing list

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

Re: after_key_hook not run by do_key()


=?UTF-8?Q?J=C3=B6rg?= Sommer <joerg@xxxxxxxxxxxx> wrote:
>why is the before_key_hook but not the after_key_hook run by
>keymap.c:do_key()? I would propose the following patch for register.sl,

The before/after key hooks are not supported in the minibuffer.  Such
support would mean that the before/after key hooks nest, which I
perceive as being problematic as that would vastly complicate the
hook-specific code.  For example, code such as yours which remove the
hook would have to be modified to track the nesting state, and I
anticipate other complications as well.

With that said, what is the patch supposed to do?  It looks like it
causes the get_register_name function to automatically return once the
user has typed exactly one match for a register name.  I am not
convinced that is a good idea since it does not give the user the
opportunity to back-up to correct a register name.

Finally, you have:

>+        variable match = array_map(Integer_Type,
>+                                   &strncmp(), completion, line, strlen(line));
>+        match = match != 0;
>+        if (sum(match) == 1)
>+        {

Did you mean to use

   match = (match == 0);

?  If so, I think that it would be better to use

   match = array_map (...);
   if (1 == length (where (not match)))
     {

Thanks,
--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>.


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