comparison lisp/emacs-lisp/edebug.el @ 44518:952fba35f036

(edebug-eval-defun): Don't use defconst on variables.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 12 Apr 2002 03:20:46 +0000
parents 7a8a9f274e2c
children f9f0026b4c12
comparison
equal deleted inserted replaced
44517:5496c590d5ad 44518:952fba35f036
509 (form 509 (form
510 (let ((edebug-all-forms edebugging) 510 (let ((edebug-all-forms edebugging)
511 (edebug-all-defs (eq edebug-all-defs (not edebug-it)))) 511 (edebug-all-defs (eq edebug-all-defs (not edebug-it))))
512 (edebug-read-top-level-form)))) 512 (edebug-read-top-level-form))))
513 ;; This should be consistent with `eval-defun-1', but not the 513 ;; This should be consistent with `eval-defun-1', but not the
514 ;; same, since that gets a macroexpended form. 514 ;; same, since that gets a macroexpanded form.
515 (cond ((and (eq (car form) 'defvar) 515 (cond ((and (eq (car form) 'defvar)
516 (cdr-safe (cdr-safe form))) 516 (cdr-safe (cdr-safe form)))
517 ;; Force variable to be bound. 517 ;; Force variable to be bound.
518 (setq form (cons 'defconst (cdr form)))) 518 (makunbound (nth 1 form)))
519 ((and (eq (car form) 'defcustom) 519 ((and (eq (car form) 'defcustom)
520 (default-boundp (nth 1 form))) 520 (default-boundp (nth 1 form)))
521 ;; Force variable to be bound. 521 ;; Force variable to be bound.
522 (set-default (nth 1 form) (eval (nth 2 form))))) 522 (set-default (nth 1 form) (eval (nth 2 form)))))
523 (setq edebug-result (eval form)) 523 (setq edebug-result (eval form))