changeset 49440:3f0a84732a62

(byte-compile-file-form-custom-declare-variable): Compile any lambda-expressions among the args.
author Richard M. Stallman <rms@gnu.org>
date Sat, 25 Jan 2003 19:44:24 +0000
parents 34b5a595fbf4
children fea7066c9e82
files lisp/emacs-lisp/bytecomp.el
diffstat 1 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/bytecomp.el	Sat Jan 25 19:43:29 2003 +0000
+++ b/lisp/emacs-lisp/bytecomp.el	Sat Jan 25 19:44:24 2003 +0000
@@ -10,7 +10,7 @@
 
 ;;; This version incorporates changes up to version 2.10 of the
 ;;; Zawinski-Furuseth compiler.
-(defconst byte-compile-version "$Revision: 2.119 $")
+(defconst byte-compile-version "$Revision: 2.120 $")
 
 ;; This file is part of GNU Emacs.
 
@@ -2073,6 +2073,19 @@
   (if (memq 'free-vars byte-compile-warnings)
       (setq byte-compile-bound-variables
 	    (cons (nth 1 (nth 1 form)) byte-compile-bound-variables)))
+  (let ((tail (nthcdr 4 form)))
+    (while tail
+      ;; If there are any (function (lambda ...)) expressions, compile
+      ;; those functions.
+      (if (and (consp (car tail))
+	       (eq (car (car tail)) 'function)
+	       (consp (nth 1 (car tail))))
+	  (setcar tail (byte-compile-lambda (nth 1 (car tail))))
+	;; Likewise for a bare lambda.
+	(if (and (consp (car tail))
+		 (eq (car (car tail)) 'lambda))
+	    (setcar tail (byte-compile-lambda (car tail)))))
+      (setq tail (cdr tail))))
   form)
 
 (put 'require 'byte-hunk-handler 'byte-compile-file-form-eval-boundary)