aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/emacs/erlang-eunit.el
diff options
context:
space:
mode:
authorJohan Claesson <[email protected]>2018-09-15 23:14:47 +0200
committerDan Gudmundsson <[email protected]>2018-10-09 11:57:01 +0200
commit02e3a9b162a1fe193c271cd0db7a99c326b63844 (patch)
treeba9b693e0a82a7c9c4a3ac42455b613f3bc4e3f1 /lib/tools/emacs/erlang-eunit.el
parent8755c68695ee5c672a4105077ac2e5953939d528 (diff)
downloadotp-02e3a9b162a1fe193c271cd0db7a99c326b63844.tar.gz
otp-02e3a9b162a1fe193c271cd0db7a99c326b63844.tar.bz2
otp-02e3a9b162a1fe193c271cd0db7a99c326b63844.zip
Emacs: do not accept compiler warnings in selected elisp files
Diffstat (limited to 'lib/tools/emacs/erlang-eunit.el')
-rw-r--r--lib/tools/emacs/erlang-eunit.el10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/tools/emacs/erlang-eunit.el b/lib/tools/emacs/erlang-eunit.el
index 38c40927f4..53543d7b01 100644
--- a/lib/tools/emacs/erlang-eunit.el
+++ b/lib/tools/emacs/erlang-eunit.el
@@ -23,6 +23,7 @@
(eval-when-compile
(require 'cl))
+(require 'erlang)
(defvar erlang-eunit-src-candidate-dirs '("../src" ".")
"*Name of directories which to search for source files matching
@@ -331,8 +332,7 @@ With prefix arg, compiles for debug and runs tests with the verbose flag set."
t)
(apply test-fun test-args)
(if under-cover
- (save-excursion
- (set-buffer (find-file-noselect src-filename))
+ (with-current-buffer (find-file-noselect src-filename)
(erlang-eunit-analyze-coverage)))))))
(defun erlang-eunit-compile-and-run-module-tests-under-cover ()
@@ -348,8 +348,7 @@ With prefix arg, compiles for debug and runs tests with the verbose flag set."
(defun erlang-eunit-compile-file (file-path &optional under-cover)
(if (file-readable-p file-path)
- (save-excursion
- (set-buffer (find-file-noselect file-path))
+ (with-current-buffer (find-file-noselect file-path)
;; In order to run a code coverage analysis on a
;; module, we have two options:
;;
@@ -376,8 +375,7 @@ With prefix arg, compiles for debug and runs tests with the verbose flag set."
(error msg))))
(defun erlang-eunit-last-compilation-successful-p ()
- (save-excursion
- (set-buffer inferior-erlang-buffer)
+ (with-current-buffer inferior-erlang-buffer
(goto-char compilation-parsing-end)
(erlang-eunit-all-list-elems-fulfill-p
(lambda (re) (let ((continue t)