1 ;;; project-am.el --- A project management scheme based on automake files.
3 ;;; Copyright (C) 1998, 1999, 2000, 2003, 2005, 2007 Eric M. Ludlam
5 ;; Author: Eric M. Ludlam <zappo@gnu.org>
7 ;; Keywords: project, make
8 ;; RCS: $Id: project-am.el,v 1.1 2007-11-26 15:22:13 michaels Exp $
10 ;; This file is NOT part of GNU Emacs.
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 2, or (at your option)
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25 ;; Boston, MA 02110-1301, USA.
29 ;; The GNU Automake tool is the first step towards having a really
30 ;; good project management system. It provides a simple and concise
31 ;; look at what is actually in a project, and records it in a simple
34 ;; project-am uses the structure defined in all good GNU projects with
35 ;; the Automake file as it's base template, and then maintains that
36 ;; information during edits, automatically updating the automake file
43 ;; Compatibility for makefile mode.
45 (require 'makefile "make-mode")
46 (error (require 'make-mode "make-mode")))
48 ;; Requiring the .el files prevents incomplete builds.
49 (require 'eieio "eieio.el")
50 (require 'ede "ede.el"))
52 (eval-when-compile (require 'ede-speedbar "ede-speedbar.el"))
53 (eval-when-compile (require 'compile))
55 ;; customization stuff
56 (defgroup project-am nil
57 "File and tag browser frame."
62 (defcustom project-am-compile-project-command nil
63 "*Default command used to compile a project."
67 (defcustom project-am-compile-target-command "make -k %s"
68 "*Default command used to compile a project."
72 (defcustom project-am-debug-target-function 'gdb
73 "*Default Emacs command used to debug a target."
75 :type 'sexp) ; make this be a list some day
77 (defconst project-am-type-alist
78 '(("bin" project-am-program "bin_PROGRAMS")
79 ("sbin" project-am-program "sbin_PROGRAMS")
80 ("lib" project-am-lib "noinst_LIBS")
81 ("texinfo" project-am-texinfo "texinfo_TEXINFOS")
82 ("man" project-am-man "man_MANS")
83 ("lisp" project-am-lisp "lisp_LISP"))
84 "Alist of type names and the type of object to create for them.")
86 (defclass project-am-target (ede-target)
88 "Base target class for everything in project-am.")
90 (defclass project-am-objectcode (project-am-target)
91 ((source :initarg :source :documentation "List of source files."))
92 "A target which creates object code, like a C program or library.")
94 (defclass project-am-program (project-am-objectcode)
95 ((ldadd :initarg :ldadd :documentation "Additional LD args."
97 "A top level program to build")
99 (defclass project-am-lib (project-am-objectcode)
101 "A top level library to build")
103 (defclass project-am-lisp (project-am-target)
104 ((lisp :initarg :lisp :documentation "List of lisp files to build."))
105 "A group of Emacs Lisp programs to byte compile.")
107 (defclass project-am-texinfo (project-am-target)
108 ((include :initarg :include
110 :documentation "Additional texinfo included in this one."))
111 "A top level texinfo file to build.")
113 (defclass project-am-man (project-am-target)
115 "A top level man file to build.")
117 (defclass project-am-makefile (ede-project)
118 ((targets :initarg :targets
120 :documentation "Top level targets in this makefile.")
122 "Encode one makefile.")
125 (defmethod project-add-file ((ot project-am-target))
126 "Add the current buffer into a project.
127 OT is the object target. DIR is the directory to start in."
128 (let* ((target (if ede-object (error "Already assocated w/ a target")
129 (let ((amf (project-am-load default-directory)))
130 (if (not amf) (error "No project file"))
131 (completing-read "Target: "
132 (object-assoc-list 'name
135 ;; The input target might be new. See if we can find it.
136 (amf (ede-load-project-file (oref ot path)))
137 (ot (object-assoc target 'name (oref amf targets)))
138 (ofn (file-name-nondirectory (buffer-file-name))))
142 target (project-am-preferred-target-type (buffer-file-name)))))
143 (ede-with-projectfile ot
144 (makefile-move-to-macro (project-am-macro ot))
146 (makefile-end-of-command)
148 (makefile-fill-paragraph nil)
151 (setq ede-object ot)))
153 (defmethod project-remove-file ((ot project-am-target) fnnd)
154 "Remove the current buffer from any project targets."
155 (ede-with-projectfile ot
156 (makefile-move-to-macro (project-am-macro ot))
157 (if (and buffer-read-only vc-mode
158 (y-or-n-p "Checkout Makefile.am from VC? "))
159 (vc-toggle-read-only t))
161 (makefile-navigate-macro (concat " *" (regexp-quote (ede-name fnnd))))
162 (replace-match "" t t nil 0)
163 (makefile-fill-paragraph nil)
166 (setq ede-object nil))
168 (defmethod project-edit-file-target ((obj project-am-target))
169 "Edit the target associated w/ this file."
170 (find-file (concat (oref obj path) "Makefile.am"))
171 (goto-char (point-min))
172 (makefile-move-to-macro (project-am-macro obj))
173 (if (= (point-min) (point))
174 (re-search-forward (ede-target-name obj))))
176 (defmethod project-new-target ((proj project-am-makefile))
177 "Create a new target named NAME.
178 Argument TYPE is the type of target to insert. This is a string
179 matching something in `project-am-type-alist' or type class symbol.
180 Despite the fact that this is a method, it depends on the current
181 buffer being in order to provide a smart default target type."
182 (let* ((name (read-string "Name: " ""))
183 (type (completing-read "Type: "
184 project-am-type-alist
186 (cond ((eq major-mode 'texinfo-mode)
188 ((eq major-mode 'nroff-mode)
190 ((eq major-mode 'emacs-lisp-mode)
193 (ntype (assoc type project-am-type-alist))
195 (setq ot (apply (car (cdr ntype)) name :name name
196 :path (expand-file-name default-directory) nil))
197 (if (not ot) (error "Error creating target object %S" ntype))
198 (ede-with-projectfile ot
199 (goto-char (point-min))
201 (makefile-next-dependency)
202 (if (= (point) (point-min))
203 (goto-char (point-max))
207 ;; Add the new target sources macro (if needed)
208 (if (project-am-macro ot)
209 (makefile-insert-macro (project-am-macro ot)))
210 ;; Add to the list of objects.
211 (goto-char (point-min))
212 (makefile-move-to-macro (car (cdr (cdr ntype))))
213 (if (= (point) (point-min))
215 (if (re-search-forward makefile-macroassign-regex nil t)
216 (progn (forward-line -1)
219 ;; If the above search fails, thats ok. We'd just want to be at
222 (makefile-insert-macro (car (cdr (cdr ntype))))))
223 (makefile-end-of-command)
224 (insert " " (ede-target-name ot))
226 ;; Rescan the object in this makefile.
227 (project-rescan ede-object))))
229 ;(defun project-am-rescan-toplevel ()
230 ; "Rescan all projects in which the current buffer resides."
232 ; (let* ((tlof (project-am-find-topmost-level default-directory))
233 ; (tlo (project-am-load tlof))
234 ; (ede-deep-rescan t)) ; scan deep in this case.
235 ; ;; tlo is the top level object for whatever file we are in
236 ; ;; or nil. If we have an object, call the rescan method.
237 ; (if tlo (project-am-rescan tlo))))
242 ;; This should be handled at the EDE level, calling a method of the
245 (defmethod project-compile-project ((obj project-am-target) &optional command)
246 "Compile the entire current project.
247 Argument COMMAND is the command to use when compiling."
252 ;; This interactive statement was taken from compile, and I'll
253 ;; use the same command history too.
255 (if (not project-am-compile-project-command)
256 (setq project-am-compile-project-command compile-command))
257 (if (or compilation-read-command current-prefix-arg)
258 (read-from-minibuffer "Project compile command: "
260 ;; This is compile project after all.
261 project-am-compile-project-command
262 nil nil '(compile-history . 1))
263 project-am-compile-project-command))))
264 ;; When compile a project, we might be in a subdirectory,
265 ;; so we have to make sure we move all the way to the top.
266 (let* ((default-directory (project-am-find-topmost-level default-directory)))
269 (defmethod project-compile-project ((obj project-am-makefile)
271 "Compile the entire current project.
272 Argument COMMAND is the command to use when compiling."
277 ;; This interactive statement was taken from compile, and I'll
278 ;; use the same command history too.
280 (if (not project-am-compile-project-command)
281 (setq project-am-compile-project-command compile-command))
282 (if (or compilation-read-command current-prefix-arg)
283 (read-from-minibuffer "Project compile command: "
285 ;; This is compile project after all.
286 project-am-compile-project-command
287 nil nil '(compile-history . 1))
288 project-am-compile-project-command))))
289 ;; When compile a project, we might be in a subdirectory,
290 ;; so we have to make sure we move all the way to the top.
291 (let* ((default-directory (project-am-find-topmost-level default-directory)))
294 (defmethod project-compile-target ((obj project-am-target) &optional command)
295 "Compile the current target.
296 Argument COMMAND is the command to use for compiling the target."
298 (if (not project-am-compile-project-command)
299 (setq project-am-compile-project-command compile-command))
303 (if compilation-read-command
304 (read-from-minibuffer "Project compile command: "
306 ;; This is compile project after all.
309 project-am-compile-target-command
310 (project-compile-target-command
312 project-am-compile-target-command)
314 '(compile-history . 1))
316 project-am-compile-project-command
318 project-am-compile-target-command
319 (project-compile-target-command ede-object))))))
320 ;; We better be in the right place when compiling a specific target.
323 (defmethod project-debug-target ((obj project-am-objectcode))
324 "Run the current project target in a debugger."
325 (let ((tb (get-buffer-create " *padt*"))
331 (setq default-directory dd)
332 (setq cmd (read-from-minibuffer
334 (concat (symbol-name project-am-debug-target-function)
335 " " (ede-target-name obj))))
336 (funcall project-am-debug-target-function cmd))
339 (defmethod project-make-dist ((this project-am-target))
340 "Run the current project in the debugger."
342 (if (not project-am-compile-project-command)
343 (setq project-am-compile-project-command compile-command))
344 (project-compile-project this (concat project-am-compile-project-command
347 ;;; Project loading and saving
349 (defun project-am-load (project)
350 "Read an automakefile PROJECT into our data structure.
351 Make sure that the tree down to our makefile is complete so that there
352 is cohesion in the project. Return the project file (or sub-project).
353 If a given set of projects has already been loaded, then do nothing
354 but return the project for the directory given."
355 (setq project (expand-file-name project))
356 (let* ((ede-constructing t)
357 (fn (project-am-find-topmost-level
358 (if (string-match "/$" project)
360 (concat project "/"))))
362 (trimmed (if (string-match (regexp-quote fn)
364 (replace-match "" t t project)
367 (setq amo (object-assoc (concat fn "Makefile.am")
370 (error "synchronous error in ede/project-am objects.")
371 (let ((project-am-constructiong t))
372 (setq amo (project-am-load-makefile fn))))
375 ;; Now scan down from amo, and find the current directory
376 ;; from the PROJECT file.
377 (while (< 0 (length trimmed))
378 (if (string-match "\\([a-zA-Z0-9.-]+\\)/" trimmed)
379 (setq subdir (match-string 0 trimmed)
380 trimmed (replace-match "" t t trimmed))
381 (error "Error scanning down path for project"))
382 (setq amo (project-am-subtree amo (concat fn subdir "Makefile.am"))
383 fn (concat fn subdir)))
387 (defun project-am-find-topmost-level (path)
388 "Find the topmost automakefile starting with PATH."
389 (let ((newpath path))
390 (while (file-exists-p (concat newpath "Makefile.am"))
391 (setq path newpath newpath
392 (file-name-directory (substring path 0 (1- (length path))))))
393 (expand-file-name path)))
395 (defun project-am-load-makefile (path)
396 "Converts PATH into a project Makefile, and return it's object object.
397 It does not check for existing project objects. Use `project-am-load'."
398 (let* ((fn (expand-file-name (concat path "Makefile.am")))
399 (kb (get-file-buffer fn)))
400 (if (not (file-exists-p fn))
403 (set-buffer (find-file-noselect fn))
405 (if (and ede-object (project-am-makefile-p ede-object))
407 (let ((ampf (project-am-makefile (project-am-last-dir fn)
408 :name (project-am-last-dir fn)
410 (make-local-variable 'ede-object)
411 (setq ede-object ampf)
412 ;; Move the rescan after we set ede-object to prevent recursion
413 (project-rescan ampf)
415 ;; If the buffer was not already loaded, kill it.
416 (if (not kb) (kill-buffer (current-buffer))))))))
419 (defmethod ede-find-target ((amf project-am-makefile) buffer)
420 "Fetch the target belonging to BUFFER."
421 (or (call-next-method)
422 (let ((targ (oref amf targets))
423 (sobj (oref amf subproj))
425 (while (and targ (not obj))
426 (if (ede-buffer-mine (car targ) buffer)
427 (setq obj (car targ)))
428 (setq targ (cdr targ)))
429 (while (and sobj (not obj))
430 (setq obj (project-am-buffer-object (car sobj) buffer)
434 (defmethod project-targets-for-file ((proj project-am-makefile))
435 "Return a list of targets the project PROJ."
438 (defmethod project-rescan ((this project-am-makefile))
439 "Rescan the makefile for all targets and sub targets."
440 (let ((osubproj (oref this subproj))
441 (otargets (oref this targets))
443 ;; If DIST_SUBDIRS doesn't exist, then go for the
444 ;; static list of SUBDIRS. The DIST version should
445 ;; contain SUBDIRS plus extra stuff.
446 (makefile-macro-file-list "DIST_SUBDIRS")
447 (makefile-macro-file-list "SUBDIRS")))
449 ;; Targets are excluded here because they require
450 ;; special attention.
453 ;; Here are target prefixes as strings
454 (tp '(("bin_PROGRAMS" . project-am-program)
455 ("sbin_PROGRAMS" . project-am-program)
456 ("noinst_LIBRARIES" . project-am-lib)
457 ("info_TEXINFOS" . project-am-texinfo)
458 ("man_MANS" . project-am-man)))
459 (path (expand-file-name default-directory))
462 ;; Map all tye different types
464 ;; Map all the found objects
465 (mapcar (lambda (lstcar)
466 (setq tmp (object-assoc lstcar 'name otargets))
468 (setq tmp (apply (cdr typecar) lstcar
472 (setq ntargets (cons tmp ntargets)))
473 (makefile-macro-file-list (car typecar))))
475 ;; LISP is different. Here there is only one kind of lisp (that I know of
476 ;; anyway) so it doesn't get mapped when it is found.
477 (if (makefile-move-to-macro "lisp_LISP")
478 (let ((tmp (project-am-lisp "lisp"
482 (setq ntargets (cons tmp ntargets))))
483 ;; Now that we have this new list, chuck the old targets
484 ;; and replace it with the new list of targets I just created.
485 (oset this targets (nreverse ntargets))
486 ;; We still have a list of targets. For all buffers, make sure
487 ;; their object still exists!
491 ;; Ok, now lets look at all our sub-projects.
493 ;; For each project id found, see if we need to recycle,
494 ;; and if we do not, then make a new one. Check the deep
495 ;; rescan value for behavior patterns.
496 (setq tmp (object-assoc
497 (concat default-directory sp "/Makefile.am")
500 ;; No tmp? Create a new one. Don't bother with
501 ;; non-deep business since we need this object.
502 (setq tmp (project-am-load-makefile
503 (concat (file-name-directory (oref this :file))
505 ;; If we have tmp, then rescan it only if deep mode.
507 (project-rescan tmp)))
508 ;; Tac tmp onto our list of things to keep
509 (setq nsubproj (cons tmp nsubproj)))
511 (oset this subproj nsubproj)
512 ;; All elements should be updated now.
515 (defmethod project-rescan ((this project-am-program))
516 "Rescan object THIS."
517 (oset this :source (makefile-macro-file-list (project-am-macro this)))
518 (oset this :ldadd (makefile-macro-file-list
519 (concat (oref this :name) "_LDADD"))))
521 (defmethod project-rescan ((this project-am-lib))
522 "Rescan object THIS."
523 (oset this :source (makefile-macro-file-list (project-am-macro this))))
525 (defmethod project-rescan ((this project-am-texinfo))
526 "Rescan object THIS."
527 (oset this :include (makefile-macro-file-list (project-am-macro this))))
529 (defmethod project-rescan ((this project-am-man))
530 "Rescan object THIS."
533 (defmethod project-rescan ((this project-am-lisp))
534 "Rescan the lisp sources."
535 (oset this :lisp (makefile-macro-file-list (project-am-macro this))))
537 (defmethod project-am-macro ((this project-am-objectcode))
538 "Return the default macro to 'edit' for this object type."
539 (concat (oref this :name) "_SOURCES"))
541 (defmethod project-am-macro ((this project-am-texinfo))
542 "Return the default macro to 'edit' for this object type."
543 (concat (oref this :name) "_TEXINFOS"))
545 (defmethod project-am-macro ((this project-am-man))
546 "Return the default macro to 'edit' for this object type."
547 (concat (oref this :name) "_MANS"))
549 (defmethod project-am-macro ((this project-am-lisp))
550 "Return the default macro to 'edit' for this object."
553 (defun project-am-buffer-object (amf buffer)
554 "Return an object starting with AMF associated with BUFFER.
555 nil means that this buffer belongs to no-one."
558 (if (ede-buffer-mine amf buffer)
560 (let ((targ (oref amf targets))
561 (sobj (oref amf subproj))
563 (while (and targ (not obj))
564 (if (ede-buffer-mine (car targ) buffer)
565 (setq obj (car targ)))
566 (setq targ (cdr targ)))
567 (while (and sobj (not obj))
568 (setq obj (project-am-buffer-object (car sobj) buffer)
572 (defmethod ede-buffer-mine ((this project-am-makefile) buffer)
573 "Return t if object THIS lays claim to the file in BUFFER."
574 (string= (oref this :file) (expand-file-name (buffer-file-name buffer))))
576 (defmethod ede-buffer-mine ((this project-am-objectcode) buffer)
577 "Return t if object THIS lays claim to the file in BUFFER."
578 (member (file-name-nondirectory (buffer-file-name buffer))
579 (oref this :source)))
581 (defmethod ede-buffer-mine ((this project-am-texinfo) buffer)
582 "Return t if object THIS lays claim to the file in BUFFER."
583 (let ((bfn (buffer-file-name buffer)))
584 (or (string= (oref this :name) (file-name-nondirectory bfn))
585 (member (file-name-nondirectory bfn) (oref this :include)))))
587 (defmethod ede-buffer-mine ((this project-am-man) buffer)
588 "Return t if object THIS lays claim to the file in BUFFER."
589 (string= (oref this :name) (buffer-file-name buffer)))
591 (defmethod ede-buffer-mine ((this project-am-lisp) buffer)
592 "Return t if object THIS lays claim to the file in BUFFER."
593 (member (file-name-nondirectory (buffer-file-name buffer))
596 (defmethod project-am-subtree ((ampf project-am-makefile) subpath)
597 "Return the sub project in AMPF specified by SUBPATH."
598 (object-assoc (expand-file-name subpath) 'file (oref ampf subproj)))
600 (defmethod project-compile-target-command ((this project-am-target))
601 "Default target to use when compiling a given target."
602 ;; This is a pretty good default for most.
605 (defmethod project-compile-target-command ((this project-am-objectcode))
606 "Default target to use when compiling an object code target."
609 (defmethod project-compile-target-command ((this project-am-texinfo))
610 "Default target t- use when compling a texinfo file."
611 (let ((n (oref this :name)))
612 (if (string-match "\\.texi?\\(nfo\\)?" n)
613 (setq n (replace-match ".info" t t n)))
617 ;;; Generic useful functions
619 (defun project-am-last-dir (file)
620 "Return the last part of a directory name.
621 Argument FILE is the file to extract the end directory name from."
622 (let ((s (file-name-directory file)))
623 (string-match "/\\([a-zA-Z0-9_]+\\)/$" s)
626 (defun project-am-preferred-target-type (file)
627 "For FILE, return the preferred type for that file."
628 (cond ((string-match "\\.texi?\\(nfo\\)$" file)
630 ((string-match "\\.[0-9]$" file)
632 ((string-match "\\.el$" file)
635 project-am-program)))
637 (defmethod ede-buffer-header-file((this project-am-objectcode) buffer)
638 "There are no default header files."
639 (or (call-next-method)
640 (let ((s (oref this source))
642 (while (and s (not found))
643 ;; Add more logic here if applicable.
644 (if (string-match "\\.\\(h\\|H\\|hh\\|hpp\\)" (car s))
645 (setq found (car s)))
649 (defmethod ede-documentation ((this project-am-texinfo))
650 "Return a list of files that provides documentation.
651 Documentation is not for object THIS, but is provided by THIS for other
652 files in the project."
653 (let ((src (append (oref this source)
654 (oref this include)))
656 ;; Loop over all entries and expand
659 (ede-expand-filename this (car src))
661 (setq src (cdr src)))
666 ;;; Makefile editing and scanning commands
668 ;; Formatting of a makefile
670 ;; 1) Creating an automakefile, stick in a top level comment about
671 ;; being created by emacs
672 ;; 2) Leave order of variable contents alone, except for SOURCE
673 ;; SOURCE always keep in the order of .c, .h, the other stuff.
675 ;; personal reference until I'm done
676 ; makefile-fill-paragraph -- refill a macro w/ backslashes
677 ; makefile-insert-macro -- insert "foo = "
679 (defun makefile-beginning-of-command ()
680 "Move the the beginning of the current command."
684 (makefile-line-continued-p))
687 (if (not (makefile-line-continued-p))
689 (while (and (makefile-line-continued-p)
694 (defun makefile-end-of-command ()
695 "Move the the beginning of the current command."
698 (while (and (makefile-line-continued-p)
703 (defun makefile-line-continued-p ()
704 "Return non-nil if the current line ends in continuation."
707 (= (preceding-char) ?\\)))
709 ;;; Programatic editing of a Makefile
711 (defun makefile-move-to-macro (macro)
712 "Move to the definition of MACRO. Return t if found."
713 (let ((oldpt (point)))
714 (goto-char (point-min))
715 (if (re-search-forward (concat "^" macro "\\s-*=") nil t)
720 (defun makefile-navigate-macro (stop-before)
721 "In a list of files, move forward until STOP-BEFORE is reached.
722 STOP-BEFORE is a regular expression matching a file name."
724 (makefile-beginning-of-command)
725 (let ((e (save-excursion
726 (makefile-end-of-command)
728 (if (re-search-forward stop-before nil t)
729 (goto-char (match-beginning 0))
732 (defun makefile-macro-file-list (macro)
733 "Return a list of all files in MACRO."
735 (if (makefile-move-to-macro macro)
736 (let ((e (save-excursion
737 (makefile-end-of-command)
740 (while (re-search-forward "\\s-**\\([-a-zA-Z0-9./_@$%()]+\\)\\s-*" e t)
742 (buffer-substring-no-properties
748 ;;; Methods used in speedbar
750 (defmethod ede-sb-button ((this project-am-program) depth)
751 "Create a speedbar button for object THIS at DEPTH."
752 (speedbar-make-tag-line 'angle ?+
755 nil nil ; nothing to jump to
756 'speedbar-file-face depth))
758 (defmethod ede-sb-button ((this project-am-lib) depth)
759 "Create a speedbar button for object THIS at DEPTH."
760 (speedbar-make-tag-line 'angle ?+
763 nil nil ; nothing to jump to
764 'speedbar-file-face depth))
766 (defmethod ede-sb-button ((this project-am-texinfo) depth)
767 "Create a speedbar button for object THIS at DEPTH."
768 (speedbar-make-tag-line 'bracket ?+
773 (concat (oref this :path)
775 'speedbar-file-face depth))
777 (defmethod ede-sb-button ((this project-am-man) depth)
778 "Create a speedbar button for object THIS at DEPTH."
779 (speedbar-make-tag-line 'bracket ?? nil nil
782 (concat (oref this :path)
784 'speedbar-file-face depth))
786 (defmethod ede-sb-button ((this project-am-lisp) depth)
787 "Create a speedbar button for object THIS at DEPTH."
788 (speedbar-make-tag-line 'angle ?+
791 nil nil ; nothing to jump to
792 'speedbar-file-face depth))
794 (defmethod ede-sb-expand ((this project-am-objectcode) depth)
795 "Expand node describing something built into objectcode.
796 TEXT is the text clicked on. TOKEN is the object we are expanding from.
797 INDENT is the current indentatin level."
798 (let ((sources (oref this :source)))
800 (speedbar-make-tag-line 'bracket ?+
802 (concat (oref this :path)
809 'speedbar-file-face depth)
810 (setq sources (cdr sources)))))
812 (defmethod ede-sb-expand ((this project-am-texinfo) depth)
813 "Expand node describing a texinfo manual.
814 TEXT is the text clicked on. TOKEN is the object we are expanding from.
815 INDENT is the current indentatin level."
816 (let ((includes (oref this :include)))
818 (speedbar-make-tag-line 'bracket ?+
820 (concat (oref this :path)
827 'speedbar-file-face depth)
828 (setq includes (cdr includes)))
829 ;; Not only do we show the included files (for future expansion)
830 ;; but we also want to display tags for this file too.
831 (ede-create-tag-buttons (concat (oref this :path)
835 (defmethod ede-sb-expand ((this project-am-lisp) depth)
836 "Expand node describing lisp code.
837 TEXT is the text clicked on. TOKEN is the object we are expanding from.
838 INDENT is the current indentatin level."
839 (let ((sources (oref this :lisp)))
841 (speedbar-make-tag-line 'bracket ?+
843 (concat (oref this :path)
850 'speedbar-file-face depth)
851 (setq sources (cdr sources)))))
853 (provide 'project-am)
855 ;;; project-am.el ends here