Subject: bug#8108: 24.0.50; debugging pre-write-conversion in define-coding-system

From: [email-masked]
Date: Sat, 10 Dec 2016 10:12:01 -0500

Werner LEMBERG <[email-masked]> writes:

> ----------------------------------------------------------------------
>
>
> I'm updating my cjk-enc.el package (part of the CJK bundle for LaTeX)
> to replace make-coding-system with define-coding-system.  However, I
> can't debug it.
>
> In previous Emacs versions, I've instrumented the function used for
> the pre-write-conversion hook, and the debugger correctly stops there.
> However, with a recent Emacs (bzr version 103411 from today) this no
> longer works.  Is this a bug?  Am I missing something?

Not sure which version this corresponds to, but in [1]
encode_coding_object started using safe_call instead of a plain call to
run the pre-write-conversion function.  safe_call intentionally disables
the debugger while running the function:

      /* Use Qt to ensure debugger does not run,
         so there is no possibility of wanting to redisplay.  */
      val = internal_condition_case_n (Ffuncall, nargs, args, Qt,
                                       safe_eval_handler);

[1]: Tue Mar 29 00:34:38 2005
http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=d4850d674381d9493c94d30f8944a765e79537eb
(decode_coding_object): Use safe_call1 instead of call1.
(encode_coding_object): Use safe_call instead of call2.