summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleh Krehel <ohwoeowho@gmail.com>2015-02-13 14:34:17 +0100
committerOleh Krehel <ohwoeowho@gmail.com>2015-02-13 21:17:47 +0100
commit3d0ac0f2ec1f645e6b009f2c1639904355d25a18 (patch)
tree9a751883bb6cdad5cf5aa21d367c7c2216b96a1a
parenta03ab7eaf532075d2948ece70b8f3c97cd26b577 (diff)
downloademacs-3d0ac0f2ec1f645e6b009f2c1639904355d25a18.tar.gz
check-declare.el (check-declare-ext-errors): New defcustom.
* emacs-lisp/check-declare.el (check-declare): New defgroup. (check-declare-verify): When `check-declare-ext-errors' is non-nil, warn about an unfound function, instead of saying "skipping external file".
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/emacs-lisp/check-declare.el11
2 files changed, 19 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 030d572d90f..1ee515f643d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
+2015-02-13 Oleh Krehel <ohwoeowho@gmail.com>
+
+ * emacs-lisp/check-declare.el (check-declare-ext-errors): New
+ defcustom.
+ (check-declare): New defgroup.
+ (check-declare-verify): When `check-declare-ext-errors' is
+ non-nil, warn about an unfound function, instead of saying
+ "skipping external file".
+
2015-02-13 Artur Malabarba <bruce.connor.am@gmail.com>
* emacs-lisp/package.el (package--compatibility-table): New var.
diff --git a/lisp/emacs-lisp/check-declare.el b/lisp/emacs-lisp/check-declare.el
index 13de61c4935..40ab03d8351 100644
--- a/lisp/emacs-lisp/check-declare.el
+++ b/lisp/emacs-lisp/check-declare.el
@@ -125,6 +125,14 @@ With optional argument FULL, sums the number of elements in each element."
(autoload 'byte-compile-arglist-signature "bytecomp")
+(defgroup check-declare nil
+ "Check declare-function statements."
+ :group 'tools)
+
+(defcustom check-declare-ext-errors nil
+ "When non-nil, warn abount functions not found in :ext."
+ :type 'boolean)
+
(defun check-declare-verify (fnfile fnlist)
"Check that FNFILE contains function definitions matching FNLIST.
Each element of FNLIST has the form (FILE FN ARGLIST FILEONLY), where
@@ -226,7 +234,8 @@ method\\|class\\)\\|fset\\)\\>" type)
(when type
(setq errlist (cons (list (car e) (cadr e) type) errlist))))
(message "%s%s" m
- (if (or re (not ext))
+ (if (or re (or check-declare-ext-errors
+ (not ext)))
(check-declare-errmsg errlist)
(progn
(setq errlist nil)