[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/bytecomp.el
From: |
Gerd Moellmann |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/bytecomp.el |
Date: |
Sun, 24 Mar 2002 14:47:28 -0500 |
Index: emacs/lisp/emacs-lisp/bytecomp.el
diff -c emacs/lisp/emacs-lisp/bytecomp.el:2.95
emacs/lisp/emacs-lisp/bytecomp.el:2.96
*** emacs/lisp/emacs-lisp/bytecomp.el:2.95 Fri Mar 22 18:05:26 2002
--- emacs/lisp/emacs-lisp/bytecomp.el Sun Mar 24 14:47:26 2002
***************
*** 1,6 ****
;;; bytecomp.el --- compilation of Lisp code into byte code
! ;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1998, 2000, 2001
;; Free Software Foundation, Inc.
;; Author: Jamie Zawinski <address@hidden>
--- 1,6 ----
;;; bytecomp.el --- compilation of Lisp code into byte code
! ;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1998, 2000, 2001, 2002
;; Free Software Foundation, Inc.
;; Author: Jamie Zawinski <address@hidden>
***************
*** 10,16 ****
;;; This version incorporates changes up to version 2.10 of the
;;; Zawinski-Furuseth compiler.
! (defconst byte-compile-version "$Revision: 2.95 $")
;; This file is part of GNU Emacs.
--- 10,16 ----
;;; This version incorporates changes up to version 2.10 of the
;;; Zawinski-Furuseth compiler.
! (defconst byte-compile-version "$Revision: 2.96 $")
;; This file is part of GNU Emacs.
***************
*** 1980,1985 ****
--- 1980,2001 ----
(stringp (car-safe (cdr-safe (cdr-safe body)))))
(byte-compile-warn "probable `\"' without `\\' in doc string of %s"
(nth 1 form))))
+
+ ;; Generate code for declarations in macro definitions.
+ ;; Remove declarations from the body of the macro definition.
+ (when macrop
+ (let ((tail (nthcdr 2 form)))
+ (when (stringp (car (cdr tail)))
+ (setq tail (cdr tail)))
+ (while (and (consp (car (cdr tail)))
+ (eq (car (car (cdr tail))) 'declare))
+ (let ((declaration (car (cdr tail))))
+ (setcdr tail (cdr (cdr tail)))
+ (princ `(if macro-declaration-function
+ (funcall macro-declaration-function
+ ',name ',declaration))
+ outbuffer)))))
+
(let* ((new-one (byte-compile-lambda (cons 'lambda (nthcdr 2 form))))
(code (byte-compile-byte-code-maker new-one)))
(if this-one