changeset 6217:bc0db1c2790e

(byte-compile-track-mouse): Handle >1 body form. Generate code that binds track-mouse.
author Richard M. Stallman <rms@gnu.org>
date Sat, 05 Mar 1994 23:27:51 +0000
parents 9f7708f75f17
children f4d5338c2142
files lisp/emacs-lisp/bytecomp.el
diffstat 1 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/bytecomp.el	Sat Mar 05 23:26:52 1994 +0000
+++ b/lisp/emacs-lisp/bytecomp.el	Sat Mar 05 23:27:51 1994 +0000
@@ -2689,13 +2689,11 @@
   (byte-compile-out 'byte-unbind 1))
 
 (defun byte-compile-track-mouse (form)
-  (byte-compile-form
-   (list
-    'funcall
-    (list 'quote
-	  (list 'lambda nil
-		(list 'track-mouse
-		      (byte-compile-top-level (nth 1 form))))))))
+  (let ((byte-compile-bound-variables byte-compile-bound-variables))
+    (byte-compile-push-constant t)
+    (byte-compile-variable-ref 'byte-varbind 'track-mouse)
+    (byte-compile-body-do-effect (cdr form))
+    (byte-compile-out 'byte-unbind 1)))
 
 (defun byte-compile-condition-case (form)
   (let* ((var (nth 1 form))