summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2007-11-20 03:53:33 +0000
committerGlenn Morris <rgm@gnu.org>2007-11-20 03:53:33 +0000
commit82b3ac7a99c49b585e0fde395454f895da666998 (patch)
tree1dc505db7a056398b717dda53ebbe1da5b5e1ef5 /lisp/emacs-lisp
parent153ef845b8355e243c2adcf1ea52fb55636683d8 (diff)
downloademacs-82b3ac7a99c49b585e0fde395454f895da666998.tar.gz
emacs-82b3ac7a99c49b585e0fde395454f895da666998.tar.bz2
emacs-82b3ac7a99c49b585e0fde395454f895da666998.zip
(check-declare-verify): Tweak regexp for end of function-name. Handle
define-derived-mode.
Diffstat (limited to 'lisp/emacs-lisp')
-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 0b78da165db..c3e41086599 100644
--- a/lisp/emacs-lisp/check-declare.el
+++ b/lisp/emacs-lisp/check-declare.el
@@ -86,14 +86,18 @@ found to be true, otherwise a list of errors with elements of the form
(with-temp-buffer
(insert-file-contents fnfile)
;; defsubst's don't _have_ to be known at compile time.
- (setq re (format "^[ \t]*(def\\(un\\|subst\\)[ \t]+%s\\>"
+ (setq re (format "^[ \t]*(\\(def\\(?:un\\|subst\\|\
+ine-derived-mode\\)\\)\[ \t]+%s\\([ \t;]+\\|$\\)"
(regexp-opt (mapcar 'cadr fnlist) t)))
(while (re-search-forward re nil t)
(skip-chars-forward " \t\n")
(setq fn (match-string 2)
- sig (if (looking-at "\\((\\|nil\\)")
- (byte-compile-arglist-signature
- (read (current-buffer))))
+ sig (if (string-equal "define-derived-mode"
+ (match-string 1))
+ '(0 . 0)
+ (if (looking-at "\\((\\|nil\\)")
+ (byte-compile-arglist-signature
+ (read (current-buffer)))))
;; alist of functions and arglist signatures.
siglist (cons (cons fn sig) siglist)))))
(dolist (e fnlist)