aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/emacs-lisp/elint.el12
2 files changed, 7 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1648aa3bea7..320da46f186 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12012-07-17 Stefan Monnier <monnier@iro.umontreal.ca> 12012-07-17 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * emacs-lisp/elint.el (elint-find-args-in-code):
4 Use help-function-arglist, so as to handle lexical byte-code.
5
3 * progmodes/sh-script.el (sh-syntax-propertize-function): Fix last 6 * progmodes/sh-script.el (sh-syntax-propertize-function): Fix last
4 change (bug#11826). 7 change (bug#11826).
5 8
diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el
index 55915813877..2ff0ace9f4c 100644
--- a/lisp/emacs-lisp/elint.el
+++ b/lisp/emacs-lisp/elint.el
@@ -46,6 +46,8 @@
46 46
47;;; Code: 47;;; Code:
48 48
49(require 'help-fns)
50
49(defgroup elint nil 51(defgroup elint nil
50 "Linting for Emacs Lisp." 52 "Linting for Emacs Lisp."
51 :prefix "elint-" 53 :prefix "elint-"
@@ -713,14 +715,8 @@ Returns `unknown' if we couldn't find arguments."
713(defun elint-find-args-in-code (code) 715(defun elint-find-args-in-code (code)
714 "Extract the arguments from CODE. 716 "Extract the arguments from CODE.
715CODE can be a lambda expression, a macro, or byte-compiled code." 717CODE can be a lambda expression, a macro, or byte-compiled code."
716 (cond 718 (let ((args (help-function-arglist code)))
717 ((byte-code-function-p code) 719 (if (listp args) args 'unknown)))
718 (aref code 0))
719 ((and (listp code) (eq (car code) 'lambda))
720 (car (cdr code)))
721 ((and (listp code) (eq (car code) 'macro))
722 (elint-find-args-in-code (cdr code)))
723 (t 'unknown)))
724 720
725;;; 721;;;
726;;; Functions to check some special forms 722;;; Functions to check some special forms