[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/check-declare.el,v
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/check-declare.el,v |
Date: |
Thu, 22 Nov 2007 06:53:24 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Glenn Morris <gm> 07/11/22 06:53:24
Index: check-declare.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emacs-lisp/check-declare.el,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- check-declare.el 22 Nov 2007 06:20:53 -0000 1.6
+++ check-declare.el 22 Nov 2007 06:53:24 -0000 1.7
@@ -108,17 +108,22 @@
;; (min . max) for a fixed number of arguments, or
;; arglists with optional elements.
;; (min) for arglists with &rest.
+ ;; sig = 'err means we could not find an arglist.
sig (cond (cflag
- (re-search-forward "," nil t 3)
+ (or
+ (when (re-search-forward "," nil t 3)
(skip-chars-forward " \t\n")
;; Assuming minargs and maxargs on same line.
(when (looking-at "\\([0-9]+\\)[ \t]*,[ \t]*\
\\([0-9]+\\|MANY\\|UNEVALLED\\)")
- (setq minargs (string-to-number (match-string
1))
+ (setq minargs (string-to-number
+ (match-string 1))
maxargs (match-string 2))
(cons minargs (unless (string-match "[^0-9]"
maxargs)
- (string-to-number maxargs)))))
+ (string-to-number
+ maxargs)))))
+ 'err))
((string-equal (match-string 1)
"define-derived-mode")
'(0 . 0))
@@ -129,24 +134,29 @@
((string-equal (match-string 1)
"defalias")
t)
- (t
- (if (looking-at "\\((\\|nil\\)")
+ ((looking-at "\\((\\|nil\\)")
(byte-compile-arglist-signature
- (read (current-buffer))))))
+ (read (current-buffer))))
+ (t
+ 'err))
;; alist of functions and arglist signatures.
siglist (cons (cons fn sig) siglist)))))
(dolist (e fnlist)
(setq arglist (nth 2 e)
type
(if re ; re non-nil means found a file
- (if (setq sig (assoc (cadr e) siglist))
+ (if (setq sig (assoc (cadr e) siglist)) ; found function
;; Recall we use t to mean no arglist specified,
;; to distinguish from an empty arglist.
- (unless (or (eq arglist t)
- (eq sig t))
- (unless (equal (byte-compile-arglist-signature arglist)
- (cdr sig))
- "arglist mismatch"))
+ (unless (eq arglist t)
+ (setq sig (cdr-safe sig))
+ (cond ((eq sig t)) ; defalias, can't check
+ ((eq sig 'err)
+ "arglist not found") ; internal error
+ ((not (equal (byte-compile-arglist-signature
+ arglist)
+ sig))
+ "arglist mismatch")))
"function not found")
"file not found"))
(when type
- [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/check-declare.el,v, Glenn Morris, 2007/11/18
- [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/check-declare.el,v, Glenn Morris, 2007/11/19
- [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/check-declare.el,v, Glenn Morris, 2007/11/21
- [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/check-declare.el,v, Glenn Morris, 2007/11/21
- [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/check-declare.el,v, Glenn Morris, 2007/11/22
- [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/check-declare.el,v,
Glenn Morris <=
- [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/check-declare.el,v, Glenn Morris, 2007/11/22
- [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/check-declare.el,v, Glenn Morris, 2007/11/23
- [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/check-declare.el,v, Glenn Morris, 2007/11/26
- [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/check-declare.el,v, Glenn Morris, 2007/11/27
- [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/check-declare.el,v, Glenn Morris, 2007/11/28
- [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/check-declare.el,v, Glenn Morris, 2007/11/30