aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emacs-lisp/check-declare.el
diff options
context:
space:
mode:
authorGlenn Morris <[email protected]>2009-09-29 04:12:46 +0000
committerGlenn Morris <[email protected]>2009-09-29 04:12:46 +0000
commitae7155155be576e156e9c6655c823d95ce50ec67 (patch)
tree15fc93dd517d860fd932d76326582be16106a87a /lisp/emacs-lisp/check-declare.el
parent84c23041ea3b1cd714a716011781658f368fb61f (diff)
(check-declare-verify): Add basic defmethod and defclass, and
define-overloadable-function.
Diffstat (limited to 'lisp/emacs-lisp/check-declare.el')
-rw-r--r--lisp/emacs-lisp/check-declare.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/check-declare.el b/lisp/emacs-lisp/check-declare.el
index 1251699f8f..9e1f8b4f08 100644
--- a/lisp/emacs-lisp/check-declare.el
+++ b/lisp/emacs-lisp/check-declare.el
@@ -34,6 +34,8 @@
;; 1. Warn about functions marked as obsolete, eg
;; password-read-and-add in smime.el.
+;; 2. defmethod, defclass argument checking.
+;; 3. defclass also defines -p and -child-p.
;;; Code:
@@ -143,9 +145,10 @@ is a string giving details of the error."
(setq re (format (if cflag
"^[ \t]*\\(DEFUN\\)[ \t]*([ \t]*\"%s\""
"^[ \t]*(\\(fset[ \t]+'\\|\
-def\\(?:un\\|subst\\|foo\\|\
-ine-\\(?:derived\\|generic\\|\\(?:global\\(?:ized\\)?-\\)?minor\\)-mode\
-\\|\\(?:ine-obsolete-function-\\)?alias[ \t]+'\\)\\)\
+def\\(?:un\\|subst\\|foo\\|method\\|class\\|\
+ine-\\(?:derived\\|generic\\|\\(?:global\\(?:ized\\)?-\\)?minor\\)-mode\\|\
+\\(?:ine-obsolete-function-\\)?alias[ \t]+'\\|\
+ine-overloadable-function\\)\\)\
\[ \t]*%s\\([ \t;]+\\|$\\)")
(regexp-opt (mapcar 'cadr fnlist) t)))
(while (re-search-forward re nil t)
@@ -185,7 +188,8 @@ ine-\\(?:derived\\|generic\\|\\(?:global\\(?:ized\\)?-\\)?minor\\)-mode\
type)
'obsolete)
;; Can't easily check arguments in these cases.
- ((string-match "\\`\\(defalias\\|fset\\)\\>" type)
+ ((string-match "\\`\\(def\\(alias\\|\
+method\\|class\\)\\|fset\\)\\>" type)
t)
((looking-at "\\((\\|nil\\)")
(byte-compile-arglist-signature