annotate lisp/oobr/br-ftr.el @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children 4103f0995bd7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 ;;!emacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 ;; FILE: br-ftr.el
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 ;; SUMMARY: OO-Browser feature browsing support.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 ;; USAGE: GNU Emacs Lisp Library
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 ;; KEYWORDS: oop, tools
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 ;; AUTHOR: Bob Weiner
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 ;; ORG: Motorola Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 ;; ORIG-DATE: 20-Aug-91 at 18:16:36
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 ;; LAST-MOD: 25-Aug-95 at 16:54:53 by Bob Weiner
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 ;; Copyright (C) 1991-1995, Free Software Foundation, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 ;; See the file BR-COPY for license information.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 ;; This file is part of the OO-Browser.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 ;; DESCRIPTION:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 ;; DESCRIP-END.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 ;;; Public variables
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 (defconst br-feature-type-regexp "[-+=@%>1/]"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 "Regular expression which matches the first non-whitespace characters in an OO-Browser feature listing.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 ;;; Public functions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 (defun br-find-feature (&optional feature-entry view-only other-win)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 "Display feature definition for FEATURE-ENTRY in VIEW-ONLY mode if non-nil.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 Return feature path if FEATURE-ENTRY is successfully displayed, nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 otherwise. Can also signal an error when called interactively."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 (and (interactive-p) (setq view-only current-prefix-arg))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 (let ((feature-path))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 (setq feature-entry
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 (br-feature-signature-and-file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 (or feature-entry
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 (br-feature-complete 'must-match "Show feature definition:")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 feature-path (cdr feature-entry)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 feature-entry (car feature-entry))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 (br-edit-feature feature-entry feature-path other-win view-only)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 (defun br-edit-feature (tag-entry feature-path &optional other-win view-only)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 "Edit feature for OO-Browser TAG-ENTRY of file FEATURE-PATH, optionally in OTHER-WIN.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 With optional VIEW-ONLY, view feature definition instead of editing it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 Return FEATURE-PATH if feature definition is found, else nil."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 (let ((err))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 (cond ((and feature-path (file-readable-p feature-path))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 (cond ((br-feature-found-p feature-path tag-entry nil other-win)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 (br-major-mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 (if view-only
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 (setq buffer-read-only t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 ;; Handle case of already existing buffer in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 ;; read only mode.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 (and buffer-read-only
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 (file-writable-p feature-path)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 (setq buffer-read-only nil)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 ;; Force mode-line redisplay
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 (set-buffer-modified-p (buffer-modified-p)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 ((interactive-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 (setq err
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 (format
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 "(OO-Browser): No '%s' feature defined in Environment."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 tag-entry)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 feature-path nil))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 ((interactive-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 (setq err
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 (format
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 "(OO-Browser): '%s' - src file not found or not readable, %s"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 tag-entry feature-path)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 feature-path nil)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 (if err (error err))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 feature-path))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 (defun br-find-feature-entry ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 "Return feature entry that point is within or nil."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 (if (= (point) (point-max)) (skip-chars-backward " \t\n"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 (beginning-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 (if (or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 (progn (skip-chars-forward " \t")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 (looking-at br-feature-entry))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 ;; Get current feature signature, if any.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 (br-feature-get-signature))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 (let ((feature (buffer-substring
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 (point)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 (progn (skip-chars-forward "^\t\n\r") (point)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 (if (and (equal br-lang-prefix "objc-")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 ;; Remove any trailing class from a category entry.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 (string-match "@ ([^\)]+)" feature))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 (substring feature 0 (match-end 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 feature)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 (defun br-feature-complete (&optional must-match prompt)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 "Interactively completes feature entry if possible, and returns it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 Optional MUST-MATCH means must match a completion table entry.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 Optional PROMPT is intial prompt string for user."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 (let ((default (br-find-feature-entry))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 (completion-ignore-case t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 completions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 ftr-entry)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 ;; Prompt with possible completions of ftr-entry.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 (setq prompt (or prompt "Feature entry:")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 completions (br-feature-completions)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 ftr-entry
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 (if completions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 (completing-read
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 (format "%s (default %s) " prompt default)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 completions nil must-match)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 (read-string
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 (format "%s (default %s) " prompt default))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 (if (equal ftr-entry "") default ftr-entry)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 (defun br-feature-completions ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 "Return completion alist of all current Environment elements."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 (cond ((not (and br-feature-tags-file (file-exists-p br-feature-tags-file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 (file-readable-p br-feature-tags-file)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 ((and br-feature-tags-completions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 (eq
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 (car (cdr br-feature-tags-completions)) ;; tags last mod time
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 (apply '+ (nth 5 (file-attributes br-feature-tags-file))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 (equal br-env-file (car br-feature-tags-completions)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 (car (cdr (cdr br-feature-tags-completions))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 (t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 (let ((ftr-buf (get-buffer-create "*ftr-buf*"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 (ftr-alist))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 (br-feature-tags-init)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 (copy-to-buffer ftr-buf 1 (point-max))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137 (set-buffer ftr-buf)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 (goto-char 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 (while (search-forward "\^L" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 (forward-line 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 ;; Skip past pathname where features are defined.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 (while (and (= (forward-line 1) 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 (not (looking-at "\^L\\|\\'")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 (setq ftr-alist (cons (cons (br-feature-signature-to-name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 (br-feature-current)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147 nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 ftr-alist)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 (kill-buffer ftr-buf)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150 (setq br-feature-tags-completions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151 (list br-env-file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152 ;; tags last mod time
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153 (apply '+ (nth 5 (file-attributes
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154 br-feature-tags-file)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155 ftr-alist))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 ftr-alist))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 (defun br-feature-def-file (feature-regexp)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159 "Return file name in which feature matching FEATURE-REGEXP is, if any.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 Assume feature tags file is current buffer and leave point at the start of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 matching feature tag, if any."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162 (goto-char 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163 (and (re-search-forward feature-regexp nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 ;; This ensures that point is left on the same line as the feature tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 ;; which is found.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 (goto-char (match-beginning 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 (br-feature-file-of-tag)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 (defun br-feature-file (feature-sig)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 "Return file name in which feature matching FEATURE-SIG is, if any."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 (let ((obuf (current-buffer))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 (file))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 (set-buffer (funcall br-find-file-noselect-function br-feature-tags-file))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 (goto-char 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 (if (search-forward feature-sig nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 (setq file (br-feature-file-of-tag)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177 (set-buffer obuf)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 file))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 (defun br-feature-found-p (buf-file feature-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181 &optional deferred-class other-win regexp-flag)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 "Search BUF-FILE for FEATURE-TAG.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183 Return nil if not found, otherwise display it and return non-nil."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184 (if buf-file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185 (let ((found-def)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186 (opoint (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187 (prev-buf)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188 (prev-point)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189 (config (current-window-configuration)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
190 (setq prev-buf (get-file-buffer buf-file))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191 (funcall br-edit-file-function buf-file other-win)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192 (setq prev-point (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193 (widen)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195 (setq found-def
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 (cond (deferred-class
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197 (br-feature-locate-p feature-tag deferred-class))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198 (regexp-flag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199 (br-feature-locate-p feature-tag regexp-flag))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200 (t (br-feature-locate-p feature-tag))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201 (if found-def
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202 ;; Set appropriate mode for file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203 (br-major-mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204 (setq buf-file (get-file-buffer buf-file))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
205 (if prev-buf
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
206 (goto-char prev-point)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
207 (if buf-file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
208 (kill-buffer buf-file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
209 (goto-char prev-point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
210 (set-window-configuration config)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
211 (goto-char opoint))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
212 found-def)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
213
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214 (defun br-feature-name (ftr-entry)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215 "Return name part of FTR-ENTRY."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216 (if (equal (string-match br-feature-entry ftr-entry) 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
217 (substring ftr-entry (match-beginning 1))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
218 ""))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
219
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
220 (defun br-feature-signature-and-file (class-and-feature-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
221 "Return (feature signature . feature-def-file-name) of CLASS-AND-FEATURE-NAME."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
222 (let ((obuf (current-buffer))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
223 ;; Find only exact matches
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
224 (name-regexp (br-feature-name-to-regexp class-and-feature-name))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
225 (result))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
226 (set-buffer (funcall br-find-file-noselect-function br-feature-tags-file))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
227 (goto-char 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
228 (if (re-search-forward name-regexp nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
229 (progn (goto-char (match-beginning 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
230 (setq result (cons (br-feature-current)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
231 (br-feature-file-of-tag)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
232 (set-buffer obuf)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
233 result))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
234
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
235 (defun br-feature-signature (&optional arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
236 "Show full feature signature in the view window.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
237 With optional prefix ARG, display signatures of all features from the current
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
238 buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
239 (interactive "P")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
240 (let* ((buf (buffer-name))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
241 (owind (selected-window))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
242 (features (delq nil (if arg (br-feature-get-tags)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
243 (list (br-feature-get-signature))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
244 (if (null features)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
245 (progn (beep) (message "No elements."))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
246 (br-to-view-window)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
247 (switch-to-buffer (get-buffer-create (concat buf "-Elements")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
248 (setq buffer-read-only nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
249 (erase-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
250 (mapcar (function (lambda (feature) (insert feature "\n")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
251 features)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
252 (br-major-mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
253 (goto-char 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
254 (select-window owind)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
255 (message ""))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
256
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
257 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
258 ;;; Listing buffer entry tag property handling.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
259 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
260
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
261 (if (string-match "^19\." emacs-version)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
262 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
263 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
264 ;; Emacs 19 buffer entry tags functions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
265 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
266
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
267 (defun br-feature-clear-signatures (&optional buf-nm)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
268 "Erase any feature signatures saved with current buffer or optional BUF-NM."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
269 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
270 (if buf-nm (set-buffer (get-buffer buf-nm)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
271 (save-restriction
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
272 (widen)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
273 (remove-text-properties (point-min) (point-max) '(tag)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
274
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
275 (defun br-feature-get-signature (&optional line-num-minus-one)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
276 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
277 (if (numberp line-num-minus-one)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
278 (goto-line (1+ line-num-minus-one)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
279 (end-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
280 (car (cdr (memq 'tag (text-properties-at (1- (point))))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
281
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
282 (defun br-feature-get-tags ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
283 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
284 (goto-char (point-max))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
285 (let ((found t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
286 (tags)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
287 tag)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
288 (while found
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
289 (setq tag (get-text-property (1- (point)) 'tag))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
290 (if tag (setq tags (cons tag tags)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
291 (setq found (= (forward-line -1) 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
292 (end-of-line))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
293 tags)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
294
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
295 ;; Tag property is placed at end of line in case leading indent is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
296 ;; removed by an OO-Browser operation. In that case, we don't want to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
297 ;; lose the tag property.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
298 (defun br-feature-put-signatures (ftr-sigs)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
299 (while ftr-sigs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
300 (end-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
301 (put-text-property (- (point) 2) (point) 'tag (car ftr-sigs))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
302 (setq ftr-sigs (cdr ftr-sigs))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
303 (if (and ftr-sigs (/= (forward-line 1) 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
304 (error "(br-feature-put-signatures): Too few lines in this buffer"))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
305
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
306 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
307
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
308 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
309 ;; Emacs 18 buffer entry tags functions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
310 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
311
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
312 (defun br-feature-clear-signatures (&optional buf-nm)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
313 "Erase any feature signatures saved with current buffer or optional BUF-NM."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
314 (put (intern (or buf-nm (buffer-name))) 'features nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
315
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
316 (defun br-feature-get-signature (&optional line-num)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
317 (or (numberp line-num)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
318 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
319 (beginning-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
320 (setq line-num (count-lines 1 (point)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
321 (cdr (assq line-num (get (intern-soft (buffer-name)) 'features))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
322
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
323 (defun br-feature-get-tags ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
324 (get (intern-soft (buffer-name)) 'features))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
325
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
326 (defun br-feature-put-signatures (ftr-sigs)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
327 (beginning-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
328 (let* ((line (count-lines 1 (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
329 (meth-alist (mapcar (function
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
330 (lambda (meth)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
331 (prog1 (cons line meth)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
332 (setq line (1+ line)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
333 ftr-sigs))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
334 (buf-sym (intern (buffer-name))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
335 (put buf-sym 'features
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
336 (nconc (get buf-sym 'features) meth-alist))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
337 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
338
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
339 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
340 ;;; END - Listing buffer entry tag property handling.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
341 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
342
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
343 (defun br-feature-tags-init ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
344 "Set up 'br-feature-tags-file' for writing."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
345 (setq br-feature-tags-completions nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
346 br-feature-tags-file (br-feature-tags-file-name br-env-file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
347 br-tags-file (concat br-env-file "-TAGS"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
348 (set-buffer (funcall br-find-file-noselect-function br-feature-tags-file))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
349 (setq buffer-read-only nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
350
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
351 (defun br-feature-tags-file-name (env-file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
352 (concat env-file "-FTR"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
353
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
354 (defun br-feature-tags-save ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
355 "Filter out extraneous lines and save 'br-feature-tags-file'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
356 (let ((obuf (current-buffer)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
357 (set-buffer (funcall br-find-file-noselect-function br-feature-tags-file))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
358 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
359 (delete-matching-lines "^[ \t]*$")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
360 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
361 (replace-regexp "^[ \t]+\\|[ \t]+$" "")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
362 (and br-c-tags-flag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
363 (br-member br-lang-prefix '("c++-" "objc-"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
364 (progn (c-build-element-tags)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
365 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
366 (replace-regexp "[ \t]*//.*" "")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
367 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
368 (delete-matching-lines "^$")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
369 (save-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
370 (set-buffer obuf)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
371
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
372 (defun br-insert-features (feature-tag-list &optional indent)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
373 "Insert feature names from FEATURE-TAG-LIST in current buffer indented INDENT columns."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
374 (let ((start (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
375 (mapcar (function
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
376 (lambda (feature-tag)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
377 (if indent (indent-to indent))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
378 (if feature-tag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
379 (insert (br-feature-signature-to-name feature-tag nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
380 "\n"))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
381 feature-tag-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
382 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
383 (goto-char start)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
384 (br-feature-put-signatures feature-tag-list))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
385
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
386 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
387 ;;; Private functions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
388 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
389
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
390 (defun br-feature-current ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
391 "Extract current feature from tags file and leave point at the end of line."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
392 (beginning-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
393 (buffer-substring (point) (progn (end-of-line) (point))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
394
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
395 (defun br-feature-file-of-tag ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
396 "Return the file name of the file whose tag point is within.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
397 Assumes the tag table is the current buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
398 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
399 (search-backward " " nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
400 (forward-line 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
401 (let ((start (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
402 (end-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
403 (buffer-substring start (point)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
404
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
405 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
406 ;;; Private variables
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
407 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
408
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
409 (defconst br-feature-entry
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
410 (concat br-feature-type-regexp " \\([^\t\n\r]*[^ \t\n\r]\\)")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
411 "Regexp matching a feature entry in a browser listing buffer.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
412
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
413 (defvar br-feature-tags-completions nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
414 "List of (envir-name tags-file-last-mod-time tags-completion-alist).")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
415
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
416 (defvar br-feature-tags-file nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
417 "Pathname where current object-oriented feature tags are stored.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
418
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
419 (defvar br-tags-file nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
420 "Pathname where current non-object-oriented feature tags are stored.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
421
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
422 (provide 'br-ftr)