Commit 73b17f7c authored by Stefan Monnier's avatar Stefan Monnier

* lisp/cedet: Use cl-generic instead of EIEIO's defgeneric/defmethod

* lisp/cedet/**/*.el: Mechanically replace all calls to defmethod/defgeneric
by calls to cl-defmethod/cl-defgeneric.
* lisp/cedet/srecode/table.el:
* lisp/cedet/srecode/fields.el:
* lisp/cedet/srecode/dictionary.el:
* lisp/cedet/srecode/compile.el:
* lisp/cedet/semantic/debug.el:
* lisp/cedet/semantic/db-ref.el:
* lisp/cedet/ede/base.el:
* lisp/cedet/ede/auto.el:
* lisp/cedet/ede.el: Require `cl-generic'.
parent 102a21d6
2015-02-04 Stefan Monnier <monnier@iro.umontreal.ca>
Use cl-generic instead of EIEIO's defgeneric/defmethod.
* **/*.el: Mechanically replace all calls to defmethod/defgeneric by
calls to cl-defmethod/cl-defgeneric.
* srecode/table.el:
* srecode/fields.el:
* srecode/dictionary.el:
* srecode/compile.el:
* semantic/debug.el:
* semantic/db-ref.el:
* ede/base.el:
* ede/auto.el:
* ede.el: Require `cl-generic'.
2015-01-07 Stefan Monnier <monnier@iro.umontreal.ca>
Don't use <class> as a variable and don't assume that <class>-list-p is
......
......@@ -41,6 +41,7 @@
(require 'cedet)
(require 'eieio)
(require 'cl-generic)
(require 'eieio-speedbar)
(require 'ede/source)
(require 'ede/base)
......@@ -430,7 +431,7 @@ version of the keymap."
;;; Menu building methods for building
;;
(defmethod ede-menu-items-build ((obj ede-project) &optional current)
(cl-defmethod ede-menu-items-build ((obj ede-project) &optional current)
"Return a list of menu items for building project OBJ.
If optional argument CURRENT is non-nil, return sub-menu code."
(if current
......@@ -440,7 +441,7 @@ If optional argument CURRENT is non-nil, return sub-menu code."
(concat "Build Project " (ede-name obj))
`(project-compile-project ,obj))))))
(defmethod ede-menu-items-build ((obj ede-target) &optional current)
(cl-defmethod ede-menu-items-build ((obj ede-target) &optional current)
"Return a list of menu items for building target OBJ.
If optional argument CURRENT is non-nil, return sub-menu code."
(if current
......@@ -821,7 +822,7 @@ Optional argument NAME is the name to give this project."
;; Allert the user
(message "Project created and saved. You may now create targets."))
(defmethod ede-add-subproject ((proj-a ede-project) proj-b)
(cl-defmethod ede-add-subproject ((proj-a ede-project) proj-b)
"Add into PROJ-A, the subproject PROJ-B."
(oset proj-a subproj (cons proj-b (oref proj-a subproj))))
......@@ -986,75 +987,75 @@ Optional argument FORCE forces the file to be removed without asking."
;; files should inherit from `ede-project'. Create the appropriate
;; methods based on those below.
(defmethod project-interactive-select-target ((this ede-project-placeholder) prompt)
(cl-defmethod project-interactive-select-target ((this ede-project-placeholder) prompt)
; checkdoc-params: (prompt)
"Make sure placeholder THIS is replaced with the real thing, and pass through."
(project-interactive-select-target this prompt))
(defmethod project-interactive-select-target ((this ede-project) prompt)
(cl-defmethod project-interactive-select-target ((this ede-project) prompt)
"Interactively query for a target that exists in project THIS.
Argument PROMPT is the prompt to use when querying the user for a target."
(let ((ob (object-assoc-list 'name (oref this targets))))
(cdr (assoc (completing-read prompt ob nil t) ob))))
(defmethod project-add-file ((this ede-project-placeholder) file)
(cl-defmethod project-add-file ((this ede-project-placeholder) file)
; checkdoc-params: (file)
"Make sure placeholder THIS is replaced with the real thing, and pass through."
(project-add-file this file))
(defmethod project-add-file ((ot ede-target) file)
(cl-defmethod project-add-file ((ot ede-target) file)
"Add the current buffer into project project target OT.
Argument FILE is the file to add."
(error "add-file not supported by %s" (eieio-object-name ot)))
(defmethod project-remove-file ((ot ede-target) fnnd)
(cl-defmethod project-remove-file ((ot ede-target) fnnd)
"Remove the current buffer from project target OT.
Argument FNND is an argument."
(error "remove-file not supported by %s" (eieio-object-name ot)))
(defmethod project-edit-file-target ((ot ede-target))
(cl-defmethod project-edit-file-target ((ot ede-target))
"Edit the target OT associated with this file."
(find-file (oref (ede-current-project) file)))
(defmethod project-new-target ((proj ede-project) &rest args)
(cl-defmethod project-new-target ((proj ede-project) &rest args)
"Create a new target. It is up to the project PROJ to get the name."
(error "new-target not supported by %s" (eieio-object-name proj)))
(defmethod project-new-target-custom ((proj ede-project))
(cl-defmethod project-new-target-custom ((proj ede-project))
"Create a new target. It is up to the project PROJ to get the name."
(error "New-target-custom not supported by %s" (eieio-object-name proj)))
(defmethod project-delete-target ((ot ede-target))
(cl-defmethod project-delete-target ((ot ede-target))
"Delete the current target OT from its parent project."
(error "add-file not supported by %s" (eieio-object-name ot)))
(defmethod project-compile-project ((obj ede-project) &optional command)
(cl-defmethod project-compile-project ((obj ede-project) &optional command)
"Compile the entire current project OBJ.
Argument COMMAND is the command to use when compiling."
(error "compile-project not supported by %s" (eieio-object-name obj)))
(defmethod project-compile-target ((obj ede-target) &optional command)
(cl-defmethod project-compile-target ((obj ede-target) &optional command)
"Compile the current target OBJ.
Argument COMMAND is the command to use for compiling the target."
(error "compile-target not supported by %s" (eieio-object-name obj)))
(defmethod project-debug-target ((obj ede-target))
(cl-defmethod project-debug-target ((obj ede-target))
"Run the current project target OBJ in a debugger."
(error "debug-target not supported by %s" (eieio-object-name obj)))
(defmethod project-run-target ((obj ede-target))
(cl-defmethod project-run-target ((obj ede-target))
"Run the current project target OBJ."
(error "run-target not supported by %s" (eieio-object-name obj)))
(defmethod project-make-dist ((this ede-project))
(cl-defmethod project-make-dist ((this ede-project))
"Build a distribution for the project based on THIS project."
(error "Make-dist not supported by %s" (eieio-object-name this)))
(defmethod project-dist-files ((this ede-project))
(cl-defmethod project-dist-files ((this ede-project))
"Return a list of files that constitute a distribution of THIS project."
(error "Dist-files is not supported by %s" (eieio-object-name this)))
(defmethod project-rescan ((this ede-project))
(cl-defmethod project-rescan ((this ede-project))
"Rescan the EDE project THIS."
(error "Rescanning a project is not supported by %s" (eieio-object-name this)))
......@@ -1248,7 +1249,7 @@ that contains the target that becomes buffer's object."
;; Return our findings.
ede-object))
(defmethod ede-target-in-project-p ((proj ede-project) target)
(cl-defmethod ede-target-in-project-p ((proj ede-project) target)
"Is PROJ the parent of TARGET?
If TARGET belongs to a subproject, return that project file."
(if (and (slot-boundp proj 'targets)
......@@ -1273,7 +1274,7 @@ could become slow in time."
projs (cdr projs)))
ans)))
(defmethod ede-find-target ((proj ede-project) buffer)
(cl-defmethod ede-find-target ((proj ede-project) buffer)
"Fetch the target in PROJ belonging to BUFFER or nil."
(with-current-buffer buffer
......@@ -1295,16 +1296,16 @@ could become slow in time."
(setq targets (cdr targets)))
f)))))
(defmethod ede-target-buffer-in-sourcelist ((this ede-target) buffer source)
(cl-defmethod ede-target-buffer-in-sourcelist ((this ede-target) buffer source)
"Return non-nil if object THIS is in BUFFER to a SOURCE list.
Handles complex path issues."
(member (ede-convert-path this (buffer-file-name buffer)) source))
(defmethod ede-buffer-mine ((this ede-project) buffer)
(cl-defmethod ede-buffer-mine ((this ede-project) buffer)
"Return non-nil if object THIS lays claim to the file in BUFFER."
nil)
(defmethod ede-buffer-mine ((this ede-target) buffer)
(cl-defmethod ede-buffer-mine ((this ede-target) buffer)
"Return non-nil if object THIS lays claim to the file in BUFFER."
(condition-case nil
(ede-target-buffer-in-sourcelist this buffer (oref this source))
......@@ -1354,22 +1355,22 @@ This includes buffers controlled by a specific target of PROJECT."
"Execute PROC on all buffers controlled by EDE."
(mapcar proc (ede-buffers)))
(defmethod ede-map-project-buffers ((this ede-project) proc)
(cl-defmethod ede-map-project-buffers ((this ede-project) proc)
"For THIS, execute PROC on all buffers belonging to THIS."
(mapcar proc (ede-project-buffers this)))
(defmethod ede-map-target-buffers ((this ede-target) proc)
(cl-defmethod ede-map-target-buffers ((this ede-target) proc)
"For THIS, execute PROC on all buffers belonging to THIS."
(mapcar proc (ede-target-buffers this)))
;; other types of mapping
(defmethod ede-map-subprojects ((this ede-project) proc)
(cl-defmethod ede-map-subprojects ((this ede-project) proc)
"For object THIS, execute PROC on all direct subprojects.
This function does not apply PROC to sub-sub projects.
See also `ede-map-all-subprojects'."
(mapcar proc (oref this subproj)))
(defmethod ede-map-all-subprojects ((this ede-project) allproc)
(cl-defmethod ede-map-all-subprojects ((this ede-project) allproc)
"For object THIS, execute PROC on THIS and all subprojects.
This function also applies PROC to sub-sub projects.
See also `ede-map-subprojects'."
......@@ -1383,11 +1384,11 @@ See also `ede-map-subprojects'."
;; (ede-map-all-subprojects (ede-load-project-file "../semantic/") (lambda (sp) (oref sp file)))
(defmethod ede-map-targets ((this ede-project) proc)
(cl-defmethod ede-map-targets ((this ede-project) proc)
"For object THIS, execute PROC on all targets."
(mapcar proc (oref this targets)))
(defmethod ede-map-any-target-p ((this ede-project) proc)
(cl-defmethod ede-map-any-target-p ((this ede-project) proc)
"For project THIS, map PROC to all targets and return if any non-nil.
Return the first non-nil value returned by PROC."
(eval (cons 'or (ede-map-targets this proc))))
......@@ -1399,15 +1400,15 @@ Return the first non-nil value returned by PROC."
;; configuring items for Semantic.
;; Generic paths
(defmethod ede-system-include-path ((this ede-project))
(cl-defmethod ede-system-include-path ((this ede-project))
"Get the system include path used by project THIS."
nil)
(defmethod ede-system-include-path ((this ede-target))
(cl-defmethod ede-system-include-path ((this ede-target))
"Get the system include path used by project THIS."
nil)
(defmethod ede-source-paths ((this ede-project) mode)
(cl-defmethod ede-source-paths ((this ede-project) mode)
"Get the base to all source trees in the current project for MODE.
For example, <root>/src for sources of c/c++, Java, etc,
and <root>/doc for doc sources."
......@@ -1435,20 +1436,20 @@ and <root>/doc for doc sources."
(message "Choosing preprocessor syms for project %s"
(eieio-object-name (car objs)))))))
(defmethod ede-system-include-path ((this ede-project))
(cl-defmethod ede-system-include-path ((this ede-project))
"Get the system include path used by project THIS."
nil)
(defmethod ede-preprocessor-map ((this ede-project))
(cl-defmethod ede-preprocessor-map ((this ede-project))
"Get the pre-processor map for project THIS."
nil)
(defmethod ede-preprocessor-map ((this ede-target))
(cl-defmethod ede-preprocessor-map ((this ede-target))
"Get the pre-processor map for project THIS."
nil)
;; Java
(defmethod ede-java-classpath ((this ede-project))
(cl-defmethod ede-java-classpath ((this ede-project))
"Return the classpath for this project."
;; @TODO - Can JDEE add something here?
nil)
......@@ -1504,7 +1505,7 @@ It does not apply the value to buffers."
(error "Cannot set project variable until it is added with `ede-make-project-local-variable'"))
(setcdr va value)))
(defmethod ede-set-project-variables ((project ede-project) &optional buffer)
(cl-defmethod ede-set-project-variables ((project ede-project) &optional buffer)
"Set variables local to PROJECT in BUFFER."
(if (not buffer) (setq buffer (current-buffer)))
(with-current-buffer buffer
......@@ -1512,7 +1513,7 @@ It does not apply the value to buffers."
(make-local-variable (car v))
(set (car v) (cdr v)))))
(defmethod ede-commit-local-variables ((proj ede-project))
(cl-defmethod ede-commit-local-variables ((proj ede-project))
"Commit change to local variables in PROJ."
nil)
......
......@@ -30,6 +30,7 @@
;;; Code:
(require 'eieio)
(require 'cl-generic)
(declare-function ede-directory-safe-p "ede")
(declare-function ede-add-project-to-global-list "ede")
......@@ -62,7 +63,7 @@ location is varied dependent on other complex criteria, this class
can be used to define that match without loading the specific project
into memory.")
(defmethod ede-dirmatch-installed ((dirmatch ede-project-autoload-dirmatch))
(cl-defmethod ede-dirmatch-installed ((dirmatch ede-project-autoload-dirmatch))
"Return non-nil if the tool DIRMATCH might match is installed on the system."
(let ((fc (oref dirmatch fromconfig)))
......@@ -77,7 +78,7 @@ into memory.")
(t (error "Unknown dirmatch type.")))))
(defmethod ede-do-dirmatch ((dirmatch ede-project-autoload-dirmatch) file)
(cl-defmethod ede-do-dirmatch ((dirmatch ede-project-autoload-dirmatch) file)
"Does DIRMATCH match the filename FILE."
(let ((fc (oref dirmatch fromconfig)))
......@@ -271,7 +272,7 @@ added. Possible values are:
;;
;; New method using detect.el
(defmethod ede-auto-detect-in-dir ((this ede-project-autoload) dir)
(cl-defmethod ede-auto-detect-in-dir ((this ede-project-autoload) dir)
"Return non-nil if THIS project autoload is found in DIR."
(let* ((d (file-name-as-directory dir))
(pf (oref this proj-file))
......@@ -288,7 +289,7 @@ added. Possible values are:
;(message "Dirmatch %S not installed." dirmatch)
)))))))
(defmethod ede-auto-load-project ((this ede-project-autoload) dir)
(cl-defmethod ede-auto-load-project ((this ede-project-autoload) dir)
"Load in the project associated with THIS project autoload description.
THIS project description should be valid for DIR, where the project will
be loaded.
......@@ -315,13 +316,13 @@ NOTE: Do not call this - it should only be called from `ede-load-project-file'."
;; See if we can do without them.
;; @FIXME - delete from loaddefs to remove this.
(defmethod ede-project-root ((this ede-project-autoload))
(cl-defmethod ede-project-root ((this ede-project-autoload))
"If a project knows its root, return it here.
Allows for one-project-object-for-a-tree type systems."
nil)
;; @FIXME - delete from loaddefs to remove this.
(defmethod ede-project-root-directory ((this ede-project-autoload) &optional file)
(cl-defmethod ede-project-root-directory ((this ede-project-autoload) &optional file)
"" nil)
(provide 'ede/auto)
......
......@@ -27,6 +27,7 @@
;;; Code:
(require 'eieio)
(require 'cl-generic)
(require 'eieio-speedbar)
(require 'ede/auto)
......@@ -402,7 +403,7 @@ If set to nil, then the cache is not saved."
;;
;; Mode related methods are in ede.el. These methods are related
;; project specific activities not directly tied to a keybinding.
(defmethod ede-subproject-relative-path ((proj ede-project) &optional parent-in)
(cl-defmethod ede-subproject-relative-path ((proj ede-project) &optional parent-in)
"Get a path name for PROJ which is relative to the parent project.
If PARENT is specified, then be relative to the PARENT project.
Specifying PARENT is useful for sub-sub projects relative to the root project."
......@@ -412,7 +413,7 @@ Specifying PARENT is useful for sub-sub projects relative to the root project."
(file-relative-name dir (file-name-directory (oref parent file)))
"")))
(defmethod ede-subproject-p ((proj ede-project))
(cl-defmethod ede-subproject-p ((proj ede-project))
"Return non-nil if PROJ is a sub project."
;; @TODO - Use this in more places, and also pay attention to
;; metasubproject in ede/proj.el
......@@ -425,26 +426,26 @@ Specifying PARENT is useful for sub-sub projects relative to the root project."
;; no need to in most situations because they are either a) simple, or
;; b) cosmetic.
(defmethod ede-name ((this ede-target))
(cl-defmethod ede-name ((this ede-target))
"Return the name of THIS target."
(oref this name))
(defmethod ede-target-name ((this ede-target))
(cl-defmethod ede-target-name ((this ede-target))
"Return the name of THIS target, suitable for make or debug style commands."
(oref this name))
(defmethod ede-name ((this ede-project))
(cl-defmethod ede-name ((this ede-project))
"Return a short-name for THIS project file.
Do this by extracting the lowest directory name."
(oref this name))
(defmethod ede-description ((this ede-project))
(cl-defmethod ede-description ((this ede-project))
"Return a description suitable for the minibuffer about THIS."
(format "Project %s: %d subprojects, %d targets."
(ede-name this) (length (oref this subproj))
(length (oref this targets))))
(defmethod ede-description ((this ede-target))
(cl-defmethod ede-description ((this ede-target))
"Return a description suitable for the minibuffer about THIS."
(format "Target %s: with %d source files."
(ede-name this) (length (oref this source))))
......@@ -463,11 +464,11 @@ Not all buffers need headers, so return nil if no applicable."
(ede-buffer-header-file ede-object (current-buffer))
nil))
(defmethod ede-buffer-header-file ((this ede-project) buffer)
(cl-defmethod ede-buffer-header-file ((this ede-project) buffer)
"Return nil, projects don't have header files."
nil)
(defmethod ede-buffer-header-file ((this ede-target) buffer)
(cl-defmethod ede-buffer-header-file ((this ede-target) buffer)
"There are no default header files in EDE.
Do a quick check to see if there is a Header tag in this buffer."
(with-current-buffer buffer
......@@ -489,12 +490,12 @@ Some projects may have multiple documentation files, so return a list."
(ede-buffer-documentation-files ede-object (current-buffer))
nil))
(defmethod ede-buffer-documentation-files ((this ede-project) buffer)
(cl-defmethod ede-buffer-documentation-files ((this ede-project) buffer)
"Return all documentation in project THIS based on BUFFER."
;; Find the info node.
(ede-documentation this))
(defmethod ede-buffer-documentation-files ((this ede-target) buffer)
(cl-defmethod ede-buffer-documentation-files ((this ede-target) buffer)
"Check for some documentation files for THIS.
Also do a quick check to see if there is a Documentation tag in this BUFFER."
(with-current-buffer buffer
......@@ -505,7 +506,7 @@ Also do a quick check to see if there is a Documentation tag in this BUFFER."
(let ((cp (ede-toplevel)))
(ede-buffer-documentation-files cp (current-buffer))))))
(defmethod ede-documentation ((this ede-project))
(cl-defmethod ede-documentation ((this ede-project))
"Return a list of files that provide documentation.
Documentation is not for object THIS, but is provided by THIS for other
files in the project."
......@@ -520,7 +521,7 @@ files in the project."
proj (cdr proj)))
found))
(defmethod ede-documentation ((this ede-target))
(cl-defmethod ede-documentation ((this ede-target))
"Return a list of files that provide documentation.
Documentation is not for object THIS, but is provided by THIS for other
files in the project."
......@@ -531,7 +532,7 @@ files in the project."
(ede-html-documentation (ede-toplevel))
)
(defmethod ede-html-documentation ((this ede-project))
(cl-defmethod ede-html-documentation ((this ede-project))
"Return a list of HTML files provided by project THIS."
)
......@@ -541,7 +542,7 @@ files in the project."
;; These methods are used to determine if a target "wants", or could
;; somehow handle a file, or some source type.
;;
(defmethod ede-want-file-p ((this ede-target) file)
(cl-defmethod ede-want-file-p ((this ede-target) file)
"Return non-nil if THIS target wants FILE."
;; By default, all targets reference the source object, and let it decide.
(let ((src (ede-target-sourcecode this)))
......@@ -549,7 +550,7 @@ files in the project."
(setq src (cdr src)))
src))
(defmethod ede-want-file-source-p ((this ede-target) file)
(cl-defmethod ede-want-file-source-p ((this ede-target) file)
"Return non-nil if THIS target wants FILE."
;; By default, all targets reference the source object, and let it decide.
(let ((src (ede-target-sourcecode this)))
......@@ -557,7 +558,7 @@ files in the project."
(setq src (cdr src)))
src))
(defmethod ede-target-sourcecode ((this ede-target))
(cl-defmethod ede-target-sourcecode ((this ede-target))
"Return the sourcecode objects which THIS permits."
(let ((sc (oref this sourcetype))
(rs nil))
......
......@@ -113,7 +113,7 @@ initialize the :file slot of the persistent baseclass.")
;;; Rescanning
(defmethod project-rescan ((this ede-project-with-config))
(cl-defmethod project-rescan ((this ede-project-with-config))
"Rescan this generic project from the sources."
;; Force the config to be rescanned.
(oset this config nil)
......@@ -123,7 +123,7 @@ initialize the :file slot of the persistent baseclass.")
;;; Project Methods for configuration
(defmethod ede-config-get-configuration ((proj ede-project-with-config) &optional loadask)
(cl-defmethod ede-config-get-configuration ((proj ede-project-with-config) &optional loadask)
"Return the configuration for the project PROJ.
If optional LOADASK is non-nil, then if a project file exists, and if
the directory isn't on the `safe' list, ask to add it to the safe list."
......@@ -170,28 +170,28 @@ the directory isn't on the `safe' list, ask to add it to the safe list."
(oset config project proj)))
config))
(defmethod ede-config-setup-configuration ((proj ede-project-with-config) config)
(cl-defmethod ede-config-setup-configuration ((proj ede-project-with-config) config)
"Default configuration setup method."
nil)
(defmethod ede-commit-project ((proj ede-project-with-config))
(cl-defmethod ede-commit-project ((proj ede-project-with-config))
"Commit any change to PROJ to its file."
(let ((config (ede-config-get-configuration proj)))
(ede-commit config)))
;;; Customization
;;
(defmethod ede-customize ((proj ede-project-with-config))
(cl-defmethod ede-customize ((proj ede-project-with-config))
"Customize the EDE project PROJ by actually configuring the config object."
(let ((config (ede-config-get-configuration proj t)))
(eieio-customize-object config)))
(defmethod ede-customize ((target ede-target-with-config))
(cl-defmethod ede-customize ((target ede-target-with-config))
"Customize the EDE TARGET by actually configuring the config object."
;; Nothing unique for the targets, use the project.
(ede-customize-project))
(defmethod eieio-done-customizing ((config ede-extra-config))
(cl-defmethod eieio-done-customizing ((config ede-extra-config))
"Called when EIEIO is done customizing the configuration object.
We need to go back through the old buffers, and update them with
the new configuration."
......@@ -206,7 +206,7 @@ the new configuration."
(with-current-buffer b
(ede-apply-target-options)))))))
(defmethod ede-commit ((config ede-extra-config))
(cl-defmethod ede-commit ((config ede-extra-config))
"Commit all changes to the configuration to disk."
;; So long as the user is trying to safe this config, make sure they can
;; get at it again later.
......@@ -253,7 +253,7 @@ the new configuration."
This class brings in method overloads for running and debugging
programs from a project.")
(defmethod project-debug-target ((target ede-target-with-config-program))
(cl-defmethod project-debug-target ((target ede-target-with-config-program))
"Run the current project derived from TARGET in a debugger."
(let* ((proj (ede-target-parent target))
(config (ede-config-get-configuration proj t))
......@@ -268,7 +268,7 @@ programs from a project.")
(cmdsym (intern-soft (car cmdsplit))))
(call-interactively cmdsym t)))
(defmethod project-run-target ((target ede-target-with-config-program))
(cl-defmethod project-run-target ((target ede-target-with-config-program))
"Run the current project derived from TARGET."
(let* ((proj (ede-target-parent target))
(config (ede-config-get-configuration proj t))
......@@ -299,14 +299,14 @@ This class brings in method overloads for building.")
"Class to mix into a project with configuration for builds.
This class brings in method overloads for for building.")
(defmethod project-compile-project ((proj ede-project-with-config-build) &optional command)
(cl-defmethod project-compile-project ((proj ede-project-with-config-build) &optional command)
"Compile the entire current project PROJ.
Argument COMMAND is the command to use when compiling."
(let* ((config (ede-config-get-configuration proj t))
(comp (oref config :build-command)))
(compile comp)))
(defmethod project-compile-target ((obj ede-target-with-config-build) &optional command)
(cl-defmethod project-compile-target ((obj ede-target-with-config-build) &optional command)
"Compile the current target OBJ.
Argument COMMAND is the command to use for compiling the target."
(project-compile-project (ede-current-project) command))
......@@ -358,7 +358,7 @@ parsed again."))
This target brings in methods used by Semantic to query
the preprocessor map, and include paths.")
(defmethod ede-preprocessor-map ((this ede-target-with-config-c))
(cl-defmethod ede-preprocessor-map ((this ede-target-with-config-c))
"Get the pre-processor map for some generic C code."
(let* ((proj (ede-target-parent this))
(root (ede-project-root proj))
......@@ -380,7 +380,7 @@ the preprocessor map, and include paths.")
filemap
))
(defmethod ede-system-include-path ((this ede-target-with-config-c))
(cl-defmethod ede-system-include-path ((this ede-target-with-config-c))
"Get the system include path used by project THIS."
(let* ((proj (ede-target-parent this))
(config (ede-config-get-configuration proj)))
......@@ -402,7 +402,7 @@ java class path.")
()
"Class to mix into a project to support java.")
(defmethod ede-java-classpath ((proj ede-project-with-config-java))
(cl-defmethod ede-java-classpath ((proj ede-project-with-config-java))
"Return the classpath for this project."
(oref (ede-config-get-configuration proj) :classpath))
......
......@@ -276,11 +276,11 @@ Each directory needs a project file to control it.")
;; find previous copies of this project, and make sure that one of the
;; objects is deleted.
(defmethod initialize-instance ((this ede-cpp-root-project)
(cl-defmethod initialize-instance ((this ede-cpp-root-project)
&rest fields)
"Make sure the :file is fully expanded."
;; Add ourselves to the master list
(call-next-method)