emacs-devel
[Top][All Lists]
Advanced

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

Re: elint cannot handle dolist any more?


From: Stefan Monnier
Subject: Re: elint cannot handle dolist any more?
Date: Tue, 17 Jul 2012 08:31:09 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

> I've noticed that with the current trunk, elint-defun will fail for any
> function that contains the "dolist" macro, with an error message:
> "Wrong type argument: listp, 385"

I installed the patch below which should fix the problem.
BTW, while you're here: could you tell me what elint is for?
AFAICT, the byte compiler already performs the same kind of checks, so
could you give me some idea of which differences make it worthwhile to
use elint?


        Stefan


=== modified file 'lisp/emacs-lisp/elint.el'
--- lisp/emacs-lisp/elint.el    2012-07-11 23:13:41 +0000
+++ lisp/emacs-lisp/elint.el    2012-07-17 12:26:43 +0000
@@ -713,14 +713,8 @@
 (defun elint-find-args-in-code (code)
   "Extract the arguments from CODE.
 CODE can be a lambda expression, a macro, or byte-compiled code."
-  (cond
-   ((byte-code-function-p code)
-    (aref code 0))
-   ((and (listp code) (eq (car code) 'lambda))
-    (car (cdr code)))
-   ((and (listp code) (eq (car code) 'macro))
-    (elint-find-args-in-code (cdr code)))
-   (t 'unknown)))
+  (let ((args (help-function-arglist code)))
+    (if (listp args) args 'unknown)))
 
 ;;;
 ;;; Functions to check some special forms




reply via email to

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