emacs-diffs
[Top][All Lists]
Advanced

[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: Mon, 19 Nov 2007 00:09:20 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       07/11/19 00:09:20

Index: check-declare.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emacs-lisp/check-declare.el,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- check-declare.el    17 Nov 2007 03:47:59 -0000      1.1
+++ check-declare.el    19 Nov 2007 00:09:20 -0000      1.2
@@ -30,6 +30,10 @@
 ;; checks that all such statements in a file or directory are accurate.
 ;; The entry points are `check-declare-file' and `check-declare-directory'.
 
+;;; TODO:
+
+;; 1. Handle defstructs (eg uniquify-item-base in desktop.el).
+
 ;;; Code:
 
 (defconst check-declare-warning-buffer "*Check Declarations Warnings*"
@@ -76,14 +80,17 @@
   (let ((m (format "Checking %s..." fnfile))
         re fn sig siglist arglist type errlist)
     (message "%s" m)
+    (or (file-exists-p fnfile)
+        (setq fnfile (concat fnfile ".el")))
     (if (file-exists-p fnfile)
         (with-temp-buffer
           (insert-file-contents fnfile)
-          (setq re (format "^[ \t]*(defun[ \t]+%s\\>"
+          ;; defsubst's don't _have_ to be known at compile time.
+          (setq re (format "^[ \t]*(def\\(un\\|subst\\)[ \t]+%s\\>"
                            (regexp-opt (mapcar 'cadr fnlist) t)))
           (while (re-search-forward re nil t)
             (skip-chars-forward " \t\n")
-            (setq fn (match-string 1)
+            (setq fn (match-string 2)
                   sig (if (looking-at "\\((\\|nil\\)")
                           (byte-compile-arglist-signature
                            (read (current-buffer))))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]