Subject: Re: bug#14565: 24.3.50; Error with byte-compiled function using backward-char

From: Stephen Berman <[email-masked]>
Date: Sat, 08 Jun 2013 15:20:20 +0200

On Fri, 07 Jun 2013 11:40:23 +0200 Stephen Berman <[email-masked]> wrote:

> On Thu, 06 Jun 2013 22:28:22 -0400 Glenn Morris <[email-masked]> wrote:
>
>> I suppose there could still be cases like
>>
>> (setq foo nil)
>> (backward-char foo)
>
> Yes, in fact, after seeing your fix, I realized that I had
> oversimplified my test case; the code which revealed the bug actually
> looks more like this (still simplified, but enough to raise the error
> with your fix):
>
> (defun my-test-3 ()
>   (let (x)
>     (backward-char (when x 2))))
>
>> I wonder if these bytecomp handlers are worth keeping?
>
> I don't see how to tweak byte-compile-backward-char to account for the
> above cases, but I don't understand the bytecomp code well.  However, I
> did test adding a case Bbackward_char to exec_byte_code parallel to
> Bforward_char, and that handles the above cases as expected.  So that
> may be the easiest fix.

Should this bug be reopened, or would you prefer me to submit a new
report for the unresolved cases?

Steve Berman