diff options
author | Richard M. Stallman <rms@gnu.org> | 2003-01-25 19:44:24 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2003-01-25 19:44:24 +0000 |
commit | 347a36bc5bd7d078c83da6a83397738f839c58b7 (patch) | |
tree | 903d9febd06d363e0ef5289aad086abc152f12d1 /lisp/emacs-lisp | |
parent | 4790accb2a91a699c9b148462259c1b9da3f3b59 (diff) | |
download | emacs-347a36bc5bd7d078c83da6a83397738f839c58b7.tar.gz emacs-347a36bc5bd7d078c83da6a83397738f839c58b7.tar.bz2 emacs-347a36bc5bd7d078c83da6a83397738f839c58b7.zip |
(byte-compile-file-form-custom-declare-variable):
Compile any lambda-expressions among the args.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 7f0513c4c46..3a0e7da2b1c 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -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 @@ list that represents a doc string reference. (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) |