summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/emacs-lisp/bytecomp.el16
2 files changed, 12 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5a5b7ef44dc..053eb95329c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2010-12-14 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/bytecomp.el (byte-compile-condition-case): Use push.
+
2010-12-13 Stefan Monnier <monnier@iro.umontreal.ca>
* subr.el (with-lexical-binding): Remove.
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 90fcf7fb8a6..0f7018b9b64 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -2979,6 +2979,7 @@ If FORM is a lambda or a macro, byte-compile it as a function."
;; Given BYTECOMP-BODY, compile it and return a new body.
(defun byte-compile-top-level-body (bytecomp-body &optional for-effect)
+ ;; FIXME: lexbind. Check all callers!
(setq bytecomp-body
(byte-compile-top-level (cons 'progn bytecomp-body) for-effect t))
(cond ((eq (car-safe bytecomp-body) 'progn)
@@ -4083,8 +4084,8 @@ if LFORMINFO is nil (meaning all bindings are dynamic)."
(defun byte-compile-track-mouse (form)
(byte-compile-form
- `(funcall '(lambda nil
- (track-mouse ,@(byte-compile-top-level-body (cdr form)))))))
+ `(funcall #'(lambda nil
+ (track-mouse ,@(byte-compile-top-level-body (cdr form)))))))
(defun byte-compile-condition-case (form)
(let* ((var (nth 1 form))
@@ -4121,11 +4122,10 @@ if LFORMINFO is nil (meaning all bindings are dynamic)."
;; "`%s' is not a known condition name (in condition-case)"
;; condition))
)
- (setq compiled-clauses
- (cons (cons condition
- (byte-compile-top-level-body
- (cdr clause) for-effect))
- compiled-clauses)))
+ (push (cons condition
+ (byte-compile-top-level-body
+ (cdr clause) for-effect))
+ compiled-clauses))
(setq clauses (cdr clauses)))
(byte-compile-push-constant (nreverse compiled-clauses)))
(byte-compile-out 'byte-condition-case 0)))
@@ -4244,7 +4244,7 @@ if LFORMINFO is nil (meaning all bindings are dynamic)."
`(if (not (default-boundp ',var)) (setq-default ,var ,value))))
(when (eq fun 'defconst)
;; This will signal an appropriate error at runtime.
- `(eval ',form)))
+ `(eval ',form))) ;FIXME: lexbind
`',var))))
(defun byte-compile-autoload (form)