* lisp/emacs-lisp/elint.el (elint-find-args-in-code):
Use help-function-arglist, so as to handle lexical byte-code.
This commit is contained in:
parent
b7ffe0402b
commit
ef501ef01c
2 changed files with 7 additions and 8 deletions
|
@ -46,6 +46,8 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(require 'help-fns)
|
||||
|
||||
(defgroup elint nil
|
||||
"Linting for Emacs Lisp."
|
||||
:prefix "elint-"
|
||||
|
@ -713,14 +715,8 @@ Returns `unknown' if we couldn't find arguments."
|
|||
(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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue