changeset 24024:2981304f5015

(edebug-eval-defun): Deal with defcustom like eval-defun does.
author Dave Love <fx@gnu.org>
date Thu, 07 Jan 1999 19:45:32 +0000
parents 4d7de66c650e
children 547ceb9e069c
files lisp/emacs-lisp/edebug.el
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/edebug.el	Thu Jan 07 19:40:25 1999 +0000
+++ b/lisp/emacs-lisp/edebug.el	Thu Jan 07 19:45:32 1999 +0000
@@ -1,6 +1,6 @@
 ;;; edebug.el --- a source-level debugger for Emacs Lisp
 
-;; Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 1997
+;; Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 97, 1999
 ;;       Free Software Foundation, Inc.
 
 ;; Author: Daniel LaLiberte <dlaliberte@gte.com>
@@ -558,9 +558,14 @@
 	  (let ((edebug-all-forms edebugging)
 		(edebug-all-defs (eq edebug-all-defs (not edebug-it))))
 	    (edebug-read-top-level-form))))
-    (if (and (eq (car form) 'defvar)
-	     (cdr-safe (cdr-safe form)))
-	(setq form (cons 'defconst (cdr form))))
+    (cond ((and (eq (car form) 'defvar)
+		(cdr-safe (cdr-safe form)))
+	   ;; Force variable to be bound.
+	   (setq form (cons 'defconst (cdr form))))
+	  ((and (eq (car form) 'defcustom)
+		(default-boundp (nth 1 form)))
+	   ;; Force variable to be bound.
+	   (set-default (nth 1 form) (eval (nth 2 form)))))
     (setq edebug-result (eval form))
     (if (not edebugging)
 	(princ edebug-result)