;;; 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
(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")
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.
)
(make-obsolete-overload 'semantic-find-nonterminal
- 'semantic-go-to-tag)
+ 'semantic-go-to-tag "23.2")
;;; Dependencies
;;
)))
(make-obsolete-overload 'semantic-find-dependency
- 'semantic-dependency-tag-file)
+ 'semantic-dependency-tag-file "23.2")
;;; PROTOTYPE FILE
;;
(: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)
;; generated-autoload-load-name: "semantic/tag-file"
;; End:
+;; arch-tag: 71d4cf18-c1ec-414c-bb0a-c2ed914c1361
;;; semantic/tag-file.el ends here