Function: ede-find-target
ede-find-target is a byte-compiled function defined in ede.el.gz.
Signature
(ede-find-target ARG &rest ARGS)
Implementations
(ede-find-target (PROJ ede-generic-project) BUFFER) in `ede/generic.el'.
Find an EDE target in PROJ for BUFFER. If one doesn't exist, create a new one for this directory.
(ede-find-target (PROJ ede-linux-project) BUFFER) in `ede/linux.el'.
Find an EDE target in PROJ for BUFFER. If one doesn't exist, create a new one for this directory.
(ede-find-target (PROJ ede-cpp-root-project) BUFFER) in `ede/cpp-root.el'.
Find an EDE target in PROJ for BUFFER. If one doesn't exist, create a new one for this directory.
(ede-find-target (PROJ ede-project) BUFFER) in `ede.el'.
Fetch the target in PROJ belonging to BUFFER or nil.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/ede.el.gz
(cl-defmethod ede-find-target ((proj ede-project) buffer)
"Fetch the target in PROJ belonging to BUFFER or nil."
(with-current-buffer buffer
;; We can do a short-ut if ede-object local variable is set.
(if ede-object
;; If the buffer is already loaded with good EDE stuff, make sure the
;; saved project is the project we're looking for.
(when (and ede-object-project (eq proj ede-object-project)) ede-object)
;; If the variable wasn't set, then we are probably initializing the buffer.
;; In that case, search the file system.
(if (ede-buffer-mine proj buffer)
proj
(let ((targets (oref proj targets))
(f nil))
(while targets
(if (ede-buffer-mine (car targets) buffer)
(setq f (cons (car targets) f)))
(setq targets (cdr targets)))
f)))))