Mercurial > emacs
comparison lisp/emacs-lisp/bytecomp.el @ 54497:acd845de0416
(byte-recompile-directory): Ignore hidden dir.
(byte-compile-file): Output warning when deleting a file.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 22 Mar 2004 15:23:59 +0000 |
parents | 41530bace164 |
children | e8824c4f5f7e 108bb5537c12 |
comparison
equal
deleted
inserted
replaced
54496:94bcfb39cf49 | 54497:acd845de0416 |
---|---|
1 ;;; bytecomp.el --- compilation of Lisp code into byte code | 1 ;;; bytecomp.el --- compilation of Lisp code into byte code |
2 | 2 |
3 ;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1998, 2000, 2001, 2002, 2003 | 3 ;; Copyright (C) 1985,86,87,92,94,1998,2000,01,02,03,2004 |
4 ;; Free Software Foundation, Inc. | 4 ;; Free Software Foundation, Inc. |
5 | 5 |
6 ;; Author: Jamie Zawinski <jwz@lucid.com> | 6 ;; Author: Jamie Zawinski <jwz@lucid.com> |
7 ;; Hallvard Furuseth <hbf@ulrik.uio.no> | 7 ;; Hallvard Furuseth <hbf@ulrik.uio.no> |
8 ;; Maintainer: FSF | 8 ;; Maintainer: FSF |
9 ;; Keywords: lisp | 9 ;; Keywords: lisp |
10 | 10 |
11 ;;; This version incorporates changes up to version 2.10 of the | 11 ;;; This version incorporates changes up to version 2.10 of the |
12 ;;; Zawinski-Furuseth compiler. | 12 ;;; Zawinski-Furuseth compiler. |
13 (defconst byte-compile-version "$Revision: 2.142 $") | 13 (defconst byte-compile-version "$Revision: 2.143 $") |
14 | 14 |
15 ;; This file is part of GNU Emacs. | 15 ;; This file is part of GNU Emacs. |
16 | 16 |
17 ;; GNU Emacs is free software; you can redistribute it and/or modify | 17 ;; GNU Emacs is free software; you can redistribute it and/or modify |
18 ;; it under the terms of the GNU General Public License as published by | 18 ;; it under the terms of the GNU General Public License as published by |
1491 (message "Checking %s..." directory) | 1491 (message "Checking %s..." directory) |
1492 (let ((files (directory-files directory)) | 1492 (let ((files (directory-files directory)) |
1493 source dest) | 1493 source dest) |
1494 (dolist (file files) | 1494 (dolist (file files) |
1495 (setq source (expand-file-name file directory)) | 1495 (setq source (expand-file-name file directory)) |
1496 (if (and (not (member file '("." ".." "RCS" "CVS"))) | 1496 (if (and (not (member file '("RCS" "CVS"))) |
1497 (not (eq ?\. (aref file 0))) | |
1497 (file-directory-p source) | 1498 (file-directory-p source) |
1498 (not (file-symlink-p source))) | 1499 (not (file-symlink-p source))) |
1499 ;; This file is a subdirectory. Handle them differently. | 1500 ;; This file is a subdirectory. Handle them differently. |
1500 (when (or (null arg) | 1501 (when (or (null arg) |
1501 (eq 0 arg) | 1502 (eq 0 arg) |
1609 (setq default-directory (file-name-directory filename))) | 1610 (setq default-directory (file-name-directory filename))) |
1610 ;; Check if the file's local variables explicitly specify not to | 1611 ;; Check if the file's local variables explicitly specify not to |
1611 ;; compile this file. | 1612 ;; compile this file. |
1612 (if (with-current-buffer input-buffer no-byte-compile) | 1613 (if (with-current-buffer input-buffer no-byte-compile) |
1613 (progn | 1614 (progn |
1614 (message "%s not compiled because of `no-byte-compile: %s'" | 1615 ;; (message "%s not compiled because of `no-byte-compile: %s'" |
1615 (file-relative-name filename) | 1616 ;; (file-relative-name filename) |
1616 (with-current-buffer input-buffer no-byte-compile)) | 1617 ;; (with-current-buffer input-buffer no-byte-compile)) |
1617 (if (file-exists-p target-file) | 1618 (when (file-exists-p target-file) |
1618 (condition-case nil (delete-file target-file) (error nil))) | 1619 (message "%s deleted because of `no-byte-compile: %s'" |
1620 (file-relative-name target-file) | |
1621 (buffer-local-value 'no-byte-compile input-buffer)) | |
1622 (condition-case nil (delete-file target-file) (error nil))) | |
1619 ;; We successfully didn't compile this file. | 1623 ;; We successfully didn't compile this file. |
1620 'no-byte-compile) | 1624 'no-byte-compile) |
1621 (when byte-compile-verbose | 1625 (when byte-compile-verbose |
1622 (message "Compiling %s..." filename)) | 1626 (message "Compiling %s..." filename)) |
1623 (setq byte-compiler-error-flag nil) | 1627 (setq byte-compiler-error-flag nil) |