Subject: bug#55386: 29.0.50; check-declare-directory doesn't work on Windows

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 12 May 2022 17:57:01 +0200

Yasuhiro Kimura <[email-masked]> writes:

> [How to reproduce the problem]
>
> 1. cd C:/Users/yasu/Temp
> 2. git clone https://git.savannah.gnu.org/git/emacs.git
> 3. Start Emacs with 'emacs -Q'
> 4. Type '(check-declare-directory "C:/Users/yasu/Temp/emacs/lisp")'
>    and C-j.

[...]

> Debugger entered--Lisp error: (file-error "Opening input file" "Invalid argument" "c:/Users/yasu/ファイルが見つかりません - \"^[ \11]*(declare-funct...")
>   insert-file-contents("ファイルが見つかりません - \"^[ \11]*(declare-function\"")
>   check-declare-scan("ファイルが見つかりません - \"^[ \11]*(declare-function\"")
>   check-declare-files("ファイルが見つかりません - \"^[ \11]*(declare-function\"")
>   apply(check-declare-files "ファイルが見つかりません - \"^[ \11]*(declare-function\"")

check-declare-directory is just a wrapper around `find', and I'm surprised
that this even vaguely works on Windows:

(defun check-declare-directory (root)
[...]
  (let ((files (process-lines-ignore-status
                find-program root
                "-name" "*.el"
                "-exec" grep-program
                "-l" "^[ \t]*(declare-function" "{}" "+")))

If you run this "manually", what does it output?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no