emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r104121: Small check-declare fix.


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104121: Small check-declare fix.
Date: Wed, 04 May 2011 23:27:24 -0700
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104121
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Wed 2011-05-04 23:27:24 -0700
message:
  Small check-declare fix.
  
  * lisp/emacs-lisp/check-declare.el (check-declare-scan):
  Handle byte-compile-initial-macro-environment in bytecomp.el
modified:
  lisp/ChangeLog
  lisp/emacs-lisp/check-declare.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-05-05 06:25:24 +0000
+++ b/lisp/ChangeLog    2011-05-05 06:27:24 +0000
@@ -1,3 +1,8 @@
+2011-05-05  Glenn Morris  <address@hidden>
+
+       * emacs-lisp/check-declare.el (check-declare-scan):
+       Handle byte-compile-initial-macro-environment in bytecomp.el
+
 2011-05-05  Stefan Monnier  <address@hidden>
 
        Fix earlier half-done eieio-defmethod change (bug#8338).

=== modified file 'lisp/emacs-lisp/check-declare.el'
--- a/lisp/emacs-lisp/check-declare.el  2011-01-25 04:08:28 +0000
+++ b/lisp/emacs-lisp/check-declare.el  2011-05-05 06:27:24 +0000
@@ -88,9 +88,11 @@
       ;; 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 @@
                  (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))
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]