diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2011-05-05 23:30:56 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-05-05 23:30:56 -0700 |
commit | 8ff0ac3c78498c905a22786aa124f59d213b99a0 (patch) | |
tree | a0448dee34e826197c000ec615dd172cfb59bcc1 /lisp/emacs-lisp | |
parent | 9991d78e8cd74e986a9b7625c12a43fbf7a283b3 (diff) | |
parent | 548d0a63d6212c0baef9a3d2bf0093cceb4e1136 (diff) | |
download | emacs-8ff0ac3c78498c905a22786aa124f59d213b99a0.tar.gz emacs-8ff0ac3c78498c905a22786aa124f59d213b99a0.tar.bz2 emacs-8ff0ac3c78498c905a22786aa124f59d213b99a0.zip |
Merge from mainline.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/check-declare.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/check-declare.el b/lisp/emacs-lisp/check-declare.el index f6ff67a90c3..e15920ef009 100644 --- a/lisp/emacs-lisp/check-declare.el +++ b/lisp/emacs-lisp/check-declare.el @@ -88,9 +88,11 @@ don't know how to recognize (e.g. some macros)." ;; FIXME we could theoretically be inside a string. (while (re-search-forward "^[ \t]*\\((declare-function\\)[ \t\n]" nil t) (goto-char (match-beginning 1)) - (if (and (setq form (ignore-errors (read (current-buffer))) - len (length form)) - (> len 2) (< len 6) + (if (and (setq form (ignore-errors (read (current-buffer)))) + ;; Exclude element of byte-compile-initial-macro-environment. + (or (listp (cdr form)) (setq form nil)) + (> (setq len (length form)) 2) + (< len 6) (symbolp (setq fn (cadr form))) (setq fn (symbol-name fn)) ; later we use as a search string (stringp (setq fnfile (nth 2 form))) @@ -104,7 +106,7 @@ don't know how to recognize (e.g. some macros)." (symbolp (setq fileonly (nth 4 form)))) (setq alist (cons (list fnfile fn arglist fileonly) alist)) ;; FIXME make this more noticeable. - (message "Malformed declaration for `%s'" (cadr form))))) + (if form (message "Malformed declaration for `%s'" (cadr form)))))) (message "%sdone" m) alist)) |