* bug#2681: 23.0.91; incorrect line shown by lisp compiler
@ 2009-03-16 4:16 Kenichi Handa
2009-03-16 10:03 ` Juanma Barranquero
0 siblings, 1 reply; 2+ messages in thread
From: Kenichi Handa @ 2009-03-16 4:16 UTC (permalink / raw)
To: emacs-pretest-bug
When I byte compile this file:
---~/temp.el------------------------------------------------
(defun test (vec)
(cond ((= (length vec) 0)
(message "LEN=0"))
((= (length vec) 1)
(message "LEN=1"))
((= (length vec 2))
(message "LEN=2"))))
------------------------------------------------------------
The *Compile-Log* buffer shows these warnings:
Compiling file /home/handa/temp.el at Mon Mar 16 13:12:33 2009
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.
---
Kenichi Handa
handa@m17n.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#2681: 23.0.91; incorrect line shown by lisp compiler
2009-03-16 4:16 bug#2681: 23.0.91; incorrect line shown by lisp compiler Kenichi Handa
@ 2009-03-16 10:03 ` Juanma Barranquero
0 siblings, 0 replies; 2+ messages in thread
From: Juanma Barranquero @ 2009-03-16 10:03 UTC (permalink / raw)
To: Kenichi Handa; +Cc: 2681
On Mon, Mar 16, 2009 at 05:16, Kenichi Handa <handa@m17n.org> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-16 10:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-16 4:16 bug#2681: 23.0.91; incorrect line shown by lisp compiler Kenichi Handa
2009-03-16 10:03 ` Juanma Barranquero
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.