bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14565: 24.3.50; Error with byte-compiled function using backward-cha


From: Stephen Berman
Subject: bug#14565: 24.3.50; Error with byte-compiled function using backward-char
Date: Fri, 07 Jun 2013 11:40:23 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

On Thu, 06 Jun 2013 22:28:22 -0400 Glenn Morris <rgm@gnu.org> 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.

Steve Berman





reply via email to

[Prev in Thread] Current Thread [Next in Thread]