;;; bytecomp.el --- compilation of Lisp code into byte code
-;; Copyright (C) 1985,86,87,92,94,1998,2000,01,02,03,2004
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1998, 2000, 2001, 2002,
+;; 2003, 2004 Free Software Foundation, Inc.
;; Author: Jamie Zawinski <jwz@lucid.com>
;; Hallvard Furuseth <hbf@ulrik.uio.no>
(if cons
(or (memq n (cdr cons))
(setcdr cons (cons n (cdr cons))))
- (setq byte-compile-unresolved-functions
- (cons (list (car form) n)
- byte-compile-unresolved-functions)))))))
+ (push (list (car form) n)
+ byte-compile-unresolved-functions))))))
(defun byte-compile-format-warn (form)
"Warn if FORM is `format'-like with inconsistent args.
(eq (car (nth 1 form)) 'quote)
(consp (cdr (nth 1 form)))
(symbolp (nth 1 (nth 1 form))))
- (add-to-list 'byte-compile-function-environment
- (cons (nth 1 (nth 1 form))
- (cons 'autoload (cdr (cdr form))))))
+ (push (cons (nth 1 (nth 1 form))
+ (cons 'autoload (cdr (cdr form))))
+ byte-compile-function-environment))
(if (stringp (nth 3 form))
form
;; No doc string, so we can compile this as a normal form.
(byte-defop-compiler-1 defconst byte-compile-defvar)
(byte-defop-compiler-1 autoload)
(byte-defop-compiler-1 lambda byte-compile-lambda-form)
-(byte-defop-compiler-1 defalias)
(defun byte-compile-defun (form)
;; This is not used for file-level defuns with doc strings.
(error "`lambda' used as function name is invalid"))
;; Compile normally, but deal with warnings for the function being defined.
-(defun byte-compile-defalias (form)
+(put 'defalias 'byte-hunk-handler 'byte-compile-file-form-defalias)
+(defun byte-compile-file-form-defalias (form)
(if (and (consp (cdr form)) (consp (nth 1 form))
(eq (car (nth 1 form)) 'quote)
(consp (cdr (nth 1 form)))
(consp (cdr (nth 2 form)))
(symbolp (nth 1 (nth 2 form))))))
(byte-compile-defalias-warn (nth 1 (nth 1 form)))
- (setq byte-compile-function-environment
- (cons (cons (nth 1 (nth 1 form))
- (if constant (nth 1 (nth 2 form)) t))
- byte-compile-function-environment))))
+ (push (cons (nth 1 (nth 1 form))
+ (if constant (nth 1 (nth 2 form)) t))
+ byte-compile-function-environment)))
(byte-compile-normal-call form))
;; Turn off warnings about prior calls to the function being defalias'd.
(run-hooks 'bytecomp-load-hook)
-;;; arch-tag: 9c97b0f0-8745-4571-bfc3-8dceb677292a
+;; arch-tag: 9c97b0f0-8745-4571-bfc3-8dceb677292a
;;; bytecomp.el ends here