Hello.
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.
=== 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")))