diff options
author | Glenn Morris <rgm@gnu.org> | 2011-05-04 23:27:24 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2011-05-04 23:27:24 -0700 |
commit | 0bff894fc150a90943bff8061bd34827937f952c (patch) | |
tree | ce1af06bc26aefcb41cf2ef1c72f908d226a85e7 | |
parent | 40c67c6dee51662ef7c12ca6615e68eaa7ae56ef (diff) | |
download | emacs-0bff894fc150a90943bff8061bd34827937f952c.tar.gz emacs-0bff894fc150a90943bff8061bd34827937f952c.tar.bz2 emacs-0bff894fc150a90943bff8061bd34827937f952c.zip |
Small check-declare fix.
* lisp/emacs-lisp/check-declare.el (check-declare-scan):
Handle byte-compile-initial-macro-environment in bytecomp.el
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/emacs-lisp/check-declare.el | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7a491bd8fa0..5d40325c952 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-05-05 Glenn Morris <rgm@gnu.org> + + * emacs-lisp/check-declare.el (check-declare-scan): + Handle byte-compile-initial-macro-environment in bytecomp.el + 2011-05-05 Stefan Monnier <monnier@iro.umontreal.ca> Fix earlier half-done eieio-defmethod change (bug#8338). 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)) |