On Sunday, October 7, 2012 6:23:32 AM UTC+8, Z wrote:
> Hi all,
> I use pdb to debug Python programs. But pdb is lack of command
> like "u 3"(means up 3 frames). So I'd like to translate "u 3" to
> "u;;u;;u" in comint before it is send to external debugger.
> I have tried to add hook to comint-input-filter-functions, but it seems only receive the input and don't return translated command
> to commit. Any suggestion to do that?
> Thank you very much,
> Z
I found the solution. Write a wrapper(e.g. pdb-sender) for comint-simple-send and (setq comint-input-sender 'pdb-sender) in pdb-mode-hook.