jed-users mailing list

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

Re: [jed-users] _jed_before_key_hooks / _jed_after_key_hooks


Morten Bo Johansen <mbj@xxxxxxxxx> wrote:
> if I do
>
>   define fun ()
>  {
>  }
>   add_to_hook ("_jed_before_key_hooks", &fun)
>
> then every subsequent keystroke is pushed onto the stack. If I
> change it to "_jed_after_key_hooks", then nothing is pushed
> onto the stack.

See below -- your fun should take a single function argument.

>
> Is _jed_before_key_hooks intended to work this way, or is it a
> bug?

It works according to the documentation in the hooks.txt file:

_jed_before_key_hooks
---------------------

  These hooks are called just prior to the execution of the function
  bound to a key.  Hooks of this type are passed a single value
  representing the function to be executed, and return no value.  The
  value representing the key function may be either a string giving
  the name of the function or as a reference via a Ref_Type object.

      define before_key_hook (fun) {...}

_jed_after_key_hooks
---------------------

  Hooks of this type are called after the function associated with a
  key has been executed.  They are passed no value and should return
  no value.

I hope this helps.
Thanks,
--John
_______________________________________________
For list information, visit <http://jedsoft.org/jed/mailinglists.html>.


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