Function: project-am-buffer-object

project-am-buffer-object is a byte-compiled function defined in project-am.el.gz.

Signature

(project-am-buffer-object AMF BUFFER)

Documentation

Return an object starting with AMF associated with BUFFER.

nil means that this buffer belongs to no-one.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/ede/project-am.el.gz
(defun project-am-buffer-object (amf buffer)
  "Return an object starting with AMF associated with BUFFER.
nil means that this buffer belongs to no-one."
  (if (not amf)
      nil
    (if (ede-buffer-mine amf buffer)
	amf
      (let ((targ (oref amf targets))
	    (sobj (oref amf subproj))
	    (obj nil))
	(while (and targ (not obj))
	  (if (ede-buffer-mine (car targ) buffer)
	      (setq obj (car targ)))
	  (setq targ (cdr targ)))
	(while (and sobj (not obj))
	  (setq obj (project-am-buffer-object (car sobj) buffer)
		sobj (cdr sobj)))
	obj))))