From: Glenn Morris Date: Tue, 20 Nov 2007 03:53:33 +0000 (+0000) Subject: (check-declare-verify): Tweak regexp for end of function-name. Handle X-Git-Tag: emacs-pretest-23.0.90~9623 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=82b3ac7a99c49b585e0fde395454f895da666998;p=emacs.git (check-declare-verify): Tweak regexp for end of function-name. Handle define-derived-mode. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 784c2d09da8..300ae8b628b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-11-20 Glenn Morris + + * emacs-lisp/check-declare.el (check-declare-verify): Tweak regexp + for end of function-name. Handle define-derived-mode. + 2007-11-20 Dan Nicolaescu * progmodes/idlw-help.el: Require browse-url unconditionally, it 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)