From: xscript Date: Sun, 15 May 2011 20:16:47 +0000 (+0200) Subject: Synchronize cedet/semantic with Emacs. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bff505de682be5342a31fd0c8ac0f9d9711fa814;p=emacs.git Synchronize cedet/semantic with Emacs. --- diff --git a/test/manual/cedet/cedet/semantic/db-global.el b/test/manual/cedet/cedet/semantic/db-global.el new file mode 100644 index 00000000000..91a39eddee5 --- /dev/null +++ b/test/manual/cedet/cedet/semantic/db-global.el @@ -0,0 +1,27 @@ +(defvar semanticdb-test-gnu-global-startfile "~/src/global-5.7.3/global/global.c" + "File to use for testing.") + +(defun semanticdb-test-gnu-global (searchfor &optional standardfile) + "Test the GNU Global semanticdb. +Argument SEARCHFOR is the text to search for. +If optional arg STANDARDFILE is non nil, use a standard file w/ global enabled." + (interactive "sSearch For Tag: \nP") + + (save-excursion + (when standardfile + (save-match-data + (set-buffer (find-file-noselect semanticdb-test-gnu-global-startfile)))) + + (condition-case err + (semanticdb-enable-gnu-global-in-buffer) + (error (if standardfile + (error err) + (save-match-data + (set-buffer (find-file-noselect semanticdb-test-gnu-global-startfile))) + (semanticdb-enable-gnu-global-in-buffer)))) + + (let* ((db (semanticdb-project-database-global "global")) + (tab (semanticdb-file-table db (buffer-file-name))) + (result (semanticdb-deep-find-tags-for-completion-method tab searchfor))) + (data-debug-new-buffer "*SemanticDB Gnu Global Result*") + (data-debug-insert-thing result "?" ""))))