changeset 5388:95ef89411635

(eval-current-buffer): Old definition deleted. (eval-buffer): Use current buffer by default.
author Richard M. Stallman <rms@gnu.org>
date Fri, 31 Dec 1993 12:42:06 +0000
parents f99b0175322e
children 09148c696fa2
files lisp/emacs-lisp/edebug.el
diffstat 1 files changed, 8 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- 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