diff options
| author | Oleh Krehel | 2015-02-13 14:34:17 +0100 |
|---|---|---|
| committer | Oleh Krehel | 2015-02-25 12:05:28 +0100 |
| commit | 26b2e9aa4d022fbd13e7878dab6a1df51eddebc5 (patch) | |
| tree | a8b2cf523cc4d115a175bf44111a3b8cd705616d | |
| parent | dcd4830cb9b716c0d055df84f5106b14585eb879 (diff) | |
| download | emacs-26b2e9aa4d022fbd13e7878dab6a1df51eddebc5.tar.gz emacs-26b2e9aa4d022fbd13e7878dab6a1df51eddebc5.zip | |
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/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/emacs-lisp/check-declare.el | 11 |
2 files changed, 19 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fb8b1f7fc94..078fc3e3a6b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2015-02-25 Oleh Krehel <ohwoeowho@gmail.com> | ||
| 2 | |||
| 3 | * emacs-lisp/check-declare.el (check-declare-ext-errors): New | ||
| 4 | defcustom. | ||
| 5 | (check-declare): New defgroup. | ||
| 6 | (check-declare-verify): When `check-declare-ext-errors' is | ||
| 7 | non-nil, warn about an unfound function, instead of saying | ||
| 8 | "skipping external file". | ||
| 9 | |||
| 1 | 2015-02-25 Tassilo Horn <tsdh@gnu.org> | 10 | 2015-02-25 Tassilo Horn <tsdh@gnu.org> |
| 2 | 11 | ||
| 3 | * textmodes/reftex-vars.el (reftex-include-file-commands): Call | 12 | * textmodes/reftex-vars.el (reftex-include-file-commands): Call |
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." | |||
| 125 | 125 | ||
| 126 | (autoload 'byte-compile-arglist-signature "bytecomp") | 126 | (autoload 'byte-compile-arglist-signature "bytecomp") |
| 127 | 127 | ||
| 128 | (defgroup check-declare nil | ||
| 129 | "Check declare-function statements." | ||
| 130 | :group 'tools) | ||
| 131 | |||
| 132 | (defcustom check-declare-ext-errors nil | ||
| 133 | "When non-nil, warn abount functions not found in :ext." | ||
| 134 | :type 'boolean) | ||
| 135 | |||
| 128 | (defun check-declare-verify (fnfile fnlist) | 136 | (defun check-declare-verify (fnfile fnlist) |
| 129 | "Check that FNFILE contains function definitions matching FNLIST. | 137 | "Check that FNFILE contains function definitions matching FNLIST. |
| 130 | Each element of FNLIST has the form (FILE FN ARGLIST FILEONLY), where | 138 | Each element of FNLIST has the form (FILE FN ARGLIST FILEONLY), where |
| @@ -226,7 +234,8 @@ method\\|class\\)\\|fset\\)\\>" type) | |||
| 226 | (when type | 234 | (when type |
| 227 | (setq errlist (cons (list (car e) (cadr e) type) errlist)))) | 235 | (setq errlist (cons (list (car e) (cadr e) type) errlist)))) |
| 228 | (message "%s%s" m | 236 | (message "%s%s" m |
| 229 | (if (or re (not ext)) | 237 | (if (or re (or check-declare-ext-errors |
| 238 | (not ext))) | ||
| 230 | (check-declare-errmsg errlist) | 239 | (check-declare-errmsg errlist) |
| 231 | (progn | 240 | (progn |
| 232 | (setq errlist nil) | 241 | (setq errlist nil) |