aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love2002-06-24 18:25:16 +0000
committerDave Love2002-06-24 18:25:16 +0000
commit351697be12ba682d562a848158eb72f3b28d4e86 (patch)
tree0ce092e927082ed17215fd44c7ef8b3bc99cd6a3
parentac80de11035dec7fde35078ce4c156ba4618c20d (diff)
downloademacs-351697be12ba682d562a848158eb72f3b28d4e86.tar.gz
emacs-351697be12ba682d562a848158eb72f3b28d4e86.zip
(byte-recompile-directory)
(batch-byte-recompile-directory): Update from trunk. (byte-compile-fix-header): Adjust for use of utf-8-emacs. (byte-compile-insert-header): Update magic number. Add ballast. (map-char-table): Use byte-compile-funarg-2.
-rw-r--r--lisp/emacs-lisp/bytecomp.el35
1 files changed, 19 insertions, 16 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 6f8322d5ea5..5f629b80ebb 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1,6 +1,6 @@
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 3;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1998, 2000, 2001, 2002
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>
@@ -10,7 +10,7 @@
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.93 $") 13(defconst byte-compile-version "$Revision: 2.94 $")
14 14
15;; This file is part of GNU Emacs. 15;; This file is part of GNU Emacs.
16 16
@@ -1249,12 +1249,13 @@ Files in subdirectories of DIRECTORY are processed also."
1249This is if a `.elc' file exists but is older than the `.el' file. 1249This is if a `.elc' file exists but is older than the `.el' file.
1250Files in subdirectories of DIRECTORY are processed also. 1250Files in subdirectories of DIRECTORY are processed also.
1251 1251
1252If the `.elc' file does not exist, normally the `.el' file is *not* compiled. 1252If the `.elc' file does not exist, normally this function *does not*
1253But a prefix argument (optional second arg) means ask user, 1253compile the corresponding `.el' file. However,
1254for each such `.el' file, whether to compile it. Prefix argument 0 means 1254if ARG (the prefix argument) is 0, that means do compile all those files.
1255don't ask and compile the file anyway. 1255A nonzero ARG means ask the user, for each such `.el' file,
1256whether to compile it.
1256 1257
1257A nonzero prefix argument also means ask about each subdirectory. 1258A nonzero ARG also means ask about each subdirectory before scanning it.
1258 1259
1259If the third argument FORCE is non-nil, 1260If the third argument FORCE is non-nil,
1260recompile every `.el' file that already has a `.elc' file." 1261recompile every `.el' file that already has a `.elc' file."
@@ -1581,13 +1582,13 @@ With argument, insert value in current buffer after the form."
1581 (delete-region (point) (progn (re-search-forward "^(") 1582 (delete-region (point) (progn (re-search-forward "^(")
1582 (beginning-of-line) 1583 (beginning-of-line)
1583 (point))) 1584 (point)))
1584 (insert ";;; This file contains multibyte non-ASCII characters\n" 1585 (insert ";;; This file contains utf-8 non-ASCII characters\n"
1585 ";;; and therefore cannot be loaded into Emacs 19.\n") 1586 ";;; and therefore cannot be loaded into Emacs 21 or earlier.\n")
1586 ;; Replace "19" or "19.29" with "20", twice. 1587 ;; Replace "19" or "19.29" with "22", twice.
1587 (re-search-forward "19\\(\\.[0-9]+\\)") 1588 (re-search-forward "19\\(\\.[0-9]+\\)")
1588 (replace-match "20") 1589 (replace-match "22")
1589 (re-search-forward "19\\(\\.[0-9]+\\)") 1590 (re-search-forward "19\\(\\.[0-9]+\\)")
1590 (replace-match "20") 1591 (replace-match "22")
1591 ;; Now compensate for the change in size, 1592 ;; Now compensate for the change in size,
1592 ;; to make sure all positions in the file remain valid. 1593 ;; to make sure all positions in the file remain valid.
1593 (setq delta (- (point-max) old-header-end)) 1594 (setq delta (- (point-max) old-header-end))
@@ -1602,7 +1603,7 @@ With argument, insert value in current buffer after the form."
1602 (set-buffer outbuffer) 1603 (set-buffer outbuffer)
1603 (goto-char 1) 1604 (goto-char 1)
1604 ;; The magic number of .elc files is ";ELC", or 0x3B454C43. After 1605 ;; The magic number of .elc files is ";ELC", or 0x3B454C43. After
1605 ;; that is the file-format version number (18, 19 or 20) as a 1606 ;; that is the file-format version number (18, 19, 20 or 22) as a
1606 ;; byte, followed by some nulls. The primary motivation for doing 1607 ;; byte, followed by some nulls. The primary motivation for doing
1607 ;; this is to get some binary characters up in the first line of 1608 ;; this is to get some binary characters up in the first line of
1608 ;; the file so that `diff' will simply say "Binary files differ" 1609 ;; the file so that `diff' will simply say "Binary files differ"
@@ -1614,7 +1615,7 @@ With argument, insert value in current buffer after the form."
1614 1615
1615 (insert 1616 (insert
1616 ";ELC" 1617 ";ELC"
1617 (if (byte-compile-version-cond byte-compile-compatibility) 18 20) 1618 (if (byte-compile-version-cond byte-compile-compatibility) 18 21)
1618 "\000\000\000\n" 1619 "\000\000\000\n"
1619 ) 1620 )
1620 (insert ";;; Compiled by " 1621 (insert ";;; Compiled by "
@@ -1673,7 +1674,7 @@ With argument, insert value in current buffer after the form."
1673 ;; Insert semicolons as ballast, so that byte-compile-fix-header 1674 ;; Insert semicolons as ballast, so that byte-compile-fix-header
1674 ;; can delete them so as to keep the buffer positions 1675 ;; can delete them so as to keep the buffer positions
1675 ;; constant for the actual compiled code. 1676 ;; constant for the actual compiled code.
1676 ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\n")) 1677 ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\n"))
1677 ;; Here if we want Emacs 18 compatibility. 1678 ;; Here if we want Emacs 18 compatibility.
1678 (when dynamic-docstrings 1679 (when dynamic-docstrings
1679 (error "Version-18 compatibility doesn't support dynamic doc strings")) 1680 (error "Version-18 compatibility doesn't support dynamic doc strings"))
@@ -2978,6 +2979,8 @@ If FORM is a lambda or a macro, byte-compile it as a function."
2978(byte-defop-compiler-1 mapconcat byte-compile-funarg) 2979(byte-defop-compiler-1 mapconcat byte-compile-funarg)
2979(byte-defop-compiler-1 mapc byte-compile-funarg) 2980(byte-defop-compiler-1 mapc byte-compile-funarg)
2980(byte-defop-compiler-1 sort byte-compile-funarg-2) 2981(byte-defop-compiler-1 sort byte-compile-funarg-2)
2982(byte-defop-compiler-1 map-char-table byte-compile-funarg-2)
2983;; map-charset-chars should be funarg but has optional third arg
2981(byte-defop-compiler-1 let) 2984(byte-defop-compiler-1 let)
2982(byte-defop-compiler-1 let*) 2985(byte-defop-compiler-1 let*)
2983 2986
@@ -3626,7 +3629,7 @@ For example, invoke `emacs -batch -f batch-byte-recompile-directory .'."
3626 (or command-line-args-left 3629 (or command-line-args-left
3627 (setq command-line-args-left '("."))) 3630 (setq command-line-args-left '(".")))
3628 (while command-line-args-left 3631 (while command-line-args-left
3629 (byte-recompile-directory (car command-line-args-left) 0) 3632 (byte-recompile-directory (car command-line-args-left))
3630 (setq command-line-args-left (cdr command-line-args-left))) 3633 (setq command-line-args-left (cdr command-line-args-left)))
3631 (kill-emacs 0)) 3634 (kill-emacs 0))
3632 3635