[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 38ec422: * test/lisp/cedet/semantic-utest: silence compiler warni
From: |
Stefan Monnier |
Subject: |
master 38ec422: * test/lisp/cedet/semantic-utest: silence compiler warnings |
Date: |
Sun, 27 Oct 2019 17:03:05 -0400 (EDT) |
branch: master
commit 38ec422a35ab6e6e295b56500bb11493cd39a10e
Author: Eric Ludlam <address@hidden>
Commit: Stefan Monnier <address@hidden>
* test/lisp/cedet/semantic-utest: silence compiler warnings
* test/lisp/cedet/semantic-utest-c.el
(semantic-test-c-preprocessor-simulation): Use with-current-buffer.
* test/lisp/cedet/semantic-utest.el (semantic-utest-makebuffer):
Use read-only-mode.
(semantic-utest-verify-names-jave, semantic-utest-verify-names-2):
Remove functions, unused.
---
test/lisp/cedet/semantic-utest-c.el | 7 +++----
test/lisp/cedet/semantic-utest.el | 25 +------------------------
2 files changed, 4 insertions(+), 28 deletions(-)
diff --git a/test/lisp/cedet/semantic-utest-c.el
b/test/lisp/cedet/semantic-utest-c.el
index a6a5fd1..05f8491 100644
--- a/test/lisp/cedet/semantic-utest-c.el
+++ b/test/lisp/cedet/semantic-utest-c.el
@@ -49,13 +49,12 @@
(dolist (fp semantic-utest-c-comparisons)
(let* ((semantic-lex-c-nested-namespace-ignore-second nil)
(tags-actual
- (save-excursion
- (set-buffer (find-file-noselect (expand-file-name (car fp)
semantic-utest-c-test-directory)))
+ (with-current-buffer
+ (find-file-noselect (expand-file-name (car fp)
semantic-utest-c-test-directory))
(semantic-clear-toplevel-cache)
(semantic-fetch-tags)))
(tags-expected
- (save-excursion
- (set-buffer (find-file-noselect (expand-file-name (cdr fp)
semantic-utest-c-test-directory)))
+ (with-current-buffer (find-file-noselect (expand-file-name (cdr fp)
semantic-utest-c-test-directory))
(semantic-clear-toplevel-cache)
(semantic-fetch-tags))))
(when (or (not tags-expected) (not tags-actual))
diff --git a/test/lisp/cedet/semantic-utest.el
b/test/lisp/cedet/semantic-utest.el
index 7303c0e..2423e89 100644
--- a/test/lisp/cedet/semantic-utest.el
+++ b/test/lisp/cedet/semantic-utest.el
@@ -492,7 +492,7 @@ Pre-fill the buffer with CONTENTS."
(set-buffer buff)
(setq buffer-offer-save nil)
(font-lock-mode -1) ;; Font lock has issues in Emacs 23
- (toggle-read-only -1) ;; In case /tmp doesn't exist.
+ (read-only-mode -1) ;; In case /tmp doesn't exist
(erase-buffer)
(insert contents)
;(semantic-fetch-tags) ;JAVE could this go here?
@@ -724,29 +724,6 @@ JAVE this thing would need to be recursive to handle java
and csharp"
(semantic-utest-taglists-equivalent-p table names skipnames)
))
-;;;;;;;;;;;;;;;;;;;;;;;;
-; JAVE redefine a new validation function
-; is not quite as good as the old one yet
-(defun semantic-utest-verify-names-jave (name-contents &optional skipnames)
- "JAVE version of `semantic-utest-verify-names'.
-NAME-CONTENTS is a sample of the tags buffer to test against.
-SKIPNAMES is a list of names to remove from NAME-CONTENTS"
- (assert (semantic-utest-verify-names-2 name-contents (semantic-fetch-tags))
- nil "failed test")
-)
-
-(defun semantic-utest-verify-names-2 (l1 l2)
- (cond ( (and (consp l1) (equal (car l1) 'overlay))
- (overlayp l2))
- ((not (consp l1))
- (equal l1 l2))
- ((consp l1)
- (and (semantic-utest-verify-names-2 (car l1) (car l2))
(semantic-utest-verify-names-2 (cdr l1) (cdr l2))))
- (t (error "internal error"))))
-
-
-
-
;;; Kill indicator line
;;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 38ec422: * test/lisp/cedet/semantic-utest: silence compiler warnings,
Stefan Monnier <=