1 |
;;; bytecomp.el --- compilation of Lisp code into byte code |
;;; bytecomp.el --- compilation of Lisp code into byte code |
2 |
|
|
3 |
;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1998, 2000, 2001 |
;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1998, 2000, 2001, 2002 |
4 |
;; Free Software Foundation, Inc. |
;; Free Software Foundation, Inc. |
5 |
|
|
6 |
;; Author: Jamie Zawinski <jwz@lucid.com> |
;; Author: Jamie Zawinski <jwz@lucid.com> |
1980 |
(stringp (car-safe (cdr-safe (cdr-safe body))))) |
(stringp (car-safe (cdr-safe (cdr-safe body))))) |
1981 |
(byte-compile-warn "probable `\"' without `\\' in doc string of %s" |
(byte-compile-warn "probable `\"' without `\\' in doc string of %s" |
1982 |
(nth 1 form)))) |
(nth 1 form)))) |
1983 |
|
|
1984 |
|
;; Generate code for declarations in macro definitions. |
1985 |
|
;; Remove declarations from the body of the macro definition. |
1986 |
|
(when macrop |
1987 |
|
(let ((tail (nthcdr 2 form))) |
1988 |
|
(when (stringp (car (cdr tail))) |
1989 |
|
(setq tail (cdr tail))) |
1990 |
|
(while (and (consp (car (cdr tail))) |
1991 |
|
(eq (car (car (cdr tail))) 'declare)) |
1992 |
|
(let ((declaration (car (cdr tail)))) |
1993 |
|
(setcdr tail (cdr (cdr tail))) |
1994 |
|
(princ `(if macro-declaration-function |
1995 |
|
(funcall macro-declaration-function |
1996 |
|
',name ',declaration)) |
1997 |
|
outbuffer))))) |
1998 |
|
|
1999 |
(let* ((new-one (byte-compile-lambda (cons 'lambda (nthcdr 2 form)))) |
(let* ((new-one (byte-compile-lambda (cons 'lambda (nthcdr 2 form)))) |
2000 |
(code (byte-compile-byte-code-maker new-one))) |
(code (byte-compile-byte-code-maker new-one))) |
2001 |
(if this-one |
(if this-one |