1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-26 23:31:55 -08:00

(check-declare-verify): Tweak regexp for end of function-name. Handle

define-derived-mode.
This commit is contained in:
Glenn Morris 2007-11-20 03:53:33 +00:00
parent 153ef845b8
commit 82b3ac7a99
2 changed files with 13 additions and 4 deletions

View file

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