aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2004-11-11 22:44:46 +0000
committerStefan Monnier2004-11-11 22:44:46 +0000
commit977b50fb122c5480ec19d25ee4f4bb33dec0ddfb (patch)
treeded79f3eaa73693c934874e1daf1c4e66cc79938
parentbe4b3ae8beb76dac0ed37fcfde2b84fc872602a1 (diff)
downloademacs-977b50fb122c5480ec19d25ee4f4bb33dec0ddfb.tar.gz
emacs-977b50fb122c5480ec19d25ee4f4bb33dec0ddfb.zip
Use push.
(byte-compile-file-form-defalias): Rename from byte-compile-defalias. (defalias): Remove the `byte-compile' property and add a `byte-hunk-handler'.
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/emacs-lisp/bytecomp.el28
2 files changed, 21 insertions, 16 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 23ab5b5d4ef..c2a6313752f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12004-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * emacs-lisp/bytecomp.el: Use push.
4 (byte-compile-file-form-defalias): Rename from byte-compile-defalias.
5 (defalias): Remove the `byte-compile' property and add
6 a `byte-hunk-handler'.
7
12004-11-11 Juri Linkov <juri@jurta.org> 82004-11-11 Juri Linkov <juri@jurta.org>
2 9
3 * info.el (Info-search): Save match data for isearch. 10 * info.el (Info-search): Save match data for isearch.
@@ -36,7 +43,7 @@
362004-11-11 Jay Belanger <belanger@truman.edu> 432004-11-11 Jay Belanger <belanger@truman.edu>
37 44
38 * calc/calc-ext.el (math-defcache): Use defvar for the new 45 * calc/calc-ext.el (math-defcache): Use defvar for the new
39 variables it creates. 46 variables it creates.
40 47
412004-11-11 Lars Hansen <larsh@math.ku.dk> 482004-11-11 Lars Hansen <larsh@math.ku.dk>
42 49
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index cb34b818107..ee29039e05e 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1,7 +1,7 @@
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,86,87,92,94,1998,2000,01,02,03,2004 3;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1998, 2000, 2001, 2002,
4;; Free Software Foundation, Inc. 4;; 2003, 2004 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>
@@ -1215,9 +1215,8 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'."
1215 (if cons 1215 (if cons
1216 (or (memq n (cdr cons)) 1216 (or (memq n (cdr cons))
1217 (setcdr cons (cons n (cdr cons)))) 1217 (setcdr cons (cons n (cdr cons))))
1218 (setq byte-compile-unresolved-functions 1218 (push (list (car form) n)
1219 (cons (list (car form) n) 1219 byte-compile-unresolved-functions))))))
1220 byte-compile-unresolved-functions)))))))
1221 1220
1222(defun byte-compile-format-warn (form) 1221(defun byte-compile-format-warn (form)
1223 "Warn if FORM is `format'-like with inconsistent args. 1222 "Warn if FORM is `format'-like with inconsistent args.
@@ -2129,9 +2128,9 @@ list that represents a doc string reference.
2129 (eq (car (nth 1 form)) 'quote) 2128 (eq (car (nth 1 form)) 'quote)
2130 (consp (cdr (nth 1 form))) 2129 (consp (cdr (nth 1 form)))
2131 (symbolp (nth 1 (nth 1 form)))) 2130 (symbolp (nth 1 (nth 1 form))))
2132 (add-to-list 'byte-compile-function-environment 2131 (push (cons (nth 1 (nth 1 form))
2133 (cons (nth 1 (nth 1 form)) 2132 (cons 'autoload (cdr (cdr form))))
2134 (cons 'autoload (cdr (cdr form)))))) 2133 byte-compile-function-environment))
2135 (if (stringp (nth 3 form)) 2134 (if (stringp (nth 3 form))
2136 form 2135 form
2137 ;; No doc string, so we can compile this as a normal form. 2136 ;; No doc string, so we can compile this as a normal form.
@@ -3614,7 +3613,6 @@ being undefined will be suppressed."
3614(byte-defop-compiler-1 defconst byte-compile-defvar) 3613(byte-defop-compiler-1 defconst byte-compile-defvar)
3615(byte-defop-compiler-1 autoload) 3614(byte-defop-compiler-1 autoload)
3616(byte-defop-compiler-1 lambda byte-compile-lambda-form) 3615(byte-defop-compiler-1 lambda byte-compile-lambda-form)
3617(byte-defop-compiler-1 defalias)
3618 3616
3619(defun byte-compile-defun (form) 3617(defun byte-compile-defun (form)
3620 ;; This is not used for file-level defuns with doc strings. 3618 ;; This is not used for file-level defuns with doc strings.
@@ -3716,7 +3714,8 @@ being undefined will be suppressed."
3716 (error "`lambda' used as function name is invalid")) 3714 (error "`lambda' used as function name is invalid"))
3717 3715
3718;; Compile normally, but deal with warnings for the function being defined. 3716;; Compile normally, but deal with warnings for the function being defined.
3719(defun byte-compile-defalias (form) 3717(put 'defalias 'byte-hunk-handler 'byte-compile-file-form-defalias)
3718(defun byte-compile-file-form-defalias (form)
3720 (if (and (consp (cdr form)) (consp (nth 1 form)) 3719 (if (and (consp (cdr form)) (consp (nth 1 form))
3721 (eq (car (nth 1 form)) 'quote) 3720 (eq (car (nth 1 form)) 'quote)
3722 (consp (cdr (nth 1 form))) 3721 (consp (cdr (nth 1 form)))
@@ -3728,10 +3727,9 @@ being undefined will be suppressed."
3728 (consp (cdr (nth 2 form))) 3727 (consp (cdr (nth 2 form)))
3729 (symbolp (nth 1 (nth 2 form)))))) 3728 (symbolp (nth 1 (nth 2 form))))))
3730 (byte-compile-defalias-warn (nth 1 (nth 1 form))) 3729 (byte-compile-defalias-warn (nth 1 (nth 1 form)))
3731 (setq byte-compile-function-environment 3730 (push (cons (nth 1 (nth 1 form))
3732 (cons (cons (nth 1 (nth 1 form)) 3731 (if constant (nth 1 (nth 2 form)) t))
3733 (if constant (nth 1 (nth 2 form)) t)) 3732 byte-compile-function-environment)))
3734 byte-compile-function-environment))))
3735 (byte-compile-normal-call form)) 3733 (byte-compile-normal-call form))
3736 3734
3737;; Turn off warnings about prior calls to the function being defalias'd. 3735;; Turn off warnings about prior calls to the function being defalias'd.
@@ -4116,5 +4114,5 @@ For example, invoke `emacs -batch -f batch-byte-recompile-directory .'."
4116 4114
4117(run-hooks 'bytecomp-load-hook) 4115(run-hooks 'bytecomp-load-hook)
4118 4116
4119;;; arch-tag: 9c97b0f0-8745-4571-bfc3-8dceb677292a 4117;; arch-tag: 9c97b0f0-8745-4571-bfc3-8dceb677292a
4120;;; bytecomp.el ends here 4118;;; bytecomp.el ends here