* cedet/srecode/srt-mode.el (semantic-analyze-possible-completions):
[bpt/emacs.git] / lisp / cedet / semantic / tag-file.el
index d7fe7d5..0be88ea 100644 (file)
@@ -1,7 +1,7 @@
 ;;; semantic/tag-file.el --- Routines that find files based on tags.
 
-;;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007,
-;;; 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008,
+;;   2009  Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <zappo@gnu.org>
 ;; Keywords: syntax
@@ -29,7 +29,7 @@
 (require 'semantic/tag)
 
 (defvar ede-minor-mode)
-(declare-function semanticdb-table-child-p "semantic/db")
+(declare-function semanticdb-table-child-p "semantic/db" t t)
 (declare-function semanticdb-get-buffer "semantic/db")
 (declare-function semantic-dependency-find-file-on-path "semantic/dep")
 (declare-function ede-toplevel "ede/files")
@@ -87,12 +87,13 @@ PARENT can also be a `semanticdb-table' object."
                             t))
         ((semantic-tag-get-attribute tag :line)
          ;; The tag has a line number in it.  Go there.
-         (goto-line (semantic-tag-get-attribute tag :line)))
+         (goto-char (point-min))
+         (forward-line (1- (semantic-tag-get-attribute tag :line))))
         ((and (semantic-tag-p parent) (semantic-tag-get-attribute parent :line))
          ;; The tag has a line number in it.  Go there.
-         (goto-line (semantic-tag-get-attribute parent :line))
-         (re-search-forward (semantic-tag-name tag) nil t)
-         )
+         (goto-char (point-min))
+         (forward-line (1- (semantic-tag-get-attribute parent :line)))
+         (re-search-forward (semantic-tag-name tag) nil t))
         (t
          ;; Take a guess that the tag has a unique name, and just
          ;; search for it from the beginning of the buffer.
@@ -102,7 +103,7 @@ PARENT can also be a `semanticdb-table' object."
   )
 
 (make-obsolete-overload 'semantic-find-nonterminal
-                        'semantic-go-to-tag)
+                        'semantic-go-to-tag "23.2")
 
 ;;; Dependencies
 ;;
@@ -176,7 +177,7 @@ Depends on `semantic-dependency-include-path' for searching.  Always searches
       )))
 
 (make-obsolete-overload 'semantic-find-dependency
-                        'semantic-dependency-tag-file)
+                        'semantic-dependency-tag-file "23.2")
 
 ;;; PROTOTYPE FILE
 ;;
@@ -192,20 +193,18 @@ file prototypes belong in."
   (:override
    ;; Perform some default behaviors
    (if (and (fboundp 'ede-header-file) ede-minor-mode)
-       (save-excursion
-         (set-buffer buffer)
+       (with-current-buffer buffer
          (ede-header-file))
      ;; No EDE options for a quick answer.  Search.
-     (save-excursion
-       (set-buffer buffer)
+     (with-current-buffer buffer
        (if (re-search-forward "::Header:: \\([a-zA-Z0-9.]+\\)" nil t)
            (match-string 1))))))
 
 (semantic-alias-obsolete 'semantic-find-nonterminal
-                         'semantic-go-to-tag)
+                         'semantic-go-to-tag "23.2")
 
 (semantic-alias-obsolete 'semantic-find-dependency
-                         'semantic-dependency-tag-file)
+                         'semantic-dependency-tag-file "23.2")
 
 
 (provide 'semantic/tag-file)
@@ -216,4 +215,5 @@ file prototypes belong in."
 ;; generated-autoload-load-name: "semantic/tag-file"
 ;; End:
 
+;; arch-tag: 71d4cf18-c1ec-414c-bb0a-c2ed914c1361
 ;;; semantic/tag-file.el ends here