Subject: Re: bug#2681: 23.0.91; incorrect line shown by lisp compiler

From: Juanma Barranquero <[email-masked]>
Date: Mon, 16 Mar 2009 11:03:54 +0100

On Mon, Mar 16, 2009 at 05:16, Kenichi Handa <[email-masked]> wrote:

> In test:
> temp.el:4:11:Warning: `=' called with 1 arg, but requires 2
> temp.el:4:14:Warning: `length' called with 2 args, but requires 1
>
> But the bug is on 6th line, not the 4th line.

In a simpler test:

 (defun test (v)
   (or (= (length v 0))
       (= (length v) 1)))

produces

 test.el:2:8:Warning: `=' called with 1 arg, but requires 2
 test.el:3:11:Warning: `length' called with 2 args, but requires 1

but after changing the second `length'

 (defun test (v)
   (or (= (length v 0))
       (= (safe-length v) 1)))

the error output is correct:

 test.el:2:8:Warning: `=' called with 1 arg, but requires 2
 test.el:2:11:Warning: `length' called with 2 args, but requires 1

   Juanma