;;; check-declare.el --- Check declare-function statements
-;; Copyright (C) 2007-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2016 Free Software Foundation, Inc.
;; Author: Glenn Morris <rgm@gnu.org>
;; Keywords: lisp, tools, maint
(symbolp (setq fileonly (nth 4 form))))
(setq alist (cons (list fnfile fn arglist fileonly) alist))
;; FIXME make this more noticeable.
- (if form (message "Malformed declaration for ‘%s’" (cadr form))))))
+ (if form (message "Malformed declaration for `%s'" (cadr form))))))
(message "%sdone" m)
alist))
(defcustom check-declare-ext-errors nil
"When non-nil, warn about functions not found in :ext."
+ :version "25.1"
:type 'boolean)
(defun check-declare-verify (fnfile fnlist)
ine-\\(?:derived\\|generic\\|\\(?:global\\(?:ized\\)?-\\)?minor\\)-mode\\|\
\\(?:ine-obsolete-function-\\)?alias[ \t]+'\\|\
ine-overloadable-function\\)\\)\
-\[ \t]*%s\\([ \t;]+\\|$\\)")
+[ \t]*%s\\([ \t;]+\\|$\\)")
(regexp-opt (mapcar 'cadr fnlist) t)))
(while (re-search-forward re nil t)
(skip-chars-forward " \t\n")
entry))
(warning-fill-prefix " "))
(display-warning 'check-declare
- (format "said ‘%s’ was defined in %s: %s"
- fn (file-name-nondirectory fnfile) type)
+ (format-message "said `%s' was defined in %s: %s"
+ fn (file-name-nondirectory fnfile) type)
nil check-declare-warning-buffer)))
(declare-function compilation-forget-errors "compile" ())
See `check-declare-directory' for more information."
(interactive "fFile to check: ")
(or (file-exists-p file)
- (error "File ‘%s’ not found" file))
+ (error "File `%s' not found" file))
(let ((m (format "Checking %s..." file))
errlist)
(message "%s" m)
Returns non-nil if any false statements are found."
(interactive "DDirectory to check: ")
(or (file-directory-p (setq root (expand-file-name root)))
- (error "Directory ‘%s’ not found" root))
- (let ((m "Checking ‘declare-function’ statements...")
+ (error "Directory `%s' not found" root))
+ (let ((m "Checking `declare-function' statements...")
(m2 "Finding files with declarations...")
errlist files)
(message "%s" m)
(message "%s" m2)
- (setq files (process-lines find-program root
+ (setq files (process-lines grep-find-program root
"-name" "*.el"
"-exec" grep-program
"-l" "^[ \t]*(declare-function" "{}" ";"))