aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2009-09-20 03:44:02 +0000
committerChong Yidong2009-09-20 03:44:02 +0000
commit00999a2ef0648870573dcb3a3866c6401db8bc28 (patch)
tree208a115701fffc358811e9612c99c874484abd2b
parent1eac105a705a5d055f38e2734c16101d0f550112 (diff)
downloademacs-00999a2ef0648870573dcb3a3866c6401db8bc28.tar.gz
emacs-00999a2ef0648870573dcb3a3866c6401db8bc28.zip
* files.el (auto-mode-alist): Use emacs-lisp-mode for Project.ede.
* cedet/semantic/bovine/gcc.el (semantic-gcc-test-output-parser) (semantic-gcc-test-output-parser-this-machine): * cedet/semantic/symref/filter.el (semantic-symref-test-count-hits-in-tag): * cedet/semantic/db-global.el (semanticdb-test-gnu-global): * cedet/semantic/tag-write.el (semantic-tag-write-test) (semantic-tag-write-list-test): * cedet/semantic/lex-spp.el (semantic-lex-spp-write-test) (semantic-lex-spp-write-utest): * cedet/semantic/lex.el (semantic-lex-test-region) (semantic-lex-test-full-depth): * cedet/semantic/idle.el (semantic-idle-pnf-test): * cedet/semantic/fw.el (semantic-test-data-cache) (semantic-test-throw-on-input): * cedet/semantic/format.el (semantic-test-all-format-tag-functions): * cedet/semantic/complete.el (semantic-complete-test): * cedet/semantic/db-ebrowse.el (semanticdb-ebrowse-run-tests) (semanticdb-ebrowse-dump): Test functions moved to semantic-tests.el in the test/ directory. * cedet/semantic/db-ref.el (semanticdb-ref-test): Doc fix.
-rw-r--r--lisp/ChangeLog25
-rw-r--r--lisp/cedet/semantic.el8
-rw-r--r--lisp/cedet/semantic/bovine/gcc.el105
-rw-r--r--lisp/cedet/semantic/complete.el11
-rw-r--r--lisp/cedet/semantic/db-ebrowse.el43
-rw-r--r--lisp/cedet/semantic/db-global.el34
-rw-r--r--lisp/cedet/semantic/db-ref.el2
-rw-r--r--lisp/cedet/semantic/format.el27
-rw-r--r--lisp/cedet/semantic/fw.el33
-rw-r--r--lisp/cedet/semantic/idle.el9
-rw-r--r--lisp/cedet/semantic/lex-spp.el20
-rw-r--r--lisp/cedet/semantic/lex.el32
-rw-r--r--lisp/cedet/semantic/symref/filter.el28
-rw-r--r--lisp/cedet/semantic/tag-write.el15
-rw-r--r--lisp/files.el1
15 files changed, 30 insertions, 363 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d50154ad512..de47dbd2940 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,28 @@
12009-09-20 Chong Yidong <cyd@stupidchicken.com>
2
3 * files.el (auto-mode-alist): Use emacs-lisp-mode for Project.ede.
4
5 * cedet/semantic/bovine/gcc.el (semantic-gcc-test-output-parser)
6 (semantic-gcc-test-output-parser-this-machine):
7 * cedet/semantic/symref/filter.el (semantic-symref-test-count-hits-in-tag):
8 * cedet/semantic/db-global.el (semanticdb-test-gnu-global):
9 * cedet/semantic/tag-write.el (semantic-tag-write-test)
10 (semantic-tag-write-list-test):
11 * cedet/semantic/lex-spp.el (semantic-lex-spp-write-test)
12 (semantic-lex-spp-write-utest):
13 * cedet/semantic/lex.el (semantic-lex-test-region)
14 (semantic-lex-test-full-depth):
15 * cedet/semantic/idle.el (semantic-idle-pnf-test):
16 * cedet/semantic/fw.el (semantic-test-data-cache)
17 (semantic-test-throw-on-input):
18 * cedet/semantic/format.el (semantic-test-all-format-tag-functions):
19 * cedet/semantic/complete.el (semantic-complete-test):
20 * cedet/semantic/db-ebrowse.el (semanticdb-ebrowse-run-tests)
21 (semanticdb-ebrowse-dump): Test functions moved to
22 semantic-tests.el in the test/ directory.
23
24 * cedet/semantic/db-ref.el (semanticdb-ref-test): Doc fix.
25
12009-09-19 Chong Yidong <cyd@stupidchicken.com> 262009-09-19 Chong Yidong <cyd@stupidchicken.com>
2 27
3 Synch to Eric Ludlam's upstream CEDET repository. 28 Synch to Eric Ludlam's upstream CEDET repository.
diff --git a/lisp/cedet/semantic.el b/lisp/cedet/semantic.el
index c683cf84837..2d38103f9ee 100644
--- a/lisp/cedet/semantic.el
+++ b/lisp/cedet/semantic.el
@@ -29,15 +29,13 @@
29;; implementations. Each parser outputs a parse tree in a similar format 29;; implementations. Each parser outputs a parse tree in a similar format
30;; designed to handle typical functional and object oriented languages. 30;; designed to handle typical functional and object oriented languages.
31 31
32(eval-and-compile
33 ;; Other package depend on this value at compile time via inversion.
34 (defvar semantic-version "2.0pre7"
35 "Current version of Semantic."))
36
37(require 'assoc) 32(require 'assoc)
38(require 'semantic/tag) 33(require 'semantic/tag)
39(require 'semantic/lex) 34(require 'semantic/lex)
40 35
36(defvar semantic-version "2.0pre7"
37 "Current version of Semantic.")
38
41(declare-function inversion-test "inversion") 39(declare-function inversion-test "inversion")
42 40
43(defun semantic-require-version (major minor &optional beta) 41(defun semantic-require-version (major minor &optional beta)
diff --git a/lisp/cedet/semantic/bovine/gcc.el b/lisp/cedet/semantic/bovine/gcc.el
index a2217795b67..49c65366c2a 100644
--- a/lisp/cedet/semantic/bovine/gcc.el
+++ b/lisp/cedet/semantic/bovine/gcc.el
@@ -213,111 +213,6 @@ It should also include other symbols GCC was compiled with.")
213 (semantic-c-reset-preprocessor-symbol-map)) 213 (semantic-c-reset-preprocessor-symbol-map))
214 nil)) 214 nil))
215 215
216;;; TESTING
217;;
218;; Example output of "gcc -v"
219(defvar semantic-gcc-test-strings
220 '(;; My old box:
221 "Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
222Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
223Thread model: posix
224gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)"
225 ;; Alex Ott:
226 "Using built-in specs.
227Target: i486-linux-gnu
228Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.1-9ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
229Thread model: posix
230gcc version 4.3.1 (Ubuntu 4.3.1-9ubuntu1)"
231 ;; My debian box:
232 "Using built-in specs.
233Target: x86_64-unknown-linux-gnu
234Configured with: ../../../sources/gcc/configure --prefix=/usr/local/glibc-2.3.6/x86_64/apps/gcc-4.2.3 --with-gmp=/usr/local/gcc/gmp --with-mpfr=/usr/local/gcc/mpfr --enable-languages=c,c++,fortran --with-as=/usr/local/glibc-2.3.6/x86_64/apps/gcc-4.2.3/bin/as --with-ld=/usr/local/glibc-2.3.6/x86_64/apps/gcc-4.2.3/bin/ld --disable-multilib
235Thread model: posix
236gcc version 4.2.3"
237 ;; My mac:
238 "Using built-in specs.
239Target: i686-apple-darwin8
240Configured with: /private/var/tmp/gcc/gcc-5341.obj~1/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=powerpc-apple-darwin8 --with-arch=pentium-m --with-tune=prescott --program-prefix= --host=i686-apple-darwin8 --target=i686-apple-darwin8
241Thread model: posix
242gcc version 4.0.1 (Apple Computer, Inc. build 5341)"
243 ;; Ubuntu Intrepid
244 "Using built-in specs.
245Target: x86_64-linux-gnu
246Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.2-1ubuntu12' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
247Thread model: posix
248gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu12)"
249 ;; Red Hat EL4
250 "Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs
251Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=x86_64-redhat-linux
252Thread model: posix
253gcc version 3.4.6 20060404 (Red Hat 3.4.6-10)"
254 ;; Red Hat EL5
255 "Using built-in specs.
256Target: x86_64-redhat-linux
257Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux
258Thread model: posix
259gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)"
260 ;; David Engster's german gcc on ubuntu 4.3
261 "Es werden eingebaute Spezifikationen verwendet.
262Ziel: i486-linux-gnu
263Konfiguriert mit: ../src/configure -v --with-pkgversion='Ubuntu 4.3.2-1ubuntu12' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
264Thread-Modell: posix
265gcc-Version 4.3.2 (Ubuntu 4.3.2-1ubuntu12)"
266 ;; Damien Deville bsd
267 "Using built-in specs.
268Target: i386-undermydesk-freebsd
269Configured with: FreeBSD/i386 system compiler
270Thread model: posix
271gcc version 4.2.1 20070719 [FreeBSD]"
272 )
273 "A bunch of sample gcc -v outputs from different machines.")
274
275(defvar semantic-gcc-test-strings-fail
276 '(;; A really old solaris box I found
277 "Reading specs from /usr/local/gcc-2.95.2/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/specs
278gcc version 2.95.2 19991024 (release)"
279 )
280 "A bunch of sample gcc -v outputs that fail to provide the info we want.")
281
282(defun semantic-gcc-test-output-parser ()
283 "Test the output parser against some collected strings."
284 (interactive)
285 (let ((fail nil))
286 (dolist (S semantic-gcc-test-strings)
287 (let* ((fields (semantic-gcc-fields S))
288 (v (cdr (assoc 'version fields)))
289 (h (or (cdr (assoc 'target fields))
290 (cdr (assoc '--target fields))
291 (cdr (assoc '--host fields))))
292 (p (cdr (assoc '--prefix fields)))
293 )
294 ;; No longer test for prefixes.
295 (when (not (and v h))
296 (let ((strs (split-string S "\n")))
297 (message "Test failed on %S\nV H P:\n%S %S %S" (car strs) v h p))
298 (setq fail t))
299 ))
300 (dolist (S semantic-gcc-test-strings-fail)
301 (let* ((fields (semantic-gcc-fields S))
302 (v (cdr (assoc 'version fields)))
303 (h (or (cdr (assoc '--host fields))
304 (cdr (assoc 'target fields))))
305 (p (cdr (assoc '--prefix fields)))
306 )
307 (when (and v h p)
308 (message "Negative test failed on %S" S)
309 (setq fail t))
310 ))
311 (if (not fail) (message "Tests passed."))
312 ))
313
314(defun semantic-gcc-test-output-parser-this-machine ()
315 "Test the output parser against the machine currently running Emacs."
316 (interactive)
317 (let ((semantic-gcc-test-strings (list (semantic-gcc-query "gcc" "-v"))))
318 (semantic-gcc-test-output-parser))
319 )
320
321(provide 'semantic/bovine/gcc) 216(provide 'semantic/bovine/gcc)
322 217
323;; Local variables: 218;; Local variables:
diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el
index 1f08599221e..c591c1588e7 100644
--- a/lisp/cedet/semantic/complete.el
+++ b/lisp/cedet/semantic/complete.el
@@ -1992,17 +1992,6 @@ completion works."
1992 )) 1992 ))
1993 1993
1994 1994
1995;;; ------------------------------------------------------------
1996;;; Testing/Samples
1997;;
1998(defun semantic-complete-test ()
1999 "Test completion mechanisms."
2000 (interactive)
2001 (message "%S"
2002 (semantic-format-tag-prototype
2003 (semantic-complete-read-tag-project "Symbol: ")
2004 )))
2005
2006;;;###autoload 1995;;;###autoload
2007(defun semantic-complete-jump-local () 1996(defun semantic-complete-jump-local ()
2008 "Jump to a semantic symbol." 1997 "Jump to a semantic symbol."
diff --git a/lisp/cedet/semantic/db-ebrowse.el b/lisp/cedet/semantic/db-ebrowse.el
index dcd27e786eb..6101f3a8b66 100644
--- a/lisp/cedet/semantic/db-ebrowse.el
+++ b/lisp/cedet/semantic/db-ebrowse.el
@@ -59,8 +59,6 @@
59(require 'semantic/find) 59(require 'semantic/find)
60 60
61(declare-function semantic-add-system-include "semantic/dep") 61(declare-function semantic-add-system-include "semantic/dep")
62(declare-function data-debug-new-buffer "data-debug")
63(declare-function data-debug-insert-thing "data-debug")
64 62
65(eval-and-compile 63(eval-and-compile
66 ;; Hopefully, this will allow semanticdb-ebrowse to compile under 64 ;; Hopefully, this will allow semanticdb-ebrowse to compile under
@@ -668,47 +666,6 @@ Return a list of tags."
668 nil 666 nil
669 )) 667 ))
670 668
671;;; TESTING
672;;
673;; This is a complex bit of stuff. Here are some tests for the
674;; system.
675
676(defun semanticdb-ebrowse-run-tests ()
677 "Run some tests of the semanticdb-ebrowse system.
678All systems are different. Ask questions along the way."
679 (interactive)
680 (let ((doload nil))
681 (when (y-or-n-p "Create a system database to test with? ")
682 (call-interactively 'semanticdb-create-ebrowse-database)
683 (setq doload t))
684 ;; Should we load in caches
685 (when (if doload
686 (y-or-n-p "New database created. Reload system databases? ")
687 (y-or-n-p "Load in all system databases? "))
688 (semanticdb-load-ebrowse-caches)))
689 ;; Ok, databases were creatd. Lets try some searching.
690 (when (not (or (eq major-mode 'c-mode)
691 (eq major-mode 'c++-mode)))
692 (error "Please make your default buffer be a C or C++ file, then
693run the test again..")
694 )
695
696 )
697
698(defun semanticdb-ebrowse-dump ()
699 "Find the first loaded ebrowse table, and dump out the contents."
700 (interactive)
701 (require 'data-debug)
702 (let ((db semanticdb-database-list)
703 (ab nil))
704 (while db
705 (when (semanticdb-project-database-ebrowse-p (car db))
706 (setq ab (data-debug-new-buffer "*EBROWSE Database*"))
707 (data-debug-insert-thing (car db) "*" "")
708 (setq db nil)
709 )
710 (setq db (cdr db)))))
711
712(provide 'semantic/db-ebrowse) 669(provide 'semantic/db-ebrowse)
713 670
714;;; semantic/db-ebrowse.el ends here 671;;; semantic/db-ebrowse.el ends here
diff --git a/lisp/cedet/semantic/db-global.el b/lisp/cedet/semantic/db-global.el
index 1b3be12a5fb..c45ed16eabf 100644
--- a/lisp/cedet/semantic/db-global.el
+++ b/lisp/cedet/semantic/db-global.el
@@ -216,40 +216,6 @@ Optional argument TAGS is a list of tags to search.
216Like `semanticdb-find-tags-for-completion-method' for global." 216Like `semanticdb-find-tags-for-completion-method' for global."
217 (semanticdb-find-tags-for-completion-method table prefix tags)) 217 (semanticdb-find-tags-for-completion-method table prefix tags))
218 218
219;;; TEST
220;;
221;; Here is a testing fcn to try out searches via the GNU Global database.
222(defvar semanticdb-test-gnu-global-startfile "~/src/global-5.7.3/global/global.c"
223 "File to use for testing.")
224
225(defun semanticdb-test-gnu-global (searchfor &optional standardfile)
226 "Test the GNU Global semanticdb.
227Argument SEARCHFOR is the text to search for.
228If optional arg STANDARDFILE is non nil, use a standard file w/ global enabled."
229 (interactive "sSearch For Tag: \nP")
230
231 (require 'data-debug)
232 (save-excursion
233 (when standardfile
234 (save-match-data
235 (set-buffer (find-file-noselect semanticdb-test-gnu-global-startfile))))
236
237 (condition-case err
238 (semanticdb-enable-gnu-global-in-buffer)
239 (error (if standardfile
240 (error err)
241 (save-match-data
242 (set-buffer (find-file-noselect semanticdb-test-gnu-global-startfile)))
243 (semanticdb-enable-gnu-global-in-buffer))))
244
245 (let* ((db (semanticdb-project-database-global "global"))
246 (tab (semanticdb-file-table db (buffer-file-name)))
247 (result (semanticdb-deep-find-tags-for-completion-method tab searchfor))
248 )
249 (data-debug-new-buffer "*SemanticDB Gnu Global Result*")
250 (data-debug-insert-thing result "?" "")
251 )))
252
253(provide 'semantic/db-global) 219(provide 'semantic/db-global)
254 220
255;; Local variables: 221;; Local variables:
diff --git a/lisp/cedet/semantic/db-ref.el b/lisp/cedet/semantic/db-ref.el
index d7e01d88db9..2c8dd7729c4 100644
--- a/lisp/cedet/semantic/db-ref.el
+++ b/lisp/cedet/semantic/db-ref.el
@@ -150,7 +150,7 @@ DBT, the second argument is DBT."
150 150
151(defun semanticdb-ref-test (refresh) 151(defun semanticdb-ref-test (refresh)
152 "Dump out the list of references for the current buffer. 152 "Dump out the list of references for the current buffer.
153If REFRESH is non-nil, cause the current table to have it's references 153If REFRESH is non-nil, cause the current table to have its references
154refreshed before dumping the result." 154refreshed before dumping the result."
155 (interactive "p") 155 (interactive "p")
156 (require 'eieio-datadebug) 156 (require 'eieio-datadebug)
diff --git a/lisp/cedet/semantic/format.el b/lisp/cedet/semantic/format.el
index 05bebb04ffe..d4c04a172c4 100644
--- a/lisp/cedet/semantic/format.el
+++ b/lisp/cedet/semantic/format.el
@@ -730,33 +730,6 @@ Optional argument COLOR means highlight the prototype with font-lock colors."
730 (setq text (semantic--format-uml-post-colorize text tag parent))) 730 (setq text (semantic--format-uml-post-colorize text tag parent)))
731 text 731 text
732 )) 732 ))
733
734
735;;; Test routines
736;;
737(defun semantic-test-all-format-tag-functions (&optional arg)
738 "Test all outputs from `semantic-format-tag-functions'.
739Output is generated from the function under `point'.
740Optional argument ARG specifies not to use color."
741 (interactive "P")
742 (semantic-fetch-tags)
743 (let* ((tag (semantic-current-tag))
744 (par (semantic-current-tag-parent))
745 (fns semantic-format-tag-functions))
746 (with-output-to-temp-buffer "*format-tag*"
747 (princ "Tag->format function tests:")
748 (while fns
749 (princ "\n")
750 (princ (car fns))
751 (princ ":\n ")
752 (let ((s (funcall (car fns) tag par (not arg))))
753 (save-excursion
754 (set-buffer "*format-tag*")
755 (goto-char (point-max))
756 (insert s)))
757 (setq fns (cdr fns))))
758 ))
759
760 733
761;;; Compatibility and aliases 734;;; Compatibility and aliases
762;; 735;;
diff --git a/lisp/cedet/semantic/fw.el b/lisp/cedet/semantic/fw.el
index 0e8f64a21cf..d7e5b5f2bde 100644
--- a/lisp/cedet/semantic/fw.el
+++ b/lisp/cedet/semantic/fw.el
@@ -239,22 +239,6 @@ Remove self from `post-command-hook' if it is empty."
239 (when ans 239 (when ans
240 (semantic-overlay-get ans 'cached-value))))) 240 (semantic-overlay-get ans 'cached-value)))))
241 241
242(defun semantic-test-data-cache ()
243 "Test the data cache."
244 (interactive)
245 (let ((data '(a b c)))
246 (save-excursion
247 (set-buffer (get-buffer-create " *semantic-test-data-cache*"))
248 (erase-buffer)
249 (insert "The Moose is Loose")
250 (goto-char (point-min))
251 (semantic-cache-data-to-buffer (current-buffer) (point) (+ (point) 5)
252 data 'moose 'exit-cache-zone)
253 (if (equal (semantic-get-cache-data 'moose) data)
254 (message "Successfully retrieved cached data.")
255 (error "Failed to retrieve cached data"))
256 )))
257
258;;; Obsoleting various functions & variables 242;;; Obsoleting various functions & variables
259;; 243;;
260(defun semantic-overload-symbol-from-function (name) 244(defun semantic-overload-symbol-from-function (name)
@@ -396,23 +380,6 @@ calling this one."
396 (or (input-pending-p) (accept-process-output))) 380 (or (input-pending-p) (accept-process-output)))
397 (throw semantic-current-input-throw-symbol ,from))) 381 (throw semantic-current-input-throw-symbol ,from)))
398 382
399(defun semantic-test-throw-on-input ()
400 "Test that throw on input will work."
401 (interactive)
402 (semantic-throw-on-input 'done-die)
403 (message "Exit Code: %s"
404 (semantic-exit-on-input 'testing
405 (let ((inhibit-quit nil)
406 (message-log-max nil))
407 (while t
408 (message "Looping ... press a key to test")
409 (semantic-throw-on-input 'test-inner-loop))
410 'exit)))
411 (when (input-pending-p)
412 (if (fboundp 'read-event)
413 (read-event)
414 (read-char)))
415 )
416 383
417;;; Special versions of Find File 384;;; Special versions of Find File
418;; 385;;
diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el
index dedeb465099..e3ae984ae98 100644
--- a/lisp/cedet/semantic/idle.el
+++ b/lisp/cedet/semantic/idle.el
@@ -481,15 +481,6 @@ datasets."
481 )))) 481 ))))
482 )) 482 ))
483 483
484(defun semantic-idle-pnf-test ()
485 "Test `semantic-idle-scheduler-work-parse-neighboring-files' and time it."
486 (interactive)
487 (let ((start (current-time))
488 (junk (semantic-idle-scheduler-work-parse-neighboring-files))
489 (end (current-time)))
490 (message "Work took %.2f seconds." (semantic-elapsed-time start end)))
491 )
492
493 484
494;;; REPARSING 485;;; REPARSING
495;; 486;;
diff --git a/lisp/cedet/semantic/lex-spp.el b/lisp/cedet/semantic/lex-spp.el
index 5ab74668a45..9d47fb4cfb6 100644
--- a/lisp/cedet/semantic/lex-spp.el
+++ b/lisp/cedet/semantic/lex-spp.el
@@ -1141,26 +1141,6 @@ The VALUE is a spp lexical table."
1141 (princ ")\n")) 1141 (princ ")\n"))
1142) 1142)
1143 1143
1144;;; TESTS
1145;;
1146(defun semantic-lex-spp-write-test ()
1147 "Test the semantic tag writer against the current buffer."
1148 (interactive)
1149 (with-output-to-temp-buffer "*SPP Write Test*"
1150 (semantic-lex-spp-table-write-slot-value
1151 (semantic-lex-spp-save-table))))
1152
1153(defun semantic-lex-spp-write-utest ()
1154 "Unit test using the test spp file to test the slot write fcn."
1155 (interactive)
1156 (let* ((sem (locate-library "semantic-lex-spp.el"))
1157 (dir (file-name-directory sem)))
1158 (save-excursion
1159 (set-buffer (find-file-noselect
1160 (expand-file-name "tests/testsppreplace.c"
1161 dir)))
1162 (semantic-lex-spp-write-test))))
1163
1164;;; MACRO TABLE DEBUG 1144;;; MACRO TABLE DEBUG
1165;; 1145;;
1166(defun semantic-lex-spp-describe (&optional buffer) 1146(defun semantic-lex-spp-describe (&optional buffer)
diff --git a/lisp/cedet/semantic/lex.el b/lisp/cedet/semantic/lex.el
index c4335d9e197..83e0836f8a6 100644
--- a/lisp/cedet/semantic/lex.el
+++ b/lisp/cedet/semantic/lex.el
@@ -693,38 +693,6 @@ If universal argument ARG, then try the whole buffer."
693 (goto-char (point-min)) 693 (goto-char (point-min))
694 )) 694 ))
695 695
696(defun semantic-lex-test-full-depth (arg)
697 "Test the semantic lexer in the current buffer parsing through lists.
698Usually the lexer parses
699If universal argument ARG, then try the whole buffer."
700 (interactive "P")
701 (let* ((start (current-time))
702 (result (semantic-lex
703 (if arg (point-min) (point))
704 (point-max)
705 100))
706 (end (current-time)))
707 (message "Elapsed Time: %.2f seconds."
708 (semantic-elapsed-time start end))
709 (pop-to-buffer "*Lexer Output*")
710 (require 'pp)
711 (erase-buffer)
712 (insert (pp-to-string result))
713 (goto-char (point-min))
714 ))
715
716(defun semantic-lex-test-region (beg end)
717 "Test the semantic lexer in the current buffer.
718Analyze the area between BEG and END."
719 (interactive "r")
720 (let ((result (semantic-lex beg end)))
721 (pop-to-buffer "*Lexer Output*")
722 (require 'pp)
723 (erase-buffer)
724 (insert (pp-to-string result))
725 (goto-char (point-min))
726 ))
727
728(defvar semantic-lex-debug nil 696(defvar semantic-lex-debug nil
729 "When non-nil, debug the local lexical analyzer.") 697 "When non-nil, debug the local lexical analyzer.")
730 698
diff --git a/lisp/cedet/semantic/symref/filter.el b/lisp/cedet/semantic/symref/filter.el
index f6f4cb134b1..7052d764417 100644
--- a/lisp/cedet/semantic/symref/filter.el
+++ b/lisp/cedet/semantic/symref/filter.el
@@ -82,28 +82,6 @@ Search occurs in the current buffer between START and END."
82 (funcall hookfcn start end prefix))))) 82 (funcall hookfcn start end prefix)))))
83 (point))))))) 83 (point)))))))
84 84
85;;;###autoload
86(defun semantic-symref-test-count-hits-in-tag ()
87 "Lookup in the current tag the symbol under point.
88the count all the other references to the same symbol within the
89tag that contains point, and return that."
90 (interactive)
91 (let* ((ctxt (semantic-analyze-current-context))
92 (target (car (reverse (oref ctxt prefix))))
93 (tag (semantic-current-tag))
94 (start (current-time))
95 (Lcount 0))
96 (when (semantic-tag-p target)
97 (semantic-symref-hits-in-region
98 target (lambda (start end prefix) (setq Lcount (1+ Lcount)))
99 (semantic-tag-start tag)
100 (semantic-tag-end tag))
101 (when (interactive-p)
102 (message "Found %d occurances of %s in %.2f seconds"
103 Lcount (semantic-tag-name target)
104 (semantic-elapsed-time start (current-time))))
105 Lcount)))
106
107(defun semantic-symref-rename-local-variable () 85(defun semantic-symref-rename-local-variable ()
108 "Fancy way to rename the local variable under point. 86 "Fancy way to rename the local variable under point.
109Depends on the SRecode Field editing API." 87Depends on the SRecode Field editing API."
@@ -156,10 +134,4 @@ Depends on the SRecode Field editing API."
156 134
157(provide 'semantic/symref/filter) 135(provide 'semantic/symref/filter)
158 136
159;; Local variables:
160;; generated-autoload-file: "../loaddefs.el"
161;; generated-autoload-feature: semantic/loaddefs
162;; generated-autoload-load-name: "semantic/symref/filter"
163;; End:
164
165;;; semantic/symref/filter.el ends here 137;;; semantic/symref/filter.el ends here
diff --git a/lisp/cedet/semantic/tag-write.el b/lisp/cedet/semantic/tag-write.el
index 4bd060bba7e..88d0ecb2f24 100644
--- a/lisp/cedet/semantic/tag-write.el
+++ b/lisp/cedet/semantic/tag-write.el
@@ -168,21 +168,6 @@ The VALUE is a list of tags."
168 (semantic-tag-write-tag-list value 10 t) 168 (semantic-tag-write-tag-list value 10 t)
169 )) 169 ))
170 170
171;;; TESTING.
172
173(defun semantic-tag-write-test ()
174 "Test the semantic tag writer against the tag under point."
175 (interactive)
176 (with-output-to-temp-buffer "*Tag Write Test*"
177 (semantic-tag-write-one-tag (semantic-current-tag))))
178
179(defun semantic-tag-write-list-test ()
180 "Test the semantic tag writer against the tag under point."
181 (interactive)
182 (with-output-to-temp-buffer "*Tag Write Test*"
183 (semantic-tag-write-tag-list (semantic-fetch-tags))))
184
185
186(provide 'semantic/tag-write) 171(provide 'semantic/tag-write)
187 172
188;; Local variables: 173;; Local variables:
diff --git a/lisp/files.el b/lisp/files.el
index 825ff250449..c72faf3c677 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2144,6 +2144,7 @@ since only a single case-insensitive search through the alist is made."
2144 ("\\.dtx\\'" . doctex-mode) 2144 ("\\.dtx\\'" . doctex-mode)
2145 ("\\.org\\'" . org-mode) 2145 ("\\.org\\'" . org-mode)
2146 ("\\.el\\'" . emacs-lisp-mode) 2146 ("\\.el\\'" . emacs-lisp-mode)
2147 ("Project\\.ede\\'" . emacs-lisp-mode)
2147 ("\\.\\(scm\\|stk\\|ss\\|sch\\)\\'" . scheme-mode) 2148 ("\\.\\(scm\\|stk\\|ss\\|sch\\)\\'" . scheme-mode)
2148 ("\\.l\\'" . lisp-mode) 2149 ("\\.l\\'" . lisp-mode)
2149 ("\\.li?sp\\'" . lisp-mode) 2150 ("\\.li?sp\\'" . lisp-mode)