summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/edebug.el17
-rw-r--r--lisp/emacs-lisp/lisp-mode.el26
2 files changed, 21 insertions, 22 deletions
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 77953b37021..4dfccb4c5b4 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -521,7 +521,7 @@ the minibuffer."
((and (eq (car form) 'defcustom)
(default-boundp (nth 1 form)))
;; Force variable to be bound.
- (set-default (nth 1 form) (eval (nth 2 form))))
+ (set-default (nth 1 form) (eval (nth 2 form) lexical-binding)))
((eq (car form) 'defface)
;; Reset the face.
(setq face-new-frame-defaults
@@ -534,7 +534,7 @@ the minibuffer."
(put ',(nth 1 form) 'customized-face
,(nth 2 form)))
(put (nth 1 form) 'saved-face nil)))))
- (setq edebug-result (eval form))
+ (setq edebug-result (eval form lexical-binding))
(if (not edebugging)
(princ edebug-result)
edebug-result)))
@@ -2466,6 +2466,7 @@ MSG is printed after `::::} '."
(if edebug-global-break-condition
(condition-case nil
(setq edebug-global-break-result
+ ;; FIXME: lexbind.
(eval edebug-global-break-condition))
(error nil))))
(edebug-break))
@@ -2477,6 +2478,7 @@ MSG is printed after `::::} '."
(and edebug-break-data
(or (not edebug-break-condition)
(setq edebug-break-result
+ ;; FIXME: lexbind.
(eval edebug-break-condition))))))
(if (and edebug-break
(nth 2 edebug-break-data)) ; is it temporary?
@@ -3637,9 +3639,10 @@ Return the result of the last expression."
(defun edebug-eval (edebug-expr)
;; Are there cl lexical variables active?
- (if (bound-and-true-p cl-debug-env)
- (eval (cl-macroexpand-all edebug-expr cl-debug-env))
- (eval edebug-expr)))
+ (eval (if (bound-and-true-p cl-debug-env)
+ (cl-macroexpand-all edebug-expr cl-debug-env)
+ edebug-expr)
+ lexical-binding)) ;; FIXME: lexbind.
(defun edebug-safe-eval (edebug-expr)
;; Evaluate EXPR safely.
@@ -4241,8 +4244,8 @@ It is removed when you hit any char."
;;; Menus
(defun edebug-toggle (variable)
- (set variable (not (eval variable)))
- (message "%s: %s" variable (eval variable)))
+ (set variable (not (symbol-value variable)))
+ (message "%s: %s" variable (symbol-value variable)))
;; We have to require easymenu (even for Emacs 18) just so
;; the easy-menu-define macro call is compiled correctly.
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index c90d1394978..2cdbd115928 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -699,16 +699,9 @@ If CHAR is not a character, return nil."
(defun eval-last-sexp-1 (eval-last-sexp-arg-internal)
"Evaluate sexp before point; print value in minibuffer.
With argument, print output into current buffer."
- (let ((standard-output (if eval-last-sexp-arg-internal (current-buffer) t))
- ;; preserve the current lexical environment
- (internal-interpreter-environment internal-interpreter-environment))
+ (let ((standard-output (if eval-last-sexp-arg-internal (current-buffer) t)))
;; Setup the lexical environment if lexical-binding is enabled.
- ;; Note that `internal-interpreter-environment' _can't_ be both
- ;; assigned and let-bound above -- it's treated specially (and
- ;; oddly) by the interpreter!
- (when lexical-binding
- (setq internal-interpreter-environment '(t)))
- (eval-last-sexp-print-value (eval (preceding-sexp)))))
+ (eval-last-sexp-print-value (eval (preceding-sexp) lexical-binding))))
(defun eval-last-sexp-print-value (value)
@@ -772,16 +765,18 @@ Reinitialize the face according to the `defface' specification."
;; `defcustom' is now macroexpanded to
;; `custom-declare-variable' with a quoted value arg.
((and (eq (car form) 'custom-declare-variable)
- (default-boundp (eval (nth 1 form))))
+ (default-boundp (eval (nth 1 form) lexical-binding)))
;; Force variable to be bound.
- (set-default (eval (nth 1 form)) (eval (nth 1 (nth 2 form))))
+ (set-default (eval (nth 1 form) lexical-binding)
+ (eval (nth 1 (nth 2 form)) lexical-binding))
form)
;; `defface' is macroexpanded to `custom-declare-face'.
((eq (car form) 'custom-declare-face)
;; Reset the face.
(setq face-new-frame-defaults
- (assq-delete-all (eval (nth 1 form)) face-new-frame-defaults))
- (put (eval (nth 1 form)) 'face-defface-spec nil)
+ (assq-delete-all (eval (nth 1 form) lexical-binding)
+ face-new-frame-defaults))
+ (put (eval (nth 1 form) lexical-binding) 'face-defface-spec nil)
;; Setting `customized-face' to the new spec after calling
;; the form, but preserving the old saved spec in `saved-face',
;; imitates the situation when the new face spec is set
@@ -792,10 +787,11 @@ Reinitialize the face according to the `defface' specification."
;; `defface' change the spec, regardless of a saved spec.
(prog1 `(prog1 ,form
(put ,(nth 1 form) 'saved-face
- ',(get (eval (nth 1 form)) 'saved-face))
+ ',(get (eval (nth 1 form) lexical-binding)
+ 'saved-face))
(put ,(nth 1 form) 'customized-face
,(nth 2 form)))
- (put (eval (nth 1 form)) 'saved-face nil)))
+ (put (eval (nth 1 form) lexical-binding) 'saved-face nil)))
((eq (car form) 'progn)
(cons 'progn (mapcar 'eval-defun-1 (cdr form))))
(t form)))