all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Ulrich Mueller <ulm@gentoo.org>
Cc: emacs-devel@gnu.org
Subject: Re: elint cannot handle dolist any more?
Date: Tue, 17 Jul 2012 08:31:09 -0400	[thread overview]
Message-ID: <jwvk3y28tf7.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20481.34472.74392.198061@a1i15.kph.uni-mainz.de> (Ulrich Mueller's message of "Sat, 14 Jul 2012 16:48:08 +0200")

> 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




  parent reply	other threads:[~2012-07-17 12:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-14 14:48 elint cannot handle dolist any more? Ulrich Mueller
2012-07-15 22:39 ` Stefan Monnier
2012-07-17 12:31 ` Stefan Monnier [this message]
2012-07-17 18:10   ` Ulrich Mueller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvk3y28tf7.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=ulm@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.