]> git.eshelyaron.com Git - emacs.git/commitdiff
* emacs-lisp/ert.el (ert-run-tests-batch): Remove unused variable.
authorChristian Ohler <ohler@gnu.org>
Sun, 20 Mar 2011 10:17:10 +0000 (21:17 +1100)
committerChristian Ohler <ohler@gnu.org>
Sun, 20 Mar 2011 10:17:10 +0000 (21:17 +1100)
(ert-delete-all-tests): Use `called-interactively-p' rather than
`interactive-p'.
(ert--make-xrefs-region): Respect END.

lisp/ChangeLog
lisp/emacs-lisp/ert.el

index a60ce0be6722f4fb64e458badd99e7b2479ef424..4e71d355886bbb4254181fa7baed46ff47629e13 100644 (file)
@@ -1,3 +1,10 @@
+2011-03-20  Christian Ohler  <ohler@gnu.org>
+
+       * emacs-lisp/ert.el (ert-run-tests-batch): Remove unused variable.
+       (ert-delete-all-tests): Use `called-interactively-p' rather than
+       `interactive-p'.
+       (ert--make-xrefs-region): Respect END.
+
 2011-03-19  Chong Yidong  <cyd@stupidchicken.com>
 
        * dired-aux.el (dired-create-directory): Signal an error if the
index 5bd8fd01b1ebcd30d045c8f4704c9920a38cd102..b2e20843856bc3f4ad6f02942563bcb170a0451b 100644 (file)
@@ -1482,9 +1482,8 @@ Returns the stats object."
                  (let ((print-escape-newlines t)
                        (print-level 5)
                        (print-length 10))
-                   (let ((begin (point)))
-                     (ert--pp-with-indentation-and-newline
-                      (ert-test-result-with-condition-condition result))))
+                   (ert--pp-with-indentation-and-newline
+                    (ert-test-result-with-condition-condition result)))
                  (goto-char (1- (point-max)))
                  (assert (looking-at "\n"))
                  (delete-char 1)
@@ -1603,7 +1602,7 @@ Nothing more than an interactive interface to `ert-make-test-unbound'."
 (defun ert-delete-all-tests ()
   "Make all symbols in `obarray' name no test."
   (interactive)
-  (when (interactive-p)
+  (when (called-interactively-p 'any)
     (unless (y-or-n-p "Delete all tests? ")
       (error "Aborted")))
   ;; We can't use `ert-select-tests' here since that gives us only
@@ -1793,7 +1792,7 @@ EWOC and STATS are arguments for `ert--results-update-stats-display'."
 BEGIN and END specify a region in the current buffer."
   (save-excursion
     (save-restriction
-      (narrow-to-region begin (point))
+      (narrow-to-region begin end)
       ;; Inhibit optimization in `debugger-make-xrefs' that would
       ;; sometimes insert unrelated backtrace info into our buffer.
       (let ((debugger-previous-backtrace nil))