1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-26 07:11:34 -08:00

(check-declare-verify): Add basic defmethod and defclass, and

define-overloadable-function.
This commit is contained in:
Glenn Morris 2009-09-29 04:12:46 +00:00
parent 84c23041ea
commit ae7155155b
2 changed files with 16 additions and 4 deletions

View file

@ -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