diff options
author | Glenn Morris <rgm@gnu.org> | 2009-09-30 07:24:35 +0000 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2009-09-30 07:24:35 +0000 |
commit | 494f4fc70c9dc567b3341d2cf04e0ceabaa69373 (patch) | |
tree | 72f01d4272e8665f6f56cac5e24924cbcc58b91b /lisp/emacs-lisp | |
parent | d275a5ed7b78c5d6e71a8708440062f3d8e8b9a6 (diff) | |
download | emacs-494f4fc70c9dc567b3341d2cf04e0ceabaa69373.tar.gz emacs-494f4fc70c9dc567b3341d2cf04e0ceabaa69373.tar.bz2 emacs-494f4fc70c9dc567b3341d2cf04e0ceabaa69373.zip |
(elint-init-form): Report declarations where the filename is not a string.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/elint.el | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el index 27e7a7f293a..59be145d7ec 100644 --- a/lisp/emacs-lisp/elint.el +++ b/lisp/emacs-lisp/elint.el @@ -420,11 +420,16 @@ Return nil if there are no more forms, t otherwise." ((eq (car form) 'autoload) (setq env (elint-env-add-func env (cadr (cadr form)) 'unknown))) ((eq (car form) 'declare-function) - (setq env (elint-env-add-func env (cadr form) - (if (or (< (length form) 4) - (eq (nth 3 form) t)) - 'unknown - (nth 3 form))))) + (setq env (elint-env-add-func + env (cadr form) + (if (or (< (length form) 4) + (eq (nth 3 form) t) + (unless (stringp (nth 2 form)) + (elint-error "Malformed declaration for `%s'" + (cadr form)) + t)) + 'unknown + (nth 3 form))))) ((and (eq (car form) 'defalias) (listp (nth 2 form))) ;; If the alias points to something already in the environment, ;; add the alias to the environment with the same arguments. |