From: Dave Love Date: Thu, 7 Jan 1999 19:45:32 +0000 (+0000) Subject: (edebug-eval-defun): Deal with defcustom X-Git-Tag: emacs-20.4~925 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6b33933225f5e9b11e85d4d89dd41cd7d227538d;p=emacs.git (edebug-eval-defun): Deal with defcustom like eval-defun does. --- diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index a1c7b1e3a03..4312f771c36 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -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 @@ -558,9 +558,14 @@ Otherwise, it prints in the minibuffer." (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)