HCoop
/
bpt
/
emacs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Modularize add-log-current-defun.
[bpt/emacs.git]
/
lisp
/
emacs-lisp
/
check-declare.el
diff --git
a/lisp/emacs-lisp/check-declare.el
b/lisp/emacs-lisp/check-declare.el
index
f6ff67a
..
d421389
100644
(file)
--- a/
lisp/emacs-lisp/check-declare.el
+++ b/
lisp/emacs-lisp/check-declare.el
@@
-1,6
+1,6
@@
;;; check-declare.el --- Check declare-function statements
;;; check-declare.el --- Check declare-function statements
-;; Copyright (C) 2007-201
1
Free Software Foundation, Inc.
+;; Copyright (C) 2007-201
2
Free Software Foundation, Inc.
;; Author: Glenn Morris <rgm@gnu.org>
;; Keywords: lisp, tools, maint
;; Author: Glenn Morris <rgm@gnu.org>
;; Keywords: lisp, tools, maint
@@
-28,7
+28,7
@@
;; checks that all such statements in a file or directory are accurate.
;; The entry points are `check-declare-file' and `check-declare-directory'.
;; checks that all such statements in a file or directory are accurate.
;; The entry points are `check-declare-file' and `check-declare-directory'.
-;; For more information, see Info node `
elisp(Declaring Functions)
'.
+;; For more information, see Info node `
(elisp)Declaring Functions
'.
;;; TODO:
;;; TODO:
@@
-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))
;; 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)))
(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.
(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))
(message "%sdone" m)
alist))