comparison lisp/oobr/br-ftr.el @ 120:cca96a509cfe r20-1b12

Import from CVS: tag r20-1b12
author cvs
date Mon, 13 Aug 2007 09:25:29 +0200
parents 4be1180a9e89
children
comparison
equal deleted inserted replaced
119:d101af7320b8 120:cca96a509cfe
7 ;; 7 ;;
8 ;; AUTHOR: Bob Weiner 8 ;; AUTHOR: Bob Weiner
9 ;; ORG: InfoDock Associates 9 ;; ORG: InfoDock Associates
10 ;; 10 ;;
11 ;; ORIG-DATE: 20-Aug-91 at 18:16:36 11 ;; ORIG-DATE: 20-Aug-91 at 18:16:36
12 ;; LAST-MOD: 20-Feb-97 at 07:02:51 by Bob Weiner 12 ;; LAST-MOD: 18-Mar-97 at 22:19:28 by Bob Weiner
13 ;; 13 ;;
14 ;; Copyright (C) 1991-1996, Free Software Foundation, Inc. 14 ;; Copyright (C) 1991-1996, Free Software Foundation, Inc.
15 ;; See the file BR-COPY for license information. 15 ;; See the file BR-COPY for license information.
16 ;; 16 ;;
17 ;; This file is part of the OO-Browser. 17 ;; This file is part of the OO-Browser.
189 "Return file name in which feature matching FEATURE-SIG is, if any." 189 "Return file name in which feature matching FEATURE-SIG is, if any."
190 (let ((obuf (current-buffer)) 190 (let ((obuf (current-buffer))
191 (file)) 191 (file))
192 (set-buffer (funcall br-find-file-noselect-function br-feature-tags-file)) 192 (set-buffer (funcall br-find-file-noselect-function br-feature-tags-file))
193 (goto-char 1) 193 (goto-char 1)
194 (if (search-forward feature-sig nil t) 194 ;; Add a newline to feature-sig to avoid matching to signatures that
195 ;; contain the desired signature's classname as a substring, e.g. when
196 ;; looking for a signature from Object, we don't want to match to
197 ;; ClassObject.
198 (if (search-forward (concat "\n" feature-sig) nil t)
195 (setq file (br-feature-file-of-tag))) 199 (setq file (br-feature-file-of-tag)))
196 (set-buffer obuf) 200 (set-buffer obuf)
197 file)) 201 file))
198 202
199 (defun br-feature-found-p (buf-file feature-tag 203 (defun br-feature-found-p (buf-file feature-tag
413 417
414 (defun br-feature-file-of-tag () 418 (defun br-feature-file-of-tag ()
415 "Return the file name of the file whose tag point is within. 419 "Return the file name of the file whose tag point is within.
416 Assumes the tag table is the current buffer." 420 Assumes the tag table is the current buffer."
417 (save-excursion 421 (save-excursion
418 (search-backward " " nil t) 422 (search-backward "\f" nil t)
419 (forward-line 1) 423 (forward-line 1)
420 (let ((start (point))) 424 (let ((start (point)))
421 (end-of-line) 425 (end-of-line)
422 (buffer-substring start (point))))) 426 (buffer-substring start (point)))))
423 427
427 Feature tags come from the file named by br-feature-tags-file." 431 Feature tags come from the file named by br-feature-tags-file."
428 (let ((obuf (current-buffer)) 432 (let ((obuf (current-buffer))
429 result) 433 result)
430 (unwind-protect 434 (unwind-protect
431 (progn 435 (progn
432 (set-buffer (funcall br-find-file-noselect-function br-feature-tags-file)) 436 (set-buffer
437 (funcall br-find-file-noselect-function br-feature-tags-file))
433 (setq result (br-feature-def-file feature-tag-regexp)) 438 (setq result (br-feature-def-file feature-tag-regexp))
434 (if result (cons (br-feature-current) result))) 439 (if result (cons (br-feature-current) result)))
435 (set-buffer obuf)))) 440 (set-buffer obuf))))
436 441
437 ;;; ************************************************************************ 442 ;;; ************************************************************************