# HG changeset patch # User Richard M. Stallman # Date 757341726 0 # Node ID 95ef894116354a6f202fda70ef3a1759bdb58cf1 # Parent f99b0175322ea6566074e2ba9716b15b9d546b52 (eval-current-buffer): Old definition deleted. (eval-buffer): Use current buffer by default. diff -r f99b0175322e -r 95ef89411635 lisp/emacs-lisp/edebug.el --- a/lisp/emacs-lisp/edebug.el Fri Dec 31 10:42:30 1993 +0000 +++ b/lisp/emacs-lisp/edebug.el Fri Dec 31 12:42:06 1993 +0000 @@ -398,7 +398,7 @@ (defun eval-region (edebug-e-r-start edebug-e-r-end &optional edebug-e-r-output) - "Edebug replacement for eval-defun. + "Edebug replacement for eval-region. Like eval-region, but call edebug-defun for defuns or defmacros. Also, this eval-region does not narrow to the region and if an error occurs, point is left at the error." @@ -463,25 +463,18 @@ )) -(defun edebug-eval-current-buffer (&optional edebug-e-c-b-output) - "Call eval-region on the whole buffer." +(defun edebug-eval-buffer (&optional buffer edebug-e-c-b-output) + "Edebug replacement for eval-buffer. +Execute the current buffer as Lisp code using eval-region. See +eval-region for reasons why this function is redefined by edebug." (interactive) - (eval-region (point-min) (point-max) edebug-e-c-b-output)) - -(defun edebug-eval-buffer (&optional buffer edebug-e-c-b-output) - "Call eval-region on the whole buffer." - (interactive "bEval buffer: ") + (or buffer + (setq buffer (current-buffer))) (save-excursion (set-buffer buffer) (eval-region (point-min) (point-max) edebug-e-c-b-output))) -;; The standard eval-current-buffer doesn't use eval-region. -(if (and (fboundp 'eval-current-buffer) - (not (fboundp 'edebug-emacs-eval-current-buffer))) - (progn - (fset 'edebug-emacs-eval-current-buffer - (symbol-function 'eval-current-buffer)) - (fset 'eval-current-buffer 'edebug-eval-current-buffer))) +;; The standard eval-buffer doesn't use eval-region. (if (and (fboundp 'eval-buffer) (not (fboundp 'edebug-emacs-eval-buffer))) (progn