From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ryan Mulligan Newsgroups: gmane.emacs.devel Subject: [PATCH] fix byte-recompile-directory bug Date: Wed, 1 Jan 2014 20:57:34 -0800 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf301d3cecc0f67004eef5a106 X-Trace: ger.gmane.org 1388638665 15486 80.91.229.3 (2 Jan 2014 04:57:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 2 Jan 2014 04:57:45 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 02 05:57:51 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VyaLv-0000pl-3T for ged-emacs-devel@m.gmane.org; Thu, 02 Jan 2014 05:57:51 +0100 Original-Received: from localhost ([::1]:43381 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VyaLu-0007bz-Ot for ged-emacs-devel@m.gmane.org; Wed, 01 Jan 2014 23:57:50 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40424) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VyaLm-0007be-E7 for emacs-devel@gnu.org; Wed, 01 Jan 2014 23:57:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VyaLg-0004Qc-Ct for emacs-devel@gnu.org; Wed, 01 Jan 2014 23:57:42 -0500 Original-Received: from mail-ig0-f176.google.com ([209.85.213.176]:36131) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VyaLg-0004Q2-7B for emacs-devel@gnu.org; Wed, 01 Jan 2014 23:57:36 -0500 Original-Received: by mail-ig0-f176.google.com with SMTP id k19so40839542igc.3 for ; Wed, 01 Jan 2014 20:57:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=WNxA+YiU5agF6KP9x+Ggq8g3jFEVTzZhAIbm1jDb36I=; b=CxiPLPXrHhGs1RL86koqwltpO6XDBD08+Qes+u76/bqiGVPmIlh7WJLUntOhUzrcOc zp0QnqkApcAl5LLT5NP8hV+9mjw9ZdflOjToo7ZIWdxlRpS0tcALJGBpjrORZ5hdXSEp AAj/V2hthnKTJ5DKTxdDPj4kNkzzTt2/KeT6q+f8TIs0qcDfABw3h16FvYrXZRQKgTOK vxfnl3WIfhiFnQB6OUdhN1EhW8fj8IWabIWHfujS8XS6w2eh1izh5CiqvURW+EAcnkjk Kb20zidvQUunw1msY9njeql7Cej6YqyV0dhtwMn+yXhRMCGgoUhoEoOsp/6VHhPbGEIe XFXg== X-Gm-Message-State: ALoCoQmvFPzeEjR27zltiRMi3g8KqKb4fZ3NYo9JUu6O2pnNXxQHKZTTBB3IheXb9LkFI40kv30O X-Received: by 10.42.215.80 with SMTP id hd16mr56825168icb.17.1388638655009; Wed, 01 Jan 2014 20:57:35 -0800 (PST) Original-Received: by 10.50.80.18 with HTTP; Wed, 1 Jan 2014 20:57:34 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.213.176 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:167022 Archived-At: --20cf301d3cecc0f67004eef5a106 Content-Type: text/plain; charset=UTF-8 Hello. This patch fixes the bug I reported earlier today: emacs -Q --eval "(byte-recompile-directory \"/home/ryantm/projects/emacs/expand-region.el/\" 0)" writes Error: IO error reading /home/ryantm/projects/emacs/expand-region.el: Is a directory in the *Compile-Log* buffer and does not compile the files. patch follows. Regards Ryan Mulligan === modified file 'lisp/emacs-lisp/bytecomp.el' --- lisp/emacs-lisp/bytecomp.el 2014-01-01 07:43:34 +0000 +++ lisp/emacs-lisp/bytecomp.el 2014-01-02 04:53:00 +0000 @@ -1598,7 +1598,7 @@ (while directories (setq directory (car directories)) (message "Checking %s..." directory) - (dolist (file (directory-files directory)) + (dolist (file (delete "." (delete ".." (directory-files directory)))) (let ((source (expand-file-name file directory))) (if (file-directory-p source) (and (not (member file '("RCS" "CVS"))) --20cf301d3cecc0f67004eef5a106 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello.

This patch fixes the bug I repor= ted earlier today:

emacs -Q --eval "(byte-rec= ompile-directory \"/home/ryantm/projects/emacs/expand-region.el/\"= ; 0)"
=
writes

Error: IO error reading /home/ryantm/projects/emacs/expand-region= .el: Is a directory

in the *Compile-Log* buffer and does not compile the files.
=

patch follows.=C2=A0

Regards
Ryan Mulligan

=3D=3D=3D modified= file 'lisp/emacs-lisp/bytecomp.el'
--- lisp/emacs-lisp/bytecomp.el 2014-01-01 07:43:34 +0000<= /font>
+++ lisp/emacs-lisp/bytecomp.el 2014-01-02 04:53:00 += 0000
@@ -1598,7 +1598,7 @@
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 (while directories
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(setq directory (car directorie= s))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(message= "Checking %s..." directory)
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 (dolist (file (directory-files dire= ctory))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 (dolist = (file (delete "." (delete ".." (directory-files directo= ry))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (let ((source (expand-f= ile-name file directory)))
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(if (file-directory-p source)<= /div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(an= d (not (member file '("RCS" "CVS")))<= /div>
--20cf301d3cecc0f67004eef5a106--