LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Need to call function in xemacs before or at keypress (http://www.linuxquestions.org/questions/linux-software-2/need-to-call-function-in-xemacs-before-or-at-keypress-910291/)

didiw 10-26-2011 10:38 AM

Need to call function in xemacs before or at keypress
 
Hello,

I am in need to do some adjustments to a xemacs buffer according to the cursor position, but I cannot find the hook to get my function called when I need it, which is before or at the time of keypress.
I looked through the availabe functions, but did not find anything.

Thanks in advance.

Dieter

ntubski 10-26-2011 11:38 AM

Quote:

I am in need to do some adjustments to a xemacs buffer according to the cursor position,
Can you give more detail on these adjustments?

I don't think there is a hook for every keypress, but maybe Change Hooks is what you are looking for?

didiw 10-29-2011 07:08 AM

Re: Need to call function in xemacs before or at keypress
 
Hello ntubski,

I haven't tried your proposal, but what I actually want to do is to switch input method based on where I am typing. I get it to switch the method on calling my function, but I have no idea, where to hook it in.

Anything else now but your idea?

Thanks in advance

Dieter

ntubski 10-29-2011 11:43 AM

Hmm, GNU Emacs has the point-entered and point-left properties, which I think would be exactly what you need here, but XEmacs doesn't support those properties. I guess you could use post-command-hook, although that would result in some extra calls to your function.


All times are GMT -5. The time now is 09:00 AM.