diff options
Diffstat (limited to 'lisp/cedet/ede')
29 files changed, 347 insertions, 345 deletions
diff --git a/lisp/cedet/ede/auto.el b/lisp/cedet/ede/auto.el index 769bea4ce5..7e8df6b89a 100644 --- a/lisp/cedet/ede/auto.el +++ b/lisp/cedet/ede/auto.el @@ -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) diff --git a/lisp/cedet/ede/base.el b/lisp/cedet/ede/base.el index ce7857b53a..6d5e242de0 100644 --- a/lisp/cedet/ede/base.el +++ b/lisp/cedet/ede/base.el @@ -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)) diff --git a/lisp/cedet/ede/config.el b/lisp/cedet/ede/config.el index e479af0559..f91a6c1751 100644 --- a/lisp/cedet/ede/config.el +++ b/lisp/cedet/ede/config.el @@ -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)) diff --git a/lisp/cedet/ede/cpp-root.el b/lisp/cedet/ede/cpp-root.el index e32066af89..81c6737531 100644 --- a/lisp/cedet/ede/cpp-root.el +++ b/lisp/cedet/ede/cpp-root.el @@ -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) + (cl-call-next-method) (let ((f (expand-file-name (oref this :file)))) ;; Remove any previous entries from the main list. (let ((old (eieio-instance-tracker-find (file-name-directory f) @@ -311,7 +311,7 @@ Each directory needs a project file to control it.") ;; This is a way to allow a subdirectory to point back to the root ;; project, simplifying authoring new single-point projects. -(defmethod ede-find-subproject-for-directory ((proj ede-cpp-root-project) +(cl-defmethod ede-find-subproject-for-directory ((proj ede-cpp-root-project) dir) "Return PROJ, for handling all subdirs below DIR." proj) @@ -321,7 +321,7 @@ Each directory needs a project file to control it.") ;; Creating new targets on a per directory basis is a good way to keep ;; files organized. See ede-emacs for an example with multiple file ;; types. -(defmethod ede-find-target ((proj ede-cpp-root-project) buffer) +(cl-defmethod ede-find-target ((proj ede-cpp-root-project) buffer) "Find an EDE target in PROJ for BUFFER. If one doesn't exist, create a new one for this directory." (let* ((targets (oref proj targets)) @@ -347,13 +347,13 @@ If one doesn't exist, create a new one for this directory." ;; ;; This tools also uses the ede-locate setup for augmented file name ;; lookup using external tools. -(defmethod ede-expand-filename-impl ((proj ede-cpp-root-project) name) +(cl-defmethod ede-expand-filename-impl ((proj ede-cpp-root-project) name) "Within this project PROJ, find the file NAME. This knows details about or source tree." ;; The slow part of the original is looping over subprojects. ;; This version has no subprojects, so this will handle some ;; basic cases. - (let ((ans (call-next-method))) + (let ((ans (cl-call-next-method))) (unless ans (let* ((lf (oref proj locate-fcn)) (dir (file-name-directory (oref proj file)))) @@ -372,16 +372,16 @@ This knows details about or source tree." (setq ans tmp)) (setq ip (cdr ip)) )) ;; Else, do the usual. - (setq ans (call-next-method))) + (setq ans (cl-call-next-method))) ))) ;; TODO - does this call-next-method happen twice. Is that bad?? Why is it here? - (or ans (call-next-method)))) + (or ans (cl-call-next-method)))) -(defmethod ede-project-root ((this ede-cpp-root-project)) +(cl-defmethod ede-project-root ((this ede-cpp-root-project)) "Return my root." this) -(defmethod ede-project-root-directory ((this ede-cpp-root-project)) +(cl-defmethod ede-project-root-directory ((this ede-cpp-root-project)) "Return my root." (oref this directory)) @@ -390,12 +390,12 @@ This knows details about or source tree." ;; The following code is specific to setting up header files, ;; include lists, and Preprocessor symbol tables. -(defmethod ede-cpp-root-header-file-p ((proj ede-cpp-root-project) name) +(cl-defmethod ede-cpp-root-header-file-p ((proj ede-cpp-root-project) name) "Non nil if in PROJ the filename NAME is a header." (save-match-data (string-match (oref proj header-match-regexp) name))) -(defmethod ede-cpp-root-translate-file ((proj ede-cpp-root-project) filename) +(cl-defmethod ede-cpp-root-translate-file ((proj ede-cpp-root-project) filename) "For PROJ, translate a user specified FILENAME. This is for project include paths and spp source files." ;; Step one: Root of this project. @@ -411,11 +411,11 @@ This is for project include paths and spp source files." filename)) -(defmethod ede-system-include-path ((this ede-cpp-root-project)) +(cl-defmethod ede-system-include-path ((this ede-cpp-root-project)) "Get the system include path used by project THIS." (oref this system-include-path)) -(defmethod ede-preprocessor-map ((this ede-cpp-root-project)) +(cl-defmethod ede-preprocessor-map ((this ede-cpp-root-project)) "Get the pre-processor map for project THIS." (require 'semantic/db) (let ((spp (oref this spp-table)) @@ -445,15 +445,15 @@ This is for project include paths and spp source files." (oref this spp-files)) spp)) -(defmethod ede-system-include-path ((this ede-cpp-root-target)) +(cl-defmethod ede-system-include-path ((this ede-cpp-root-target)) "Get the system include path used by target THIS." (ede-system-include-path (ede-target-parent this))) -(defmethod ede-preprocessor-map ((this ede-cpp-root-target)) +(cl-defmethod ede-preprocessor-map ((this ede-cpp-root-target)) "Get the pre-processor map for project THIS." (ede-preprocessor-map (ede-target-parent this))) -(defmethod project-compile-project ((proj ede-cpp-root-project) &optional command) +(cl-defmethod project-compile-project ((proj ede-cpp-root-project) &optional command) "Compile the entire current project PROJ. Argument COMMAND is the command to use when compiling." ;; we need to be in the proj root dir for this to work @@ -469,14 +469,14 @@ Argument COMMAND is the command to use when compiling." (let ((default-directory (ede-project-root-directory proj))) (compile cmd-str))))) -(defmethod project-compile-target ((obj ede-cpp-root-target) &optional command) +(cl-defmethod project-compile-target ((obj ede-cpp-root-target) &optional command) "Compile the current target OBJ. Argument COMMAND is the command to use for compiling the target." (when (oref obj :project) (project-compile-project (oref obj :project) command))) -(defmethod project-rescan ((this ede-cpp-root-project)) +(cl-defmethod project-rescan ((this ede-cpp-root-project)) "Don't rescan this project from the sources." (message "cpp-root has nothing to rescan.")) diff --git a/lisp/cedet/ede/custom.el b/lisp/cedet/ede/custom.el index a39b488028..5b8783fd27 100644 --- a/lisp/cedet/ede/custom.el +++ b/lisp/cedet/ede/custom.el @@ -76,11 +76,11 @@ OBJ is the target object to customize." (error "No logical target to customize")) (ede-customize obj)) -(defmethod ede-customize ((proj ede-project)) +(cl-defmethod ede-customize ((proj ede-project)) "Customize the EDE project PROJ." (eieio-customize-object proj 'default)) -(defmethod ede-customize ((target ede-target)) +(cl-defmethod ede-customize ((target ede-target)) "Customize the EDE TARGET." (eieio-customize-object target 'default)) @@ -177,7 +177,7 @@ OBJ is the target object to customize." ;;; Customization hooks ;; ;; These hooks are used when finishing up a customization. -(defmethod eieio-done-customizing ((proj ede-project)) +(cl-defmethod eieio-done-customizing ((proj ede-project)) "Call this when a user finishes customizing PROJ." (let ((ov eieio-ede-old-variables) (nv (oref proj local-variables))) @@ -196,11 +196,11 @@ OBJ is the target object to customize." ;; These two methods should be implemented by subclasses of ;; project and targets in order to account for user specified ;; changes. -(defmethod eieio-done-customizing ((target ede-target)) +(cl-defmethod eieio-done-customizing ((target ede-target)) "Call this when a user finishes customizing TARGET." nil) -(defmethod ede-commit-project ((proj ede-project)) +(cl-defmethod ede-commit-project ((proj ede-project)) "Commit any change to PROJ to its file." nil ) diff --git a/lisp/cedet/ede/emacs.el b/lisp/cedet/ede/emacs.el index 621e8951dd..ca58810cdd 100644 --- a/lisp/cedet/ede/emacs.el +++ b/lisp/cedet/ede/emacs.el @@ -141,25 +141,25 @@ All directories need at least one target.") "EDE Emacs Project target for Misc files. All directories need at least one target.") -(defmethod initialize-instance ((this ede-emacs-project) +(cl-defmethod initialize-instance ((this ede-emacs-project) &rest fields) "Make sure the targets slot is bound." - (call-next-method) + (cl-call-next-method) (unless (slot-boundp this 'targets) (oset this :targets nil))) ;;; File Stuff ;; -(defmethod ede-project-root-directory ((this ede-emacs-project) +(cl-defmethod ede-project-root-directory ((this ede-emacs-project) &optional file) "Return the root for THIS Emacs project with file." (ede-up-directory (file-name-directory (oref this file)))) -(defmethod ede-project-root ((this ede-emacs-project)) +(cl-defmethod ede-project-root ((this ede-emacs-project)) "Return my root." this) -(defmethod ede-find-subproject-for-directory ((proj ede-emacs-project) +(cl-defmethod ede-find-subproject-for-directory ((proj ede-emacs-project) dir) "Return PROJ, for handling all subdirs below DIR." proj) @@ -176,7 +176,7 @@ All directories need at least one target.") )) match)) -(defmethod ede-find-target ((proj ede-emacs-project) buffer) +(cl-defmethod ede-find-target ((proj ede-emacs-project) buffer) "Find an EDE target in PROJ for BUFFER. If one doesn't exist, create a new one for this directory." (let* ((ext (file-name-extension (buffer-file-name buffer))) @@ -204,7 +204,7 @@ If one doesn't exist, create a new one for this directory." ;;; UTILITIES SUPPORT. ;; -(defmethod ede-preprocessor-map ((this ede-emacs-target-c)) +(cl-defmethod ede-preprocessor-map ((this ede-emacs-target-c)) "Get the pre-processor map for Emacs C code. All files need the macros from lisp.h!" (require 'semantic/db) @@ -253,7 +253,7 @@ All files need the macros from lisp.h!" (setq dirs (cdr dirs)))) ans)) -(defmethod ede-expand-filename-impl ((proj ede-emacs-project) name) +(cl-defmethod ede-expand-filename-impl ((proj ede-emacs-project) name) "Within this project PROJ, find the file NAME. Knows about how the Emacs source tree is organized." (let* ((ext (file-name-extension name)) @@ -269,13 +269,13 @@ Knows about how the Emacs source tree is organized." '("doc")) (t nil))) ) - (if (not dirs) (call-next-method) + (if (not dirs) (cl-call-next-method) (ede-emacs-find-in-directories name dir dirs)) )) ;;; Command Support ;; -(defmethod project-rescan ((this ede-emacs-project)) +(cl-defmethod project-rescan ((this ede-emacs-project)) "Rescan this Emacs project from the sources." (let ((ver (ede-emacs-version (ede-project-root-directory this)))) (oset this name (car ver)) diff --git a/lisp/cedet/ede/files.el b/lisp/cedet/ede/files.el index a3febfa4e5..1922337feb 100644 --- a/lisp/cedet/ede/files.el +++ b/lisp/cedet/ede/files.el @@ -69,12 +69,12 @@ the current EDE project." ;;; Placeholders for ROOT directory scanning on base objects ;; -(defmethod ede-project-root ((this ede-project-placeholder)) +(cl-defmethod ede-project-root ((this ede-project-placeholder)) "If a project knows its root, return it here. Allows for one-project-object-for-a-tree type systems." (oref this rootproject)) -(defmethod ede-project-root-directory ((this ede-project-placeholder) +(cl-defmethod ede-project-root-directory ((this ede-project-placeholder) &optional file) "If a project knows its root, return it here. Allows for one-project-object-for-a-tree type systems. @@ -116,7 +116,7 @@ of the anchor file for the project." (ede--put-inode-dir-hash dir (nth 10 fattr)) ))))) -(defmethod ede--project-inode ((proj ede-project-placeholder)) +(cl-defmethod ede--project-inode ((proj ede-project-placeholder)) "Get the inode of the directory project PROJ is in." (if (slot-boundp proj 'dirinode) (oref proj dirinode) @@ -217,7 +217,7 @@ If optional EXACT is non-nil, only return exact matches for DIR." ;; the short answer we found -> ie - we are in a subproject. (or ans shortans))) -(defmethod ede-find-subproject-for-directory ((proj ede-project-placeholder) +(cl-defmethod ede-find-subproject-for-directory ((proj ede-project-placeholder) dir) "Find a subproject of PROJ that corresponds to DIR." (if ede--disable-inode @@ -374,7 +374,7 @@ If DIR is not part of a project, return nil." ;;; DIRECTORY CONVERSION STUFF ;; -(defmethod ede-convert-path ((this ede-project) path) +(cl-defmethod ede-convert-path ((this ede-project) path) "Convert path in a standard way for a given project. Default to making it project relative. Argument THIS is the project to convert PATH to." @@ -388,7 +388,7 @@ Argument THIS is the project to convert PATH to." (substring fptf (match-end 0)) (error "Cannot convert relativize path %s" fp)))))) -(defmethod ede-convert-path ((this ede-target) path &optional project) +(cl-defmethod ede-convert-path ((this ede-target) path &optional project) "Convert path in a standard way for a given project. Default to making it project relative. Argument THIS is the project to convert PATH to. @@ -419,7 +419,7 @@ Get it from the toplevel project. If it doesn't have one, make one." (oref top locate-obj) ))) -(defmethod ede-expand-filename ((this ede-project) filename &optional force) +(cl-defmethod ede-expand-filename ((this ede-project) filename &optional force) "Return a fully qualified file name based on project THIS. FILENAME should be just a filename which occurs in a directory controlled by this project. @@ -476,7 +476,7 @@ is returned." ans)) -(defmethod ede-expand-filename-impl ((this ede-project) filename &optional force) +(cl-defmethod ede-expand-filename-impl ((this ede-project) filename &optional force) "Return a fully qualified file name based on project THIS. FILENAME should be just a filename which occurs in a directory controlled by this project. @@ -496,7 +496,7 @@ doesn't exist." ;; Return it found)) -(defmethod ede-expand-filename-local ((this ede-project) filename) +(cl-defmethod ede-expand-filename-local ((this ede-project) filename) "Expand filename locally to project THIS with filesystem tests." (let ((path (ede-project-root-directory this))) (cond ((file-exists-p (expand-file-name filename path)) @@ -504,7 +504,7 @@ doesn't exist." ((file-exists-p (expand-file-name (concat "include/" filename) path)) (expand-file-name (concat "include/" filename) path))))) -(defmethod ede-expand-filename-impl-via-subproj ((this ede-project) filename) +(cl-defmethod ede-expand-filename-impl-via-subproj ((this ede-project) filename) "Return a fully qualified file name based on project THIS. FILENAME should be just a filename which occurs in a directory controlled by this project." @@ -520,7 +520,7 @@ by this project." ;; Return it found)) -(defmethod ede-expand-filename ((this ede-target) filename &optional force) +(cl-defmethod ede-expand-filename ((this ede-target) filename &optional force) "Return a fully qualified file name based on target THIS. FILENAME should be a filename which occurs in a directory in which THIS works. Optional argument FORCE forces the default filename to be provided even if it diff --git a/lisp/cedet/ede/generic.el b/lisp/cedet/ede/generic.el index 4d1e0e2070..7e1425f131 100644 --- a/lisp/cedet/ede/generic.el +++ b/lisp/cedet/ede/generic.el @@ -148,19 +148,19 @@ The class allocated value is replace by different sub classes.") "The baseclass for all generic EDE project types." :abstract t) -(defmethod initialize-instance ((this ede-generic-project) +(cl-defmethod initialize-instance ((this ede-generic-project) &rest fields) "Make sure the targets slot is bound." - (call-next-method) + (cl-call-next-method) (unless (slot-boundp this 'targets) (oset this :targets nil)) ) -(defmethod ede-project-root ((this ede-generic-project)) +(cl-defmethod ede-project-root ((this ede-generic-project)) "Return my root." this) -(defmethod ede-find-subproject-for-directory ((proj ede-generic-project) +(cl-defmethod ede-find-subproject-for-directory ((proj ede-generic-project) dir) "Return PROJ, for handling all subdirs below DIR." proj) @@ -216,7 +216,7 @@ All directories need at least one target.") )) match)) -(defmethod ede-find-target ((proj ede-generic-project) buffer) +(cl-defmethod ede-find-target ((proj ede-generic-project) buffer) "Find an EDE target in PROJ for BUFFER. If one doesn't exist, create a new one for this directory." (let* ((ext (file-name-extension (buffer-file-name buffer))) @@ -322,7 +322,7 @@ the class `ede-generic-project' project." ) "Generic Project for makefiles.") -(defmethod ede-generic-setup-configuration ((proj ede-generic-makefile-project) config) +(cl-defmethod ede-generic-setup-configuration ((proj ede-generic-makefile-project) config) "Setup a configuration for Make." (oset config build-command "make -k") (oset config debug-command "gdb ") @@ -335,7 +335,7 @@ the class `ede-generic-project' project." ) "Generic Project for scons.") -(defmethod ede-generic-setup-configuration ((proj ede-generic-scons-project) config) +(cl-defmethod ede-generic-setup-configuration ((proj ede-generic-scons-project) config) "Setup a configuration for SCONS." (oset config build-command "scons") (oset config debug-command "gdb ") @@ -348,7 +348,7 @@ the class `ede-generic-project' project." ) "Generic Project for cmake.") -(defmethod ede-generic-setup-configuration ((proj ede-generic-cmake-project) config) +(cl-defmethod ede-generic-setup-configuration ((proj ede-generic-cmake-project) config) "Setup a configuration for CMake." (oset config build-command "cmake") (oset config debug-command "gdb ") @@ -359,7 +359,7 @@ the class `ede-generic-project' project." () "Generic project found via Version Control files.") -(defmethod ede-generic-setup-configuration ((proj ede-generic-vc-project) config) +(cl-defmethod ede-generic-setup-configuration ((proj ede-generic-vc-project) config) "Setup a configuration for projects identified by revision control." ) diff --git a/lisp/cedet/ede/linux.el b/lisp/cedet/ede/linux.el index c962724ce0..6887d38707 100644 --- a/lisp/cedet/ede/linux.el +++ b/lisp/cedet/ede/linux.el @@ -231,25 +231,25 @@ All directories need at least one target.") "EDE Linux Project target for Misc files. All directories need at least one target.") -(defmethod initialize-instance ((this ede-linux-project) +(cl-defmethod initialize-instance ((this ede-linux-project) &rest fields) "Make sure the targets slot is bound." - (call-next-method) + (cl-call-next-method) (unless (slot-boundp this 'targets) (oset this :targets nil))) ;;; File Stuff ;; -(defmethod ede-project-root-directory ((this ede-linux-project) +(cl-defmethod ede-project-root-directory ((this ede-linux-project) &optional file) "Return the root for THIS Linux project with file." (ede-up-directory (file-name-directory (oref this file)))) -(defmethod ede-project-root ((this ede-linux-project)) +(cl-defmethod ede-project-root ((this ede-linux-project)) "Return my root." this) -(defmethod ede-find-subproject-for-directory ((proj ede-linux-project) +(cl-defmethod ede-find-subproject-for-directory ((proj ede-linux-project) dir) "Return PROJ, for handling all subdirs below DIR." proj) @@ -266,7 +266,7 @@ All directories need at least one target.") )) match)) -(defmethod ede-find-target ((proj ede-linux-project) buffer) +(cl-defmethod ede-find-target ((proj ede-linux-project) buffer) "Find an EDE target in PROJ for BUFFER. If one doesn't exist, create a new one for this directory." (let* ((ext (file-name-extension (buffer-file-name buffer))) @@ -292,7 +292,7 @@ If one doesn't exist, create a new one for this directory." ;;; UTILITIES SUPPORT. ;; -(defmethod ede-preprocessor-map ((this ede-linux-target-c)) +(cl-defmethod ede-preprocessor-map ((this ede-linux-target-c)) "Get the pre-processor map for Linux C code. All files need the macros from lisp.h!" (require 'semantic/db) @@ -317,7 +317,7 @@ All files need the macros from lisp.h!" (let ((F (expand-file-name name (expand-file-name subdir root)))) (when (file-exists-p F) F))) -(defmethod ede-expand-filename-impl ((proj ede-linux-project) name) +(cl-defmethod ede-expand-filename-impl ((proj ede-linux-project) name) "Within this project PROJ, find the file NAME. Knows about how the Linux source tree is organized." (let* ((ext (file-name-extension name)) @@ -338,11 +338,11 @@ Knows about how the Linux source tree is organized." ((string-match "txt" ext) (ede-linux-file-exists-name name dir "Documentation")) (t nil)))) - (or F (call-next-method)))) + (or F (cl-call-next-method)))) ;;; Command Support ;; -(defmethod project-compile-project ((proj ede-linux-project) +(cl-defmethod project-compile-project ((proj ede-linux-project) &optional command) "Compile the entire current project. Argument COMMAND is the command to use when compiling." @@ -359,7 +359,7 @@ Argument COMMAND is the command to use when compiling." (compile command))) -(defmethod project-compile-target ((obj ede-linux-target-c) &optional command) +(cl-defmethod project-compile-target ((obj ede-linux-target-c) &optional command) "Compile the current target. Argument COMMAND is the command to use for compiling the target." (let* ((proj (ede-target-parent obj)) @@ -378,7 +378,7 @@ Argument COMMAND is the command to use for compiling the target." (compile command))) -(defmethod project-rescan ((this ede-linux-project)) +(cl-defmethod project-rescan ((this ede-linux-project)) "Rescan this Linux project from the sources." (let* ((dir (ede-project-root-directory this)) (bdir (ede-linux--get-build-directory dir)) diff --git a/lisp/cedet/ede/locate.el b/lisp/cedet/ede/locate.el index c0c8ae3b38..2ff83418f7 100644 --- a/lisp/cedet/ede/locate.el +++ b/lisp/cedet/ede/locate.el @@ -110,34 +110,34 @@ based on `ede-locate-setup-options'." ) "Baseclass for LOCATE feature in EDE.") -(defmethod initialize-instance ((loc ede-locate-base) &rest fields) +(cl-defmethod initialize-instance ((loc ede-locate-base) &rest fields) "Make sure we have a hash table." ;; Basic setup. - (call-next-method) + (cl-call-next-method) ;; Make sure we have a hash table. (ede-locate-flush-hash loc) ) -(defmethod ede-locate-ok-in-project :static ((loc ede-locate-base) +(cl-defmethod ede-locate-ok-in-project ((loc (subclass ede-locate-base)) root) "Is it ok to use this project type under ROOT." t) -(defmethod ede-locate-flush-hash ((loc ede-locate-base)) +(cl-defmethod ede-locate-flush-hash ((loc ede-locate-base)) "For LOC, flush hashtable and start from scratch." (oset loc hash (make-hash-table :test 'equal))) -(defmethod ede-locate-file-in-hash ((loc ede-locate-base) +(cl-defmethod ede-locate-file-in-hash ((loc ede-locate-base) filestring) "For LOC, is the file FILESTRING in our hashtable?" (gethash filestring (oref loc hash))) -(defmethod ede-locate-add-file-to-hash ((loc ede-locate-base) +(cl-defmethod ede-locate-add-file-to-hash ((loc ede-locate-base) filestring fullfilename) "For LOC, add FILESTR to the hash with FULLFILENAME." (puthash filestring fullfilename (oref loc hash))) -(defmethod ede-locate-file-in-project ((loc ede-locate-base) +(cl-defmethod ede-locate-file-in-project ((loc ede-locate-base) filesubstring ) "Locate with LOC occurrences of FILESUBSTRING. @@ -149,7 +149,7 @@ that created this EDE locate object." (oset loc lastanswer ans) ans)) -(defmethod ede-locate-file-in-project-impl ((loc ede-locate-base) +(cl-defmethod ede-locate-file-in-project-impl ((loc ede-locate-base) filesubstring ) "Locate with LOC occurrences of FILESUBSTRING. @@ -158,8 +158,8 @@ that created this EDE locate object." nil ) -(defmethod ede-locate-create/update-root-database :STATIC - ((loc ede-locate-base) root) +(cl-defmethod ede-locate-create/update-root-database + ((loc (subclass ede-locate-base)) root) "Create or update the database for the current project. You cannot create projects for the baseclass." (error "Cannot create/update a database of type %S" @@ -177,13 +177,13 @@ You cannot create projects for the baseclass." Configure the Emacs `locate-program' variable to also configure the use of EDE locate.") -(defmethod ede-locate-ok-in-project :static ((loc ede-locate-locate) +(cl-defmethod ede-locate-ok-in-project ((loc (subclass ede-locate-locate)) root) "Is it ok to use this project type under ROOT." (or (featurep 'locate) (locate-library "locate")) ) -(defmethod ede-locate-file-in-project-impl ((loc ede-locate-locate) +(cl-defmethod ede-locate-file-in-project-impl ((loc ede-locate-locate) filesubstring) "Locate with LOC occurrences of FILESUBSTRING under PROJECTROOT. Searches are done under the current root of the EDE project @@ -220,12 +220,12 @@ that created this EDE locate object." Configure EDE's use of GNU Global through the cedet-global.el variable `cedet-global-command'.") -(defmethod initialize-instance ((loc ede-locate-global) +(cl-defmethod initialize-instance ((loc ede-locate-global) &rest slots) "Make sure that we can use GNU Global." (require 'cedet-global) ;; Get ourselves initialized. - (call-next-method) + (cl-call-next-method) ;; Do the checks. (cedet-gnu-global-version-check) (let* ((default-directory (oref loc root)) @@ -235,7 +235,7 @@ variable `cedet-global-command'.") (oref loc root)))) ) -(defmethod ede-locate-ok-in-project :static ((loc ede-locate-global) +(cl-defmethod ede-locate-ok-in-project ((loc (subclass ede-locate-global)) root) "Is it ok to use this project type under ROOT." (require 'cedet-global) @@ -244,7 +244,7 @@ variable `cedet-global-command'.") (newroot (cedet-gnu-global-root))) newroot)) -(defmethod ede-locate-file-in-project-impl ((loc ede-locate-global) +(cl-defmethod ede-locate-file-in-project-impl ((loc ede-locate-global) filesubstring) "Locate with LOC occurrences of FILESUBSTRING under PROJECTROOT. Searches are done under the current root of the EDE project @@ -253,8 +253,8 @@ that created this EDE locate object." (let ((default-directory (oref loc root))) (cedet-gnu-global-expand-filename filesubstring))) -(defmethod ede-locate-create/update-root-database :STATIC - ((loc ede-locate-global) root) +(cl-defmethod ede-locate-create/update-root-database + ((loc (subclass ede-locate-global)) root) "Create or update the GNU Global database for the current project." (cedet-gnu-global-create/update-database root)) @@ -272,11 +272,11 @@ that created this EDE locate object." Configure EDE's use of IDUtils through the cedet-idutils.el file name searching variable `cedet-idutils-file-command'.") -(defmethod initialize-instance ((loc ede-locate-idutils) +(cl-defmethod initialize-instance ((loc ede-locate-idutils) &rest slots) "Make sure that we can use IDUtils." ;; Get ourselves initialized. - (call-next-method) + (cl-call-next-method) ;; Do the checks. (require 'cedet-idutils) (cedet-idutils-version-check) @@ -285,7 +285,7 @@ file name searching variable `cedet-idutils-file-command'.") (oref loc root))) ) -(defmethod ede-locate-ok-in-project :static ((loc ede-locate-idutils) +(cl-defmethod ede-locate-ok-in-project ((loc (subclass ede-locate-idutils)) root) "Is it ok to use this project type under ROOT." (require 'cedet-idutils) @@ -293,7 +293,7 @@ file name searching variable `cedet-idutils-file-command'.") (when (cedet-idutils-support-for-directory root) root)) -(defmethod ede-locate-file-in-project-impl ((loc ede-locate-idutils) +(cl-defmethod ede-locate-file-in-project-impl ((loc ede-locate-idutils) filesubstring) "Locate with LOC occurrences of FILESUBSTRING under PROJECTROOT. Searches are done under the current root of the EDE project @@ -302,8 +302,8 @@ that created this EDE locate object." (let ((default-directory (oref loc root))) (cedet-idutils-expand-filename filesubstring))) -(defmethod ede-locate-create/update-root-database :STATIC - ((loc ede-locate-idutils) root) +(cl-defmethod ede-locate-create/update-root-database + ((loc (subclass ede-locate-idutils)) root) "Create or update the GNU Global database for the current project." (cedet-idutils-create/update-database root)) @@ -321,11 +321,11 @@ that created this EDE locate object." Configure EDE's use of Cscope through the cedet-cscope.el file name searching variable `cedet-cscope-file-command'.") -(defmethod initialize-instance ((loc ede-locate-cscope) +(cl-defmethod initialize-instance ((loc ede-locate-cscope) &rest slots) "Make sure that we can use Cscope." ;; Get ourselves initialized. - (call-next-method) + (cl-call-next-method) ;; Do the checks. (require 'cedet-cscope) (cedet-cscope-version-check) @@ -334,7 +334,7 @@ file name searching variable `cedet-cscope-file-command'.") (oref loc root))) ) -(defmethod ede-locate-ok-in-project :static ((loc ede-locate-cscope) +(cl-defmethod ede-locate-ok-in-project ((loc (subclass ede-locate-cscope)) root) "Is it ok to use this project type under ROOT." (require 'cedet-cscope) @@ -342,7 +342,7 @@ file name searching variable `cedet-cscope-file-command'.") (when (cedet-cscope-support-for-directory root) root)) -(defmethod ede-locate-file-in-project-impl ((loc ede-locate-cscope) +(cl-defmethod ede-locate-file-in-project-impl ((loc ede-locate-cscope) filesubstring) "Locate with LOC occurrences of FILESUBSTRING under PROJECTROOT. Searches are done under the current root of the EDE project @@ -351,8 +351,8 @@ that created this EDE locate object." (require 'cedet-cscope) (cedet-cscope-expand-filename filesubstring))) -(defmethod ede-locate-create/update-root-database :STATIC - ((loc ede-locate-cscope) root) +(cl-defmethod ede-locate-create/update-root-database + ((loc (subclass ede-locate-cscope)) root) "Create or update the GNU Global database for the current project." (require 'cedet-cscope) (cedet-cscope-create/update-database root)) diff --git a/lisp/cedet/ede/pconf.el b/lisp/cedet/ede/pconf.el index b22cd87e1e..6545b858ef 100644 --- a/lisp/cedet/ede/pconf.el +++ b/lisp/cedet/ede/pconf.el @@ -36,11 +36,11 @@ a file, such as AUTHORS. A value of 'never means don't ask, and don't do it. A value of nil means to just do it.") ;;; Code: -(defmethod ede-proj-configure-file ((this ede-proj-project)) +(cl-defmethod ede-proj-configure-file ((this ede-proj-project)) "The configure.ac script used by project THIS." (ede-expand-filename (ede-toplevel this) "configure.ac" t)) -(defmethod ede-proj-configure-test-required-file ((this ede-proj-project) file) +(cl-defmethod ede-proj-configure-test-required-file ((this ede-proj-project) file) "For project THIS, test that the file FILE exists, or create it." (let ((f (ede-expand-filename (ede-toplevel this) file t))) (when (not (file-exists-p f)) @@ -60,7 +60,7 @@ don't do it. A value of nil means to just do it.") (error "Quit"))))))) -(defmethod ede-proj-configure-synchronize ((this ede-proj-project)) +(cl-defmethod ede-proj-configure-synchronize ((this ede-proj-project)) "Synchronize what we know about project THIS into configure.ac." (let ((b (find-file-noselect (ede-proj-configure-file this))) ;;(td (file-name-directory (ede-proj-configure-file this))) @@ -149,7 +149,7 @@ don't do it. A value of nil means to just do it.") )))) -(defmethod ede-proj-configure-recreate ((this ede-proj-project)) +(cl-defmethod ede-proj-configure-recreate ((this ede-proj-project)) "Delete project THIS's configure script and start over." (if (not (ede-proj-configure-file this)) (error "Could not determine configure.ac for %S" (eieio-object-name this))) @@ -159,7 +159,7 @@ don't do it. A value of nil means to just do it.") (if b (kill-buffer b))) (ede-proj-configure-synchronize this)) -(defmethod ede-proj-tweak-autoconf ((this ede-proj-target)) +(cl-defmethod ede-proj-tweak-autoconf ((this ede-proj-target)) "Tweak the configure file (current buffer) to accommodate THIS." ;; Check the compilers belonging to THIS, and call the autoconf ;; setup for those compilers. @@ -167,7 +167,7 @@ don't do it. A value of nil means to just do it.") (mapc 'ede-proj-tweak-autoconf (ede-proj-linkers this)) ) -(defmethod ede-proj-flush-autoconf ((this ede-proj-target)) +(cl-defmethod ede-proj-flush-autoconf ((this ede-proj-target)) "Flush the configure file (current buffer) to accommodate THIS. By flushing, remove any cruft that may be in the file. Subsequent calls to `ede-proj-tweak-autoconf' can restore items removed by flush." @@ -175,13 +175,13 @@ calls to `ede-proj-tweak-autoconf' can restore items removed by flush." ;; @TODO - No-one calls this ??? -(defmethod ede-proj-configure-add-missing ((this ede-proj-target)) +(cl-defmethod ede-proj-configure-add-missing ((this ede-proj-target)) "Query if any files needed by THIS provided by automake are missing. Results in --add-missing being passed to automake." nil) ;; @TODO - No-one implements this yet. -(defmethod ede-proj-configure-create-missing ((this ede-proj-target)) +(cl-defmethod ede-proj-configure-create-missing ((this ede-proj-target)) "Add any missing files for THIS by creating them." nil) diff --git a/lisp/cedet/ede/pmake.el b/lisp/cedet/ede/pmake.el index deefb7bc69..3307202bf7 100644 --- a/lisp/cedet/ede/pmake.el +++ b/lisp/cedet/ede/pmake.el @@ -52,7 +52,7 @@ (declare-function ede-srecode-insert "ede/srecode") ;;; Code: -(defmethod ede-proj-makefile-create ((this ede-proj-project) mfilename) +(cl-defmethod ede-proj-makefile-create ((this ede-proj-project) mfilename) "Create a Makefile for all Makefile targets in THIS. MFILENAME is the makefile to generate." (require 'ede/srecode) @@ -284,26 +284,26 @@ Change . to _ in the variable name." (setq name (replace-match "_" nil t name))) name)) -(defmethod ede-proj-makefile-sourcevar ((this ede-proj-target)) +(cl-defmethod ede-proj-makefile-sourcevar ((this ede-proj-target)) "Return the variable name for THIS's sources." (concat (ede-pmake-varname this) "_YOU_FOUND_A_BUG")) ;;; DEPENDENCY FILE GENERATOR LISTS ;; -(defmethod ede-proj-makefile-dependency-files ((this ede-proj-target)) +(cl-defmethod ede-proj-makefile-dependency-files ((this ede-proj-target)) "Return a list of source files to convert to dependencies. Argument THIS is the target to get sources from." nil) ;;; GENERIC VARIABLES ;; -(defmethod ede-proj-makefile-configuration-variables ((this ede-proj-project) +(cl-defmethod ede-proj-makefile-configuration-variables ((this ede-proj-project) configuration) "Return a list of configuration variables from THIS. Use CONFIGURATION as the current configuration to query." (cdr (assoc configuration (oref this configuration-variables)))) -(defmethod ede-proj-makefile-insert-variables-new ((this ede-proj-project)) +(cl-defmethod ede-proj-makefile-insert-variables-new ((this ede-proj-project)) "Insert variables needed by target THIS. NOTE: Not yet in use! This is part of an SRecode conversion of @@ -358,7 +358,7 @@ NOTE: Not yet in use! This is part of an SRecode conversion of ; )) ) -(defmethod ede-proj-makefile-insert-variables ((this ede-proj-project)) +(cl-defmethod ede-proj-makefile-insert-variables ((this ede-proj-project)) "Insert variables needed by target THIS." (let ((conf-table (ede-proj-makefile-configuration-variables this (oref this configuration-default))) @@ -392,7 +392,7 @@ NOTE: Not yet in use! This is part of an SRecode conversion of (insert "\nede_FILES=" (file-name-nondirectory (oref this file)) " " (file-name-nondirectory (ede-proj-dist-makefile this)) "\n")) -(defmethod ede-proj-makefile-insert-source-variables ((this ede-proj-target) +(cl-defmethod ede-proj-makefile-insert-source-variables ((this ede-proj-target) &optional moresource) "Insert the source variables needed by THIS. @@ -406,7 +406,7 @@ sources variable." (if moresource (insert " \\\n " (mapconcat (lambda (a) a) moresource " ") ""))))) -(defmethod ede-proj-makefile-insert-variables ((this ede-proj-target) &optional +(cl-defmethod ede-proj-makefile-insert-variables ((this ede-proj-target) &optional moresource) "Insert variables needed by target THIS. Optional argument MORESOURCE is a list of additional sources to add to the @@ -414,18 +414,18 @@ sources variable." (ede-proj-makefile-insert-source-variables this moresource) ) -(defmethod ede-proj-makefile-configuration-variables ((this ede-proj-target-makefile) +(cl-defmethod ede-proj-makefile-configuration-variables ((this ede-proj-target-makefile) configuration) "Return a list of configuration variables from THIS. Use CONFIGURATION as the current configuration to query." (cdr (assoc configuration (oref this configuration-variables)))) -(defmethod ede-proj-makefile-insert-variables ((this ede-proj-target-makefile) +(cl-defmethod ede-proj-makefile-insert-variables ((this ede-proj-target-makefile) &optional moresource) "Insert variables needed by target THIS. Optional argument MORESOURCE is a list of additional sources to add to the sources variable." - (call-next-method) + (cl-call-next-method) (let* ((proj (ede-target-parent this)) (conf-table (ede-proj-makefile-configuration-variables this (oref proj configuration-default))) @@ -449,19 +449,19 @@ sources variable." (ede-linker-only-once linker (ede-proj-makefile-insert-variables linker))))) -(defmethod ede-proj-makefile-insert-automake-pre-variables +(cl-defmethod ede-proj-makefile-insert-automake-pre-variables ((this ede-proj-target)) "Insert variables needed by target THIS in Makefile.am before SOURCES." nil) -(defmethod ede-proj-makefile-insert-automake-post-variables +(cl-defmethod ede-proj-makefile-insert-automake-post-variables ((this ede-proj-target)) "Insert variables needed by target THIS in Makefile.am after SOURCES." nil) ;;; GARBAGE PATTERNS ;; -(defmethod ede-proj-makefile-garbage-patterns ((this ede-proj-project)) +(cl-defmethod ede-proj-makefile-garbage-patterns ((this ede-proj-project)) "Return a list of patterns that are considered garbage to THIS. These are removed with make clean." (let ((mc (ede-map-targets @@ -476,7 +476,7 @@ These are removed with make clean." (setq mc (cdr mc))) (nreverse uniq))) -(defmethod ede-proj-makefile-garbage-patterns ((this ede-proj-target)) +(cl-defmethod ede-proj-makefile-garbage-patterns ((this ede-proj-target)) "Return a list of patterns that are considered garbage to THIS. These are removed with make clean." ;; Get the source object from THIS, and use the specified garbage. @@ -490,7 +490,7 @@ These are removed with make clean." ;;; RULES ;; -(defmethod ede-proj-makefile-insert-subproj-rules ((this ede-proj-project)) +(cl-defmethod ede-proj-makefile-insert-subproj-rules ((this ede-proj-project)) "Insert a rule for the project THIS which should be a subproject." (insert ".PHONY:" (ede-name this)) (newline) @@ -501,29 +501,29 @@ These are removed with make clean." (newline) ) -(defmethod ede-proj-makefile-insert-rules ((this ede-proj-project)) +(cl-defmethod ede-proj-makefile-insert-rules ((this ede-proj-project)) "Insert rules needed by THIS target." (mapc 'ede-proj-makefile-insert-rules (oref this inference-rules)) ) -(defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-project)) +(cl-defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-project)) "Insert any symbols that the DIST rule should depend on. Argument THIS is the project that should insert stuff." (mapc 'ede-proj-makefile-insert-dist-dependencies (oref this targets)) ) -(defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-target)) +(cl-defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-target)) "Insert any symbols that the DIST rule should depend on. Argument THIS is the target that should insert stuff." nil) -(defmethod ede-proj-makefile-insert-dist-filepatterns ((this ede-proj-target)) +(cl-defmethod ede-proj-makefile-insert-dist-filepatterns ((this ede-proj-target)) "Insert any symbols that the DIST rule should depend on. Argument THIS is the target that should insert stuff." (ede-proj-makefile-insert-dist-dependencies this) ) -(defmethod ede-proj-makefile-automake-insert-subdirs ((this ede-proj-project)) +(cl-defmethod ede-proj-makefile-automake-insert-subdirs ((this ede-proj-project)) "Insert a SUBDIRS variable for Automake." (proj-comp-insert-variable-once "SUBDIRS" (ede-map-subprojects @@ -531,11 +531,11 @@ Argument THIS is the target that should insert stuff." (insert " " (ede-subproject-relative-path sproj)) )))) -(defmethod ede-proj-makefile-automake-insert-extradist ((this ede-proj-project)) +(cl-defmethod ede-proj-makefile-automake-insert-extradist ((this ede-proj-project)) "Insert the EXTRADIST variable entries needed for Automake and EDE." (proj-comp-insert-variable-once "EXTRA_DIST" (insert "Project.ede"))) -(defmethod ede-proj-makefile-insert-dist-rules ((this ede-proj-project)) +(cl-defmethod ede-proj-makefile-insert-dist-rules ((this ede-proj-project)) "Insert distribution rules for THIS in a Makefile, such as CLEAN and DIST." (let ((junk (ede-proj-makefile-garbage-patterns this)) tmp) @@ -602,11 +602,11 @@ Argument THIS is the target that should insert stuff." "\t@false\n\n" "\n\n# End of Makefile\n"))) -(defmethod ede-proj-makefile-insert-rules ((this ede-proj-target)) +(cl-defmethod ede-proj-makefile-insert-rules ((this ede-proj-target)) "Insert rules needed by THIS target." nil) -(defmethod ede-proj-makefile-insert-rules ((this ede-proj-target-makefile)) +(cl-defmethod ede-proj-makefile-insert-rules ((this ede-proj-target-makefile)) "Insert rules needed by THIS target." (mapc 'ede-proj-makefile-insert-rules (oref this rules)) (let ((c (ede-proj-compilers this))) @@ -619,7 +619,7 @@ Argument THIS is the target that should insert stuff." (ede-proj-makefile-insert-commands this) ))) -(defmethod ede-proj-makefile-insert-commands ((this ede-proj-target-makefile)) +(cl-defmethod ede-proj-makefile-insert-commands ((this ede-proj-target-makefile)) "Insert the commands needed by target THIS. For targets, insert the commands needed by the chosen compiler." (mapc 'ede-proj-makefile-insert-commands (ede-proj-compilers this)) @@ -627,18 +627,18 @@ For targets, insert the commands needed by the chosen compiler." (mapc 'ede-proj-makefile-insert-commands (ede-proj-linkers this)))) -(defmethod ede-proj-makefile-insert-user-rules ((this ede-proj-project)) +(cl-defmethod ede-proj-makefile-insert-user-rules ((this ede-proj-project)) "Insert user specified rules needed by THIS target. This is different from `ede-proj-makefile-insert-rules' in that this function won't create the building rules which are auto created with automake." (mapc 'ede-proj-makefile-insert-user-rules (oref this inference-rules))) -(defmethod ede-proj-makefile-insert-user-rules ((this ede-proj-target)) +(cl-defmethod ede-proj-makefile-insert-user-rules ((this ede-proj-target)) "Insert user specified rules needed by THIS target." (mapc 'ede-proj-makefile-insert-rules (oref this rules))) -(defmethod ede-proj-makefile-dependencies ((this ede-proj-target-makefile)) +(cl-defmethod ede-proj-makefile-dependencies ((this ede-proj-target-makefile)) "Return a string representing the dependencies for THIS. Some compilers only use the first element in the dependencies, others have a list of intermediates (object files), and others don't care. @@ -667,7 +667,7 @@ This allows customization of how these elements appear." out)))) ;; Tags -(defmethod ede-proj-makefile-tags ((this ede-proj-project) targets) +(cl-defmethod ede-proj-makefile-tags ((this ede-proj-project) targets) "Insert into the current location rules to make recursive TAGS files. Argument THIS is the project to create tags for. Argument TARGETS are the targets we should depend on for TAGS." diff --git a/lisp/cedet/ede/proj-archive.el b/lisp/cedet/ede/proj-archive.el index ca729cee29..0c7ffdd156 100644 --- a/lisp/cedet/ede/proj-archive.el +++ b/lisp/cedet/ede/proj-archive.el @@ -43,7 +43,7 @@ :objectextention "") "Linker object for creating an archive.") -(defmethod ede-proj-makefile-insert-source-variables :BEFORE +(cl-defmethod ede-proj-makefile-insert-source-variables :before ((this ede-proj-target-makefile-archive) &optional moresource) "Insert bin_PROGRAMS variables needed by target THIS. We aren't actually inserting SOURCE details, but this is used by the @@ -52,11 +52,11 @@ Makefile.am generator, so use it to add this important bin program." (concat "lib" (ede-name this) "_a_LIBRARIES") (insert (concat "lib" (ede-name this) ".a")))) -(defmethod ede-proj-makefile-garbage-patterns +(cl-defmethod ede-proj-makefile-garbage-patterns ((this ede-proj-target-makefile-archive)) "Add archive name to the garbage patterns. This makes sure that the archive is removed with 'make clean'." - (let ((garb (call-next-method))) + (let ((garb (cl-call-next-method))) (append garb (list (concat "lib" (ede-name this) ".a"))))) (provide 'ede/proj-archive) diff --git a/lisp/cedet/ede/proj-aux.el b/lisp/cedet/ede/proj-aux.el index 266b865ff4..0e76cda198 100644 --- a/lisp/cedet/ede/proj-aux.el +++ b/lisp/cedet/ede/proj-aux.el @@ -39,7 +39,7 @@ :sourcepattern "^[A-Z]+$\\|\\.txt$") "Miscellaneous fields definition.") -(defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-aux)) +(cl-defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-aux)) "Return the variable name for THIS's sources." (concat (ede-pmake-varname this) "_AUX")) diff --git a/lisp/cedet/ede/proj-comp.el b/lisp/cedet/ede/proj-comp.el index abe5866de0..87eae6cb1c 100644 --- a/lisp/cedet/ede/proj-comp.el +++ b/lisp/cedet/ede/proj-comp.el @@ -173,12 +173,12 @@ Adds this rule to a .PHONY list.")) This is used when creating a Makefile to prevent duplicate variables and rules from being created.") -(defmethod initialize-instance :AFTER ((this ede-compiler) &rest fields) +(cl-defmethod initialize-instance :after ((this ede-compiler) &rest fields) "Make sure that all ede compiler objects are cached in `ede-compiler-list'." (add-to-list 'ede-compiler-list this)) -(defmethod initialize-instance :AFTER ((this ede-linker) &rest fields) +(cl-defmethod initialize-instance :after ((this ede-linker) &rest fields) "Make sure that all ede compiler objects are cached in `ede-linker-list'." (add-to-list 'ede-linker-list this)) @@ -235,7 +235,7 @@ This will prevent rules from creating duplicate variables or rules." (car-safe linkers)) ;;; Methods: -(defmethod ede-proj-tweak-autoconf ((this ede-compilation-program)) +(cl-defmethod ede-proj-tweak-autoconf ((this ede-compilation-program)) "Tweak the configure file (current buffer) to accommodate THIS." (mapcar (lambda (obj) @@ -247,7 +247,7 @@ This will prevent rules from creating duplicate variables or rules." ) (oref this autoconf))) -(defmethod ede-proj-flush-autoconf ((this ede-compilation-program)) +(cl-defmethod ede-proj-flush-autoconf ((this ede-compilation-program)) "Flush the configure file (current buffer) to accommodate THIS." nil) @@ -263,7 +263,7 @@ Execute BODY in a location where a value can be placed." )) (put 'proj-comp-insert-variable-once 'lisp-indent-function 1) -(defmethod ede-proj-makefile-insert-variables ((this ede-compilation-program)) +(cl-defmethod ede-proj-makefile-insert-variables ((this ede-compilation-program)) "Insert variables needed by the compiler THIS." (if (eieio-instance-inheritor-slot-boundp this 'variables) (with-slots (variables) this @@ -276,19 +276,19 @@ Execute BODY in a location where a value can be placed." (insert cd))))) variables)))) -(defmethod ede-compiler-intermediate-objects-p ((this ede-compiler)) +(cl-defmethod ede-compiler-intermediate-objects-p ((this ede-compiler)) "Return non-nil if THIS has intermediate object files. If this compiler creates code that can be linked together, then the object files created by the compiler are considered intermediate." (oref this uselinker)) -(defmethod ede-compiler-intermediate-object-variable ((this ede-compiler) +(cl-defmethod ede-compiler-intermediate-object-variable ((this ede-compiler) targetname) "Return a string based on THIS representing a make object variable. TARGETNAME is the name of the target that these objects belong to." (concat targetname "_OBJ")) -(defmethod ede-proj-makefile-insert-object-variables ((this ede-compiler) +(cl-defmethod ede-proj-makefile-insert-object-variables ((this ede-compiler) targetname sourcefiles) "Insert an OBJ variable to specify object code to be generated for THIS. The name of the target is TARGETNAME as a string. SOURCEFILES is the list of @@ -312,19 +312,19 @@ Not all compilers do this." sourcefiles) (insert "\n"))))) -(defmethod ede-proj-makefile-insert-rules ((this ede-compilation-program)) +(cl-defmethod ede-proj-makefile-insert-rules ((this ede-compilation-program)) "Insert rules needed for THIS compiler object." (ede-compiler-only-once this (mapc 'ede-proj-makefile-insert-rules (oref this rules)))) -(defmethod ede-proj-makefile-insert-rules ((this ede-makefile-rule)) +(cl-defmethod ede-proj-makefile-insert-rules ((this ede-makefile-rule)) "Insert rules needed for THIS rule object." (if (oref this phony) (insert ".PHONY: " (oref this target) "\n")) (insert (oref this target) ": " (oref this dependencies) "\n\t" (mapconcat (lambda (c) c) (oref this rules) "\n\t") "\n\n")) -(defmethod ede-proj-makefile-insert-commands ((this ede-compilation-program)) +(cl-defmethod ede-proj-makefile-insert-commands ((this ede-compilation-program)) "Insert the commands needed to use compiler THIS. The object creating makefile rules must call this method for the compiler it decides to use after inserting in the rule." diff --git a/lisp/cedet/ede/proj-elisp.el b/lisp/cedet/ede/proj-elisp.el index 8e01445233..778d485c44 100644 --- a/lisp/cedet/ede/proj-elisp.el +++ b/lisp/cedet/ede/proj-elisp.el @@ -57,7 +57,7 @@ Each package's directory should also appear in :aux-packages via a package name. "This target consists of a group of lisp files. A lisp target may be one general program with many separate lisp files in it.") -(defmethod ede-proj-makefile-insert-rules :after ((this ede-proj-target-elisp)) +(cl-defmethod ede-proj-makefile-insert-rules :after ((this ede-proj-target-elisp)) "Insert rules needed by THIS target. This inserts the PRELOADS target-local variable." (let ((preloads (oref this pre-load-packages))) @@ -67,7 +67,7 @@ This inserts the PRELOADS target-local variable." (mapconcat 'identity preloads " "))))) (insert "\n")) -(defmethod ede-proj-makefile-dependencies ((this ede-proj-target-elisp)) +(cl-defmethod ede-proj-makefile-dependencies ((this ede-proj-target-elisp)) "Return a string representing the dependencies for THIS. Some compilers only use the first element in the dependencies, others have a list of intermediates (object files), and others don't care. @@ -109,7 +109,7 @@ For Emacs Lisp, return addsuffix command on source files." "Compile Emacs Lisp programs with XEmacs.") ;;; Claiming files -(defmethod ede-buffer-mine ((this ede-proj-target-elisp) buffer) +(cl-defmethod ede-buffer-mine ((this ede-proj-target-elisp) buffer) "Return t if object THIS lays claim to the file in BUFFER. Lays claim to all .elc files that match .el files in this target." (if (string-match "\\.elc$" (buffer-file-name buffer)) @@ -121,7 +121,7 @@ Lays claim to all .elc files that match .el files in this target." ;; Is this in our list. (member fname (oref this auxsource)) ) - (call-next-method) ; The usual thing. + (cl-call-next-method) ; The usual thing. )) ;;; Emacs Lisp Compiler @@ -145,7 +145,7 @@ Lays claim to all .elc files that match .el files in this target." packages (cdr packages)))) paths)) -(defmethod project-compile-target ((obj ede-proj-target-elisp)) +(cl-defmethod project-compile-target ((obj ede-proj-target-elisp)) "Compile all sources in a Lisp target OBJ. Bonus: Return a cons cell: (COMPILED . UPTODATE)." (let* ((proj (ede-target-parent obj)) @@ -173,7 +173,7 @@ Bonus: Return a cons cell: (COMPILED . UPTODATE)." (message "All Emacs Lisp sources are up to date in %s" (eieio-object-name obj)) (cons comp utd))) -(defmethod ede-update-version-in-source ((this ede-proj-target-elisp) version) +(cl-defmethod ede-update-version-in-source ((this ede-proj-target-elisp) version) "In a Lisp file, updated a version string for THIS to VERSION. There are standards in Elisp files specifying how the version string is found, such as a `-version' variable, or the standard header." @@ -195,12 +195,12 @@ is found, such as a `-version' variable, or the standard header." (insert version))))) (setq vs (cdr vs))) ;; The next method will include comments such as "Version:" - (call-next-method)))) + (cl-call-next-method)))) ;;; Makefile generation functions ;; -(defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-elisp)) +(cl-defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-elisp)) "Return the variable name for THIS's sources." (cond ((ede-proj-automake-p) '("lisp_LISP" . share)) (t (concat (ede-pmake-varname this) "_LISP")))) @@ -219,7 +219,7 @@ is found, such as a `-version' variable, or the standard header." (setq items (cdr items))))) )) -(defmethod ede-proj-makefile-insert-variables :AFTER ((this ede-proj-target-elisp)) +(cl-defmethod ede-proj-makefile-insert-variables :after ((this ede-proj-target-elisp)) "Insert variables needed by target THIS." (let ((newitems (if (oref this aux-packages) (ede-proj-elisp-packages-to-loadpath @@ -244,9 +244,9 @@ is found, such as a `-version' variable, or the standard header." ) (error "Don't know how to update load path")))) -(defmethod ede-proj-tweak-autoconf ((this ede-proj-target-elisp)) +(cl-defmethod ede-proj-tweak-autoconf ((this ede-proj-target-elisp)) "Tweak the configure file (current buffer) to accommodate THIS." - (call-next-method) + (cl-call-next-method) ;; Ok, now we have to tweak the autoconf provided `elisp-comp' program. (let ((ec (ede-expand-filename this "elisp-comp" 'newfile)) (enable-local-variables nil)) @@ -270,7 +270,7 @@ is found, such as a `-version' variable, or the standard header." (save-buffer) (kill-buffer))))) -(defmethod ede-proj-flush-autoconf ((this ede-proj-target-elisp)) +(cl-defmethod ede-proj-flush-autoconf ((this ede-proj-target-elisp)) "Flush the configure file (current buffer) to accommodate THIS." ;; Remove crufty old paths from elisp-compile (let ((ec (ede-expand-filename this "elisp-comp" 'newfile)) @@ -311,14 +311,14 @@ Files do not need to be added to this target.") ;;; Claiming files -(defmethod ede-buffer-mine ((this ede-proj-target-elisp-autoloads) buffer) +(cl-defmethod ede-buffer-mine ((this ede-proj-target-elisp-autoloads) buffer) "Return t if object THIS lays claim to the file in BUFFER. Lays claim to all .elc files that match .el files in this target." (if (string-match (concat (regexp-quote (oref this autoload-file)) "$") (buffer-file-name buffer)) t - (call-next-method) ; The usual thing. + (cl-call-next-method) ; The usual thing. )) ;; Compilers @@ -338,7 +338,7 @@ Lays claim to all .elc files that match .el files in this target." ) "Build an autoloads file.") -(defmethod ede-proj-compilers ((obj ede-proj-target-elisp-autoloads)) +(cl-defmethod ede-proj-compilers ((obj ede-proj-target-elisp-autoloads)) "List of compilers being used by OBJ. If the `compiler' slot is empty, get the car of the compilers list." (let ((comp (oref obj compiler))) @@ -351,7 +351,7 @@ If the `compiler' slot is empty, get the car of the compilers list." (setq comp (list (car avail))))) comp)) -(defmethod ede-proj-makefile-insert-source-variables ((this ede-proj-target-elisp-autoloads) +(cl-defmethod ede-proj-makefile-insert-source-variables ((this ede-proj-target-elisp-autoloads) &optional moresource) "Insert the source variables needed by THIS. @@ -359,16 +359,16 @@ Optional argument MORESOURCE is a list of additional sources to add to the sources variable." nil) -(defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-elisp-autoloads)) +(cl-defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-elisp-autoloads)) "Return the variable name for THIS's sources." nil) ; "LOADDEFS") -(defmethod ede-proj-makefile-dependencies ((this ede-proj-target-elisp-autoloads)) +(cl-defmethod ede-proj-makefile-dependencies ((this ede-proj-target-elisp-autoloads)) "Return a string representing the dependencies for THIS. Always return an empty string for an autoloads generator." "") -(defmethod ede-proj-makefile-insert-variables :AFTER ((this ede-proj-target-elisp-autoloads)) +(cl-defmethod ede-proj-makefile-insert-variables :after ((this ede-proj-target-elisp-autoloads)) "Insert variables needed by target THIS." (ede-pmake-insert-variable-shared "LOADDEFS" (insert (oref this autoload-file))) @@ -378,7 +378,7 @@ Always return an empty string for an autoloads generator." " "))) ) -(defmethod project-compile-target ((obj ede-proj-target-elisp-autoloads)) +(cl-defmethod project-compile-target ((obj ede-proj-target-elisp-autoloads)) "Create or update the autoload target." (require 'cedet-autogen) (let ((default-directory (ede-expand-filename obj "."))) @@ -387,13 +387,13 @@ Always return an empty string for an autoloads generator." (oref obj autoload-dirs)) )) -(defmethod ede-update-version-in-source ((this ede-proj-target-elisp-autoloads) version) +(cl-defmethod ede-update-version-in-source ((this ede-proj-target-elisp-autoloads) version) "In a Lisp file, updated a version string for THIS to VERSION. There are standards in Elisp files specifying how the version string is found, such as a `-version' variable, or the standard header." nil) -(defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-target-elisp-autoloads)) +(cl-defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-target-elisp-autoloads)) "Insert any symbols that the DIST rule should depend on. Emacs Lisp autoload files ship the generated .el files. Argument THIS is the target which needs to insert an info file." @@ -402,18 +402,18 @@ Argument THIS is the target which needs to insert an info file." (insert " " (ede-proj-makefile-target-name this)) ) -(defmethod ede-proj-makefile-insert-dist-filepatterns ((this ede-proj-target-elisp-autoloads)) +(cl-defmethod ede-proj-makefile-insert-dist-filepatterns ((this ede-proj-target-elisp-autoloads)) "Insert any symbols that the DIST rule should distribute. Emacs Lisp autoload files ship the generated .el files. Argument THIS is the target which needs to insert an info file." (insert " " (oref this autoload-file)) ) -(defmethod ede-proj-tweak-autoconf ((this ede-proj-target-elisp-autoloads)) +(cl-defmethod ede-proj-tweak-autoconf ((this ede-proj-target-elisp-autoloads)) "Tweak the configure file (current buffer) to accommodate THIS." (error "Autoloads not supported in autoconf yet")) -(defmethod ede-proj-flush-autoconf ((this ede-proj-target-elisp-autoloads)) +(cl-defmethod ede-proj-flush-autoconf ((this ede-proj-target-elisp-autoloads)) "Flush the configure file (current buffer) to accommodate THIS." nil) diff --git a/lisp/cedet/ede/proj-info.el b/lisp/cedet/ede/proj-info.el index 692b51b702..a5031ae875 100644 --- a/lisp/cedet/ede/proj-info.el +++ b/lisp/cedet/ede/proj-info.el @@ -72,17 +72,17 @@ All other sources should be included independently.")) ;;; Makefile generation ;; -(defmethod ede-proj-configure-add-missing +(cl-defmethod ede-proj-configure-add-missing ((this ede-proj-target-makefile-info)) "Query if any files needed by THIS provided by automake are missing. Results in --add-missing being passed to automake." (not (ede-expand-filename (ede-toplevel) "texinfo.tex"))) -(defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-makefile-info)) +(cl-defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-makefile-info)) "Return the variable name for THIS's sources." (concat (ede-pmake-varname this) "_TEXINFOS")) -(defmethod ede-proj-makefile-insert-source-variables +(cl-defmethod ede-proj-makefile-insert-source-variables ((this ede-proj-target-makefile-info) &optional moresource) "Insert the source variables needed by THIS info target. Optional argument MORESOURCE is a list of additional sources to add to the @@ -90,7 +90,7 @@ sources variable. Does the usual for Makefile mode, but splits source into two variables when working in Automake mode." (if (not (ede-proj-automake-p)) - (call-next-method) + (cl-call-next-method) (let* ((sv (ede-proj-makefile-sourcevar this)) (src (copy-sequence (oref this source))) (menu (or (oref this menu) (car src)))) @@ -119,7 +119,7 @@ when working in Automake mode." (kill-buffer buffer)) info)) -(defmethod ede-proj-makefile-target-name ((this ede-proj-target-makefile-info)) +(cl-defmethod ede-proj-makefile-target-name ((this ede-proj-target-makefile-info)) "Return the name of the main target for THIS target." ;; The target should be the main-menu file name translated to .info. (let* ((source (if (not (string= (oref this mainmenu) "")) @@ -128,7 +128,7 @@ when working in Automake mode." (info (ede-makeinfo-find-info-filename source))) (concat (or info (file-name-sans-extension source)) ".info"))) -(defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-target-makefile-info)) +(cl-defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-target-makefile-info)) "Insert any symbols that the DIST rule should depend on. Texinfo files want to insert generated `.info' files. Argument THIS is the target which needs to insert an info file." @@ -137,7 +137,7 @@ Argument THIS is the target which needs to insert an info file." (insert " " (ede-proj-makefile-target-name this)) ) -(defmethod ede-proj-makefile-insert-dist-filepatterns ((this ede-proj-target-makefile-info)) +(cl-defmethod ede-proj-makefile-insert-dist-filepatterns ((this ede-proj-target-makefile-info)) "Insert any symbols that the DIST rule should depend on. Texinfo files want to insert generated `.info' files. Argument THIS is the target which needs to insert an info file." @@ -151,7 +151,7 @@ Argument THIS is the target which needs to insert an info file." ; n ; (concat n ".info")))) -(defmethod object-write ((this ede-proj-target-makefile-info)) +(cl-defmethod object-write ((this ede-proj-target-makefile-info)) "Before committing any change to THIS, make sure the mainmenu is first." (let ((mm (oref this mainmenu)) (s (oref this source)) @@ -161,9 +161,9 @@ Argument THIS is the target which needs to insert an info file." ;; Make sure that MM is first in the list of items. (setq nl (cons mm (delq mm s))) (oset this source nl))) - (call-next-method)) + (cl-call-next-method)) -(defmethod ede-documentation ((this ede-proj-target-makefile-info)) +(cl-defmethod ede-documentation ((this ede-proj-target-makefile-info)) "Return a list of files that provides documentation. Documentation is not for object THIS, but is provided by THIS for other files in the project." diff --git a/lisp/cedet/ede/proj-misc.el b/lisp/cedet/ede/proj-misc.el index 3514189f4d..c04c9bd78c 100644 --- a/lisp/cedet/ede/proj-misc.el +++ b/lisp/cedet/ede/proj-misc.el @@ -65,11 +65,11 @@ All listed sources are included in the distribution.") ) "Compile code via a sub-makefile.") -(defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-makefile-miscelaneous)) +(cl-defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-makefile-miscelaneous)) "Return the variable name for THIS's sources." (concat (ede-pmake-varname this) "_MISC")) -(defmethod ede-proj-makefile-dependency-files +(cl-defmethod ede-proj-makefile-dependency-files ((this ede-proj-target-makefile-miscelaneous)) "Return a list of files which THIS target depends on." (with-slots (submakefile) this @@ -79,7 +79,7 @@ All listed sources are included in the distribution.") nil) (t (list submakefile))))) -(defmethod ede-proj-makefile-insert-rules ((this ede-proj-target-makefile-miscelaneous)) +(cl-defmethod ede-proj-makefile-insert-rules ((this ede-proj-target-makefile-miscelaneous)) "Create the make rule needed to create an archive for THIS." ;; DO NOT call the next method. We will never have any compilers, ;; or any dependencies, or stuff like this. This rule will let us diff --git a/lisp/cedet/ede/proj-obj.el b/lisp/cedet/ede/proj-obj.el index b137aee836..de06910f75 100644 --- a/lisp/cedet/ede/proj-obj.el +++ b/lisp/cedet/ede/proj-obj.el @@ -275,9 +275,9 @@ No garbage pattern since it creates C or C++ code.") ;;; The EDE object compiler ;; -(defmethod ede-proj-makefile-insert-variables ((this ede-object-compiler)) +(cl-defmethod ede-proj-makefile-insert-variables ((this ede-object-compiler)) "Insert variables needed by the compiler THIS." - (call-next-method) + (cl-call-next-method) (if (eieio-instance-inheritor-slot-boundp this 'dependencyvar) (with-slots (dependencyvar) this (insert (car dependencyvar) "=") @@ -289,30 +289,30 @@ No garbage pattern since it creates C or C++ code.") ;;; EDE Object target type methods ;; -(defmethod ede-proj-makefile-sourcevar +(cl-defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-makefile-objectcode)) "Return the variable name for THIS's sources." (require 'ede/pmake) (concat (ede-pmake-varname this) "_SOURCES")) -(defmethod ede-proj-makefile-dependency-files +(cl-defmethod ede-proj-makefile-dependency-files ((this ede-proj-target-makefile-objectcode)) "Return a list of source files to convert to dependencies. Argument THIS is the target to get sources from." (append (oref this source) (oref this auxsource))) -(defmethod ede-proj-makefile-insert-variables ((this ede-proj-target-makefile-objectcode) +(cl-defmethod ede-proj-makefile-insert-variables ((this ede-proj-target-makefile-objectcode) &optional moresource) "Insert variables needed by target THIS. Optional argument MORESOURCE is not used." (let ((ede-proj-objectcode-dodependencies (oref (ede-target-parent this) automatic-dependencies))) - (call-next-method))) + (cl-call-next-method))) -(defmethod ede-buffer-header-file((this ede-proj-target-makefile-objectcode) +(cl-defmethod ede-buffer-header-file((this ede-proj-target-makefile-objectcode) buffer) "There are no default header files." - (or (call-next-method) + (or (cl-call-next-method) ;; Ok, nothing obvious. Try looking in ourselves. (let ((h (oref this auxsource))) ;; Add more logic here when the problem is better understood. diff --git a/lisp/cedet/ede/proj-prog.el b/lisp/cedet/ede/proj-prog.el index 6a5c3c0730..b1b26d4d1f 100644 --- a/lisp/cedet/ede/proj-prog.el +++ b/lisp/cedet/ede/proj-prog.el @@ -69,14 +69,14 @@ Note: Currently only used for Automake projects." ) "This target is an executable program.") -(defmethod ede-proj-makefile-insert-automake-pre-variables +(cl-defmethod ede-proj-makefile-insert-automake-pre-variables ((this ede-proj-target-makefile-program)) "Insert bin_PROGRAMS variables needed by target THIS." (ede-pmake-insert-variable-shared "bin_PROGRAMS" (insert (ede-name this))) - (call-next-method)) + (cl-call-next-method)) -(defmethod ede-proj-makefile-insert-automake-post-variables +(cl-defmethod ede-proj-makefile-insert-automake-post-variables ((this ede-proj-target-makefile-program)) "Insert bin_PROGRAMS variables needed by target THIS." (ede-pmake-insert-variable-shared @@ -86,11 +86,11 @@ Note: Currently only used for Automake projects." (when (oref this ldlibs) (mapc (lambda (d) (insert " -l" d)) (oref this ldlibs))) ) - (call-next-method)) + (cl-call-next-method)) -(defmethod ede-proj-makefile-insert-variables ((this ede-proj-target-makefile-program)) +(cl-defmethod ede-proj-makefile-insert-variables ((this ede-proj-target-makefile-program)) "Insert variables needed by the compiler THIS." - (call-next-method) + (cl-call-next-method) (let ((lf (mapconcat 'identity (oref this ldflags) " "))) (with-slots (ldlibs) this (if ldlibs @@ -100,7 +100,7 @@ Note: Currently only used for Automake projects." (when (and lf (not (string= "" lf))) (ede-pmake-insert-variable-once "LDDEPS" (insert lf))))) -(defmethod project-debug-target ((obj ede-proj-target-makefile-program)) +(cl-defmethod project-debug-target ((obj ede-proj-target-makefile-program)) "Debug a program target OBJ." (let ((tb (get-buffer-create " *padt*")) (dd (if (not (string= (oref obj path) "")) @@ -118,7 +118,7 @@ Note: Currently only used for Automake projects." (funcall ede-debug-program-function cmd)) (kill-buffer tb)))) -(defmethod project-run-target ((obj ede-proj-target-makefile-program) &optional command) +(cl-defmethod project-run-target ((obj ede-proj-target-makefile-program) &optional command) "Run a program target OBJ. Optional COMMAND is the command to run in place of asking the user." (require 'ede/shell) diff --git a/lisp/cedet/ede/proj-scheme.el b/lisp/cedet/ede/proj-scheme.el index b7ba1cfd20..5877bb98e6 100644 --- a/lisp/cedet/ede/proj-scheme.el +++ b/lisp/cedet/ede/proj-scheme.el @@ -40,7 +40,7 @@ ) "This target consists of scheme files.") -(defmethod ede-proj-tweak-autoconf ((this ede-proj-target-scheme)) +(cl-defmethod ede-proj-tweak-autoconf ((this ede-proj-target-scheme)) "Tweak the configure file (current buffer) to accommodate THIS." (autoconf-insert-new-macro "AM_INIT_GUILE_MODULE")) diff --git a/lisp/cedet/ede/proj-shared.el b/lisp/cedet/ede/proj-shared.el index 37999a3759..dfd44ac07c 100644 --- a/lisp/cedet/ede/proj-shared.el +++ b/lisp/cedet/ede/proj-shared.el @@ -171,14 +171,14 @@ Use ldlibs to add addition libraries.") "\t@-rm -f .deps/$(*F).p\n\n")) ) -(defmethod ede-proj-configure-add-missing +(cl-defmethod ede-proj-configure-add-missing ((this ede-proj-target-makefile-shared-object)) "Query if any files needed by THIS provided by automake are missing. Results in --add-missing being passed to automake." (not (and (ede-expand-filename (ede-toplevel) "ltconfig") (ede-expand-filename (ede-toplevel) "ltmain.sh")))) -(defmethod ede-proj-makefile-insert-automake-pre-variables +(cl-defmethod ede-proj-makefile-insert-automake-pre-variables ((this ede-proj-target-makefile-shared-object)) "Insert bin_PROGRAMS variables needed by target THIS. We aren't actually inserting SOURCE details, but this is used by the @@ -186,23 +186,23 @@ Makefile.am generator, so use it to add this important bin program." (ede-pmake-insert-variable-shared "lib_LTLIBRARIES" (insert (concat "lib" (ede-name this) ".la")))) -(defmethod ede-proj-makefile-insert-automake-post-variables +(cl-defmethod ede-proj-makefile-insert-automake-post-variables ((this ede-proj-target-makefile-shared-object)) "Insert bin_PROGRAMS variables needed by target THIS. We need to override -program which has an LDADD element." nil) -(defmethod ede-proj-makefile-target-name ((this ede-proj-target-makefile-shared-object)) +(cl-defmethod ede-proj-makefile-target-name ((this ede-proj-target-makefile-shared-object)) "Return the name of the main target for THIS target." ;; We need some platform gunk to make the .so change to .sl, or .a, ;; depending on the platform we are going to compile against. (concat "lib" (ede-name this) ".la")) -(defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-makefile-shared-object)) +(cl-defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-makefile-shared-object)) "Return the variable name for THIS's sources." (if (eq (oref (ede-target-parent this) makefile-type) 'Makefile.am) (concat "lib" (oref this name) "_la_SOURCES") - (call-next-method))) + (cl-call-next-method))) (provide 'ede/proj-shared) diff --git a/lisp/cedet/ede/proj.el b/lisp/cedet/ede/proj.el index fd789b3857..7caee08893 100644 --- a/lisp/cedet/ede/proj.el +++ b/lisp/cedet/ede/proj.el @@ -329,27 +329,27 @@ the PROJECT being read in is the root project." ;; Restore the directory slot (oset project directory cdir))) )) -(defmethod ede-commit-local-variables ((proj ede-proj-project)) +(cl-defmethod ede-commit-local-variables ((proj ede-proj-project)) "Commit change to local variables in PROJ." (ede-proj-save proj)) -(defmethod eieio-done-customizing ((proj ede-proj-project)) +(cl-defmethod eieio-done-customizing ((proj ede-proj-project)) "Call this when a user finishes customizing this object. Argument PROJ is the project to save." - (call-next-method) + (cl-call-next-method) (ede-proj-save proj)) -(defmethod eieio-done-customizing ((target ede-proj-target)) +(cl-defmethod eieio-done-customizing ((target ede-proj-target)) "Call this when a user finishes customizing this object. Argument TARGET is the project we are completing customization on." - (call-next-method) + (cl-call-next-method) (ede-proj-save (ede-current-project))) -(defmethod ede-commit-project ((proj ede-proj-project)) +(cl-defmethod ede-commit-project ((proj ede-proj-project)) "Commit any change to PROJ to its file." (ede-proj-save proj)) -(defmethod ede-buffer-mine ((this ede-proj-project) buffer) +(cl-defmethod ede-buffer-mine ((this ede-proj-project) buffer) "Return t if object THIS lays claim to the file in BUFFER." (let ((f (ede-convert-path this (buffer-file-name buffer)))) (or (string= (file-name-nondirectory (oref this file)) f) @@ -360,9 +360,9 @@ Argument TARGET is the project we are completing customization on." (member f '("AUTHORS" "NEWS" "COPYING" "INSTALL" "README")) ))) -(defmethod ede-buffer-mine ((this ede-proj-target) buffer) +(cl-defmethod ede-buffer-mine ((this ede-proj-target) buffer) "Return t if object THIS lays claim to the file in BUFFER." - (or (call-next-method) + (or (cl-call-next-method) (ede-target-buffer-in-sourcelist this buffer (oref this auxsource)))) @@ -371,7 +371,7 @@ Argument TARGET is the project we are completing customization on." (defvar ede-proj-target-history nil "History when querying for a target type.") -(defmethod project-new-target ((this ede-proj-project) +(cl-defmethod project-new-target ((this ede-proj-project) &optional name type autoadd) "Create a new target in THIS based on the current buffer." (let* ((name (or name (read-string "Name: " ""))) @@ -409,7 +409,7 @@ Argument TARGET is the project we are completing customization on." ;; And save (ede-proj-save this))) -(defmethod project-new-target-custom ((this ede-proj-project)) +(cl-defmethod project-new-target-custom ((this ede-proj-project)) "Create a new target in THIS for custom." (let* ((name (read-string "Name: " "")) (type (completing-read "Type: " ede-proj-target-alist @@ -418,7 +418,7 @@ Argument TARGET is the project we are completing customization on." :path (ede-convert-path this default-directory) :source nil))) -(defmethod project-delete-target ((this ede-proj-target)) +(cl-defmethod project-delete-target ((this ede-proj-target)) "Delete the current target THIS from its parent project." (let ((p (ede-current-project)) (ts (oref this source))) @@ -439,7 +439,7 @@ Argument TARGET is the project we are completing customization on." (oset p targets (delq this (oref p targets))) (ede-proj-save (ede-current-project)))) -(defmethod project-add-file ((this ede-proj-target) file) +(cl-defmethod project-add-file ((this ede-proj-target) file) "Add to target THIS the current buffer represented as FILE." (let ((file (ede-convert-path this file)) (src (ede-target-sourcecode this))) @@ -454,7 +454,7 @@ Argument TARGET is the project we are completing customization on." (t (error "`project-add-file(ede-target)' source mismatch error"))) (ede-proj-save)))) -(defmethod project-remove-file ((target ede-proj-target) file) +(cl-defmethod project-remove-file ((target ede-proj-target) file) "For TARGET, remove FILE. FILE must be massaged by `ede-convert-path'." ;; Speedy delete should be safe. @@ -462,11 +462,11 @@ FILE must be massaged by `ede-convert-path'." (object-remove-from-list target 'auxsource (ede-convert-path target file)) (ede-proj-save)) -(defmethod project-update-version ((this ede-proj-project)) +(cl-defmethod project-update-version ((this ede-proj-project)) "The :version of project THIS has changed." (ede-proj-save)) -(defmethod project-make-dist ((this ede-proj-project)) +(cl-defmethod project-make-dist ((this ede-proj-project)) "Build a distribution for the project based on THIS target." (let ((pm (ede-proj-dist-makefile this)) (df (project-dist-files this))) @@ -479,14 +479,14 @@ FILE must be massaged by `ede-convert-path'." (file-name-directory pm)))) (compile (concat ede-make-command " -f " pm " dist")))) -(defmethod project-dist-files ((this ede-proj-project)) +(cl-defmethod project-dist-files ((this ede-proj-project)) "Return a list of files that constitutes a distribution of THIS project." (list ;; Note to self, keep this first for the above fn to check against. (concat (oref this name) "-" (oref this version) ".tar.gz") )) -(defmethod project-compile-project ((proj ede-proj-project) &optional command) +(cl-defmethod project-compile-project ((proj ede-proj-project) &optional command) "Compile the entire current project PROJ. Argument COMMAND is the command to use when compiling." (let ((pm (ede-proj-dist-makefile proj)) @@ -499,12 +499,12 @@ Argument COMMAND is the command to use when compiling." ;;; Target type specific compilations/debug ;; -(defmethod project-compile-target ((obj ede-proj-target) &optional command) +(cl-defmethod project-compile-target ((obj ede-proj-target) &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)) -(defmethod project-compile-target ((obj ede-proj-target-makefile) +(cl-defmethod project-compile-target ((obj ede-proj-target-makefile) &optional command) "Compile the current target program OBJ. Optional argument COMMAND is the s the alternate command to use." @@ -512,21 +512,21 @@ Optional argument COMMAND is the s the alternate command to use." (compile (concat ede-make-command " -f " (oref obj makefile) " " (ede-proj-makefile-target-name obj)))) -(defmethod project-debug-target ((obj ede-proj-target)) +(cl-defmethod project-debug-target ((obj ede-proj-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-proj-target)) +(cl-defmethod project-run-target ((obj ede-proj-target)) "Run the current project target OBJ." (error "Run-target not supported by %s" (eieio-object-name obj))) -(defmethod ede-proj-makefile-target-name ((this ede-proj-target)) +(cl-defmethod ede-proj-makefile-target-name ((this ede-proj-target)) "Return the name of the main target for THIS target." (ede-name this)) ;;; Compiler and source code generators ;; -(defmethod ede-want-file-auxiliary-p ((this ede-target) file) +(cl-defmethod ede-want-file-auxiliary-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))) @@ -534,7 +534,7 @@ Optional argument COMMAND is the s the alternate command to use." (setq src (cdr src))) src)) -(defmethod ede-proj-compilers ((obj ede-proj-target)) +(cl-defmethod ede-proj-compilers ((obj ede-proj-target)) "List of compilers being used by OBJ. If the `compiler' slot is empty, concoct one on a first match found basis for any given type from the `availablecompilers' slot. @@ -570,7 +570,7 @@ You may need to add support for this type of file." ;; Return the discovered compilers. comp))) -(defmethod ede-proj-linkers ((obj ede-proj-target)) +(cl-defmethod ede-proj-linkers ((obj ede-proj-target)) "List of linkers being used by OBJ. If the `linker' slot is empty, concoct one on a first match found basis for any given type from the `availablelinkers' slot. @@ -624,7 +624,7 @@ Converts all symbols into the objects to be used." "Return non-nil if the current project PROJ is automake mode." (eq (ede-proj-makefile-type proj) 'Makefile)) -(defmethod ede-proj-dist-makefile ((this ede-proj-project)) +(cl-defmethod ede-proj-dist-makefile ((this ede-proj-project)) "Return the name of the Makefile with the DIST target in it for THIS." (cond ((eq (oref this makefile-type) 'Makefile.am) (concat (file-name-directory (oref this file)) @@ -651,7 +651,7 @@ Converts all symbols into the objects to be used." (interactive) (ede-proj-setup-buildenvironment (ede-current-project) t)) -(defmethod ede-proj-makefile-create-maybe ((this ede-proj-project) mfilename) +(cl-defmethod ede-proj-makefile-create-maybe ((this ede-proj-project) mfilename) "Create a Makefile for all Makefile targets in THIS if needed. MFILENAME is the makefile to generate." ;; For now, pass through until dirty is implemented. @@ -660,7 +660,7 @@ MFILENAME is the makefile to generate." (file-newer-than-file-p (oref this file) mfilename)) (ede-proj-makefile-create this mfilename))) -(defmethod ede-proj-setup-buildenvironment ((this ede-proj-project) +(cl-defmethod ede-proj-setup-buildenvironment ((this ede-proj-project) &optional force) "Setup the build environment for project THIS. Handles the Makefile, or a Makefile.am configure.ac combination. @@ -686,7 +686,7 @@ Optional argument FORCE will force items to be regenerated." ;;; Lower level overloads ;; -(defmethod project-rescan ((this ede-proj-project)) +(cl-defmethod project-rescan ((this ede-proj-project)) "Rescan the EDE proj project THIS." (let ((root (or (ede-project-root this) this)) ) diff --git a/lisp/cedet/ede/project-am.el b/lisp/cedet/ede/project-am.el index d0ca8091c9..462369621e 100644 --- a/lisp/cedet/ede/project-am.el +++ b/lisp/cedet/ede/project-am.el @@ -194,7 +194,7 @@ other meta-variable based on this name.") "Encode one makefile.") ;;; Code: -(defmethod project-add-file ((ot project-am-target)) +(cl-defmethod project-add-file ((ot project-am-target)) "Add the current buffer into a project. OT is the object target. DIR is the directory to start in." (let* ((target (if ede-object (error "Already associated w/ a target") @@ -221,7 +221,7 @@ OT is the object target. DIR is the directory to start in." (save-buffer)) (setq ede-object ot))) -(defmethod project-remove-file ((ot project-am-target) fnnd) +(cl-defmethod project-remove-file ((ot project-am-target) fnnd) "Remove the current buffer from any project targets." (ede-with-projectfile ot (makefile-move-to-macro (project-am-macro ot)) @@ -232,7 +232,7 @@ OT is the object target. DIR is the directory to start in." (save-buffer)) (setq ede-object nil)) -(defmethod project-edit-file-target ((obj project-am-target)) +(cl-defmethod project-edit-file-target ((obj project-am-target)) "Edit the target associated w/ this file." (find-file (concat (oref obj path) "Makefile.am")) (goto-char (point-min)) @@ -240,7 +240,7 @@ OT is the object target. DIR is the directory to start in." (if (= (point-min) (point)) (re-search-forward (ede-target-name obj)))) -(defmethod project-new-target ((proj project-am-makefile) +(cl-defmethod project-new-target ((proj project-am-makefile) &optional name type) "Create a new target named NAME. Argument TYPE is the type of target to insert. This is a string @@ -300,7 +300,7 @@ buffer being in order to provide a smart default target type." ;; This should be handled at the EDE level, calling a method of the ;; top most project. ;; -(defmethod project-compile-project ((obj project-am-target) &optional command) +(cl-defmethod project-compile-project ((obj project-am-target) &optional command) "Compile the entire current project. Argument COMMAND is the command to use when compiling." (require 'compile) @@ -324,7 +324,7 @@ Argument COMMAND is the command to use when compiling." (let* ((default-directory (project-am-find-topmost-level default-directory))) (compile command))) -(defmethod project-compile-project ((obj project-am-makefile) +(cl-defmethod project-compile-project ((obj project-am-makefile) &optional command) "Compile the entire current project. Argument COMMAND is the command to use when compiling." @@ -349,7 +349,7 @@ Argument COMMAND is the command to use when compiling." (let* ((default-directory (project-am-find-topmost-level default-directory))) (compile command))) -(defmethod project-compile-target ((obj project-am-target) &optional command) +(cl-defmethod project-compile-target ((obj project-am-target) &optional command) "Compile the current target. Argument COMMAND is the command to use for compiling the target." (require 'compile) @@ -378,7 +378,7 @@ Argument COMMAND is the command to use for compiling the target." ;; We better be in the right place when compiling a specific target. (compile command)) -(defmethod project-debug-target ((obj project-am-objectcode)) +(cl-defmethod project-debug-target ((obj project-am-objectcode)) "Run the current project target in a debugger." (let ((tb (get-buffer-create " *padt*")) (dd (oref obj path)) @@ -397,7 +397,7 @@ Argument COMMAND is the command to use for compiling the target." (declare-function ede-shell-run-something "ede/shell") -(defmethod project-run-target ((obj project-am-objectcode)) +(cl-defmethod project-run-target ((obj project-am-objectcode)) "Run the current project target in comint buffer." (require 'ede/shell) (let ((tb (get-buffer-create " *padt*")) @@ -413,7 +413,7 @@ Argument COMMAND is the command to use for compiling the target." (ede-shell-run-something obj cmd)) (kill-buffer tb)))) -(defmethod project-make-dist ((this project-am-target)) +(cl-defmethod project-make-dist ((this project-am-target)) "Run the current project in the debugger." (require 'compile) (if (not project-am-compile-project-command) @@ -500,7 +500,7 @@ This is used when subprojects are made in named subdirectories." ampf)))) ;;; Methods: -(defmethod project-targets-for-file ((proj project-am-makefile)) +(cl-defmethod project-targets-for-file ((proj project-am-makefile)) "Return a list of targets the project PROJ." (oref proj targets)) @@ -612,7 +612,7 @@ Strip out duplicates, and recurse on variables." subdirs) ) -(defmethod project-rescan ((this project-am-makefile) &optional suggestedname) +(cl-defmethod project-rescan ((this project-am-makefile) &optional suggestedname) "Rescan the makefile for all targets and sub targets." (project-am-with-makefile-current (file-name-directory (oref this file)) ;;(message "Scanning %s..." (oref this file)) @@ -692,7 +692,7 @@ Strip out duplicates, and recurse on variables." ))) -(defmethod project-rescan ((this project-am-program)) +(cl-defmethod project-rescan ((this project-am-program)) "Rescan object THIS." (oset this :source (makefile-macro-file-list (project-am-macro this))) (unless (oref this :source) @@ -700,65 +700,65 @@ Strip out duplicates, and recurse on variables." (oset this :ldadd (makefile-macro-file-list (concat (oref this :name) "_LDADD")))) -(defmethod project-rescan ((this project-am-lib)) +(cl-defmethod project-rescan ((this project-am-lib)) "Rescan object THIS." (oset this :source (makefile-macro-file-list (project-am-macro this))) (unless (oref this :source) (oset this :source (list (concat (file-name-sans-extension (oref this :name)) ".c"))))) -(defmethod project-rescan ((this project-am-texinfo)) +(cl-defmethod project-rescan ((this project-am-texinfo)) "Rescan object THIS." (oset this :include (makefile-macro-file-list (project-am-macro this)))) -(defmethod project-rescan ((this project-am-man)) +(cl-defmethod project-rescan ((this project-am-man)) "Rescan object THIS." (oset this :source (makefile-macro-file-list (project-am-macro this)))) -(defmethod project-rescan ((this project-am-lisp)) +(cl-defmethod project-rescan ((this project-am-lisp)) "Rescan the lisp sources." (oset this :source (makefile-macro-file-list (project-am-macro this)))) -(defmethod project-rescan ((this project-am-header)) +(cl-defmethod project-rescan ((this project-am-header)) "Rescan the Header sources for object THIS." (oset this :source (makefile-macro-file-list (project-am-macro this)))) -(defmethod project-rescan ((this project-am-built-src)) +(cl-defmethod project-rescan ((this project-am-built-src)) "Rescan built sources for object THIS." (oset this :source (makefile-macro-file-list "BUILT_SOURCES"))) -(defmethod project-rescan ((this project-am-extra-dist)) +(cl-defmethod project-rescan ((this project-am-extra-dist)) "Rescan object THIS." (oset this :source (makefile-macro-file-list "EXTRA_DIST"))) -(defmethod project-am-macro ((this project-am-objectcode)) +(cl-defmethod project-am-macro ((this project-am-objectcode)) "Return the default macro to 'edit' for this object type." (concat (subst-char-in-string ?- ?_ (oref this :name)) "_SOURCES")) -(defmethod project-am-macro ((this project-am-header-noinst)) +(cl-defmethod project-am-macro ((this project-am-header-noinst)) "Return the default macro to 'edit' for this object." "noinst_HEADERS") -(defmethod project-am-macro ((this project-am-header-inst)) +(cl-defmethod project-am-macro ((this project-am-header-inst)) "Return the default macro to 'edit' for this object." "include_HEADERS") -(defmethod project-am-macro ((this project-am-header-pkg)) +(cl-defmethod project-am-macro ((this project-am-header-pkg)) "Return the default macro to 'edit' for this object." "pkginclude_HEADERS") -(defmethod project-am-macro ((this project-am-header-chk)) +(cl-defmethod project-am-macro ((this project-am-header-chk)) "Return the default macro to 'edit' for this object." "check_HEADERS") -(defmethod project-am-macro ((this project-am-texinfo)) +(cl-defmethod project-am-macro ((this project-am-texinfo)) "Return the default macro to 'edit' for this object type." (concat (file-name-sans-extension (oref this :name)) "_TEXINFOS")) -(defmethod project-am-macro ((this project-am-man)) +(cl-defmethod project-am-macro ((this project-am-man)) "Return the default macro to 'edit' for this object type." (oref this :name)) -(defmethod project-am-macro ((this project-am-lisp)) +(cl-defmethod project-am-macro ((this project-am-lisp)) "Return the default macro to 'edit' for this object." "lisp_LISP") @@ -781,7 +781,7 @@ nil means that this buffer belongs to no-one." sobj (cdr sobj))) obj)))) -(defmethod ede-buffer-mine ((this project-am-makefile) buffer) +(cl-defmethod ede-buffer-mine ((this project-am-makefile) buffer) "Return t if object THIS lays claim to the file in BUFFER." (let ((efn (expand-file-name (buffer-file-name buffer)))) (or (string= (oref this :file) efn) @@ -796,42 +796,42 @@ nil means that this buffer belongs to no-one." ans) ))) -(defmethod ede-buffer-mine ((this project-am-objectcode) buffer) +(cl-defmethod ede-buffer-mine ((this project-am-objectcode) buffer) "Return t if object THIS lays claim to the file in BUFFER." (member (file-relative-name (buffer-file-name buffer) (oref this :path)) (oref this :source))) -(defmethod ede-buffer-mine ((this project-am-texinfo) buffer) +(cl-defmethod ede-buffer-mine ((this project-am-texinfo) buffer) "Return t if object THIS lays claim to the file in BUFFER." (let ((bfn (file-relative-name (buffer-file-name buffer) (oref this :path)))) (or (string= (oref this :name) bfn) (member bfn (oref this :include))))) -(defmethod ede-buffer-mine ((this project-am-man) buffer) +(cl-defmethod ede-buffer-mine ((this project-am-man) buffer) "Return t if object THIS lays claim to the file in BUFFER." (string= (oref this :name) (file-relative-name (buffer-file-name buffer) (oref this :path)))) -(defmethod ede-buffer-mine ((this project-am-lisp) buffer) +(cl-defmethod ede-buffer-mine ((this project-am-lisp) buffer) "Return t if object THIS lays claim to the file in BUFFER." (member (file-relative-name (buffer-file-name buffer) (oref this :path)) (oref this :source))) -(defmethod project-am-subtree ((ampf project-am-makefile) subdir) +(cl-defmethod project-am-subtree ((ampf project-am-makefile) subdir) "Return the sub project in AMPF specified by SUBDIR." (object-assoc (expand-file-name subdir) 'file (oref ampf subproj))) -(defmethod project-compile-target-command ((this project-am-target)) +(cl-defmethod project-compile-target-command ((this project-am-target)) "Default target to use when compiling a given target." ;; This is a pretty good default for most. "") -(defmethod project-compile-target-command ((this project-am-objectcode)) +(cl-defmethod project-compile-target-command ((this project-am-objectcode)) "Default target to use when compiling an object code target." (oref this :name)) -(defmethod project-compile-target-command ((this project-am-texinfo)) +(cl-defmethod project-compile-target-command ((this project-am-texinfo)) "Default target t- use when compiling a texinfo file." (let ((n (oref this :name))) (if (string-match "\\.texi?\\(nfo\\)?" n) @@ -861,9 +861,9 @@ Argument FILE is the file to extract the end directory name from." (t 'project-am-program))) -(defmethod ede-buffer-header-file((this project-am-objectcode) buffer) +(cl-defmethod ede-buffer-header-file((this project-am-objectcode) buffer) "There are no default header files." - (or (call-next-method) + (or (cl-call-next-method) (let ((s (oref this source)) (found nil)) (while (and s (not found)) @@ -873,7 +873,7 @@ Argument FILE is the file to extract the end directory name from." (setq s (cdr s))) found))) -(defmethod ede-documentation ((this project-am-texinfo)) +(cl-defmethod ede-documentation ((this project-am-texinfo)) "Return a list of files that provides documentation. Documentation is not for object THIS, but is provided by THIS for other files in the project." @@ -997,12 +997,12 @@ Calculates the info with `project-am-extract-package-info'." (project-am-extract-package-info dir))) ;; for simple per project include path extension -(defmethod ede-system-include-path ((this project-am-makefile)) +(cl-defmethod ede-system-include-path ((this project-am-makefile)) "Return `project-am-localvars-include-path', usually local variable per file or in .dir-locals.el or similar." (bound-and-true-p project-am-localvars-include-path)) -(defmethod ede-system-include-path ((this project-am-target)) +(cl-defmethod ede-system-include-path ((this project-am-target)) "Return `project-am-localvars-include-path', usually local variable per file or in .dir-locals.el or similar." (bound-and-true-p project-am-localvars-include-path)) diff --git a/lisp/cedet/ede/shell.el b/lisp/cedet/ede/shell.el index e15ca19ac5..bdb5d30228 100644 --- a/lisp/cedet/ede/shell.el +++ b/lisp/cedet/ede/shell.el @@ -33,7 +33,7 @@ (declare-function comint-send-input "comint") -(defmethod ede-shell-run-something ((target ede-target) command) +(cl-defmethod ede-shell-run-something ((target ede-target) command) "Create a shell to run stuff for TARGET. COMMAND is a text string representing the thing to be run." (let* ((buff (ede-shell-buffer target)) @@ -72,7 +72,7 @@ COMMAND is a text string representing the thing to be run." (comint-send-input) ) -(defmethod ede-shell-buffer ((target ede-target)) +(cl-defmethod ede-shell-buffer ((target ede-target)) "Get the buffer for running shell commands for TARGET." (let ((name (ede-name target))) (get-buffer-create (format "*EDE Shell %s*" name)))) diff --git a/lisp/cedet/ede/simple.el b/lisp/cedet/ede/simple.el index f9582877ef..3c6cb0c2c2 100644 --- a/lisp/cedet/ede/simple.el +++ b/lisp/cedet/ede/simple.el @@ -102,7 +102,7 @@ All directories need at least one target.") "EDE Simple project class. Each directory needs a project file to control it.") -(defmethod ede-commit-project ((proj ede-simple-project)) +(cl-defmethod ede-commit-project ((proj ede-simple-project)) "Commit any change to PROJ to its file." (when (not (file-exists-p ede-simple-save-directory)) (if (y-or-n-p (concat ede-simple-save-directory @@ -111,7 +111,7 @@ Each directory needs a project file to control it.") (error "No save directory for new project"))) (eieio-persistent-save proj)) -(defmethod ede-find-subproject-for-directory ((proj ede-simple-project) +(cl-defmethod ede-find-subproject-for-directory ((proj ede-simple-project) dir) "Return PROJ, for handling all subdirs below DIR." proj) diff --git a/lisp/cedet/ede/source.el b/lisp/cedet/ede/source.el index 978315a423..d7d2767962 100644 --- a/lisp/cedet/ede/source.el +++ b/lisp/cedet/ede/source.el @@ -72,7 +72,7 @@ that they are willing to use.") ;;; Methods ;; -(defmethod initialize-instance :AFTER ((this ede-sourcecode) &rest fields) +(cl-defmethod initialize-instance :after ((this ede-sourcecode) &rest fields) "Make sure that all ede compiler objects are cached in `ede-compiler-list'." (let ((lst ede-sourcecode-list)) @@ -85,45 +85,45 @@ that they are willing to use.") ;; Add to the beginning of the list. (setq ede-sourcecode-list (cons this ede-sourcecode-list))))) -(defmethod ede-want-file-p ((this ede-sourcecode) filename) +(cl-defmethod ede-want-file-p ((this ede-sourcecode) filename) "Return non-nil if sourcecode definition THIS will take FILENAME." (or (ede-want-file-source-p this filename) (ede-want-file-auxiliary-p this filename))) -(defmethod ede-want-file-source-p ((this ede-sourcecode) filename) +(cl-defmethod ede-want-file-source-p ((this ede-sourcecode) filename) "Return non-nil if THIS will take FILENAME as an auxiliary ." (let ((case-fold-search nil)) (string-match (oref this sourcepattern) filename))) -(defmethod ede-want-file-auxiliary-p ((this ede-sourcecode) filename) +(cl-defmethod ede-want-file-auxiliary-p ((this ede-sourcecode) filename) "Return non-nil if THIS will take FILENAME as an auxiliary ." (let ((case-fold-search nil)) (and (slot-boundp this 'auxsourcepattern) (oref this auxsourcepattern) (string-match (oref this auxsourcepattern) filename)))) -(defmethod ede-want-any-source-files-p ((this ede-sourcecode) filenames) +(cl-defmethod ede-want-any-source-files-p ((this ede-sourcecode) filenames) "Return non-nil if THIS will accept any source files in FILENAMES." (let (found) (while (and (not found) filenames) (setq found (ede-want-file-source-p this (pop filenames)))) found)) -(defmethod ede-want-any-auxiliary-files-p ((this ede-sourcecode) filenames) +(cl-defmethod ede-want-any-auxiliary-files-p ((this ede-sourcecode) filenames) "Return non-nil if THIS will accept any aux files in FILENAMES." (let (found) (while (and (not found) filenames) (setq found (ede-want-file-auxiliary-p this (pop filenames)))) found)) -(defmethod ede-want-any-files-p ((this ede-sourcecode) filenames) +(cl-defmethod ede-want-any-files-p ((this ede-sourcecode) filenames) "Return non-nil if THIS will accept any files in FILENAMES." (let (found) (while (and (not found) filenames) (setq found (ede-want-file-p this (pop filenames)))) found)) -(defmethod ede-buffer-header-file ((this ede-sourcecode) filename) +(cl-defmethod ede-buffer-header-file ((this ede-sourcecode) filename) "Return a list of file names of header files for THIS with FILENAME. Used to guess header files, but uses the auxsource regular expression." (let ((dn (file-name-directory filename)) diff --git a/lisp/cedet/ede/speedbar.el b/lisp/cedet/ede/speedbar.el index e08562a373..46c097ab72 100644 --- a/lisp/cedet/ede/speedbar.el +++ b/lisp/cedet/ede/speedbar.el @@ -181,13 +181,13 @@ Argument DIR is the directory from which to derive the list of objects." (setq depth (1- depth))) (speedbar-line-token)))) -(defmethod eieio-speedbar-derive-line-path ((obj ede-project) &optional depth) +(cl-defmethod eieio-speedbar-derive-line-path ((obj ede-project) &optional depth) "Return the path to OBJ. Optional DEPTH is the depth we start at." (file-name-directory (oref obj file)) ) -(defmethod eieio-speedbar-derive-line-path ((obj ede-target) &optional depth) +(cl-defmethod eieio-speedbar-derive-line-path ((obj ede-target) &optional depth) "Return the path to OBJ. Optional DEPTH is the depth we start at." (let ((proj (ede-target-parent obj))) @@ -201,42 +201,42 @@ Optional DEPTH is the depth we start at." (concat (eieio-speedbar-derive-line-path proj) (ede-find-nearest-file-line))))))) -(defmethod eieio-speedbar-description ((obj ede-project)) +(cl-defmethod eieio-speedbar-description ((obj ede-project)) "Provide a speedbar description for OBJ." (ede-description obj)) -(defmethod eieio-speedbar-description ((obj ede-target)) +(cl-defmethod eieio-speedbar-description ((obj ede-target)) "Provide a speedbar description for OBJ." (ede-description obj)) -(defmethod eieio-speedbar-child-description ((obj ede-target)) +(cl-defmethod eieio-speedbar-child-description ((obj ede-target)) "Provide a speedbar description for a plain-child of OBJ. A plain child is a child element which is not an EIEIO object." (or (speedbar-item-info-file-helper) (speedbar-item-info-tag-helper))) -(defmethod eieio-speedbar-object-buttonname ((object ede-project)) +(cl-defmethod eieio-speedbar-object-buttonname ((object ede-project)) "Return a string to use as a speedbar button for OBJECT." (if (ede-parent-project object) (ede-name object) (concat (ede-name object) " " (oref object version)))) -(defmethod eieio-speedbar-object-buttonname ((object ede-target)) +(cl-defmethod eieio-speedbar-object-buttonname ((object ede-target)) "Return a string to use as a speedbar button for OBJECT." (ede-name object)) -(defmethod eieio-speedbar-object-children ((this ede-project)) +(cl-defmethod eieio-speedbar-object-children ((this ede-project)) "Return the list of speedbar display children for THIS." (condition-case nil (with-slots (subproj targets) this (append subproj targets)) (error nil))) -(defmethod eieio-speedbar-object-children ((this ede-target)) +(cl-defmethod eieio-speedbar-object-children ((this ede-target)) "Return the list of speedbar display children for THIS." (oref this source)) -(defmethod eieio-speedbar-child-make-tag-lines ((this ede-target) depth) +(cl-defmethod eieio-speedbar-child-make-tag-lines ((this ede-target) depth) "Create a speedbar tag line for a child of THIS. It has depth DEPTH." (with-slots (source) this diff --git a/lisp/cedet/ede/util.el b/lisp/cedet/ede/util.el index bfde858c95..dbbf46fd01 100644 --- a/lisp/cedet/ede/util.el +++ b/lisp/cedet/ede/util.el @@ -46,19 +46,19 @@ Argument NEWVERSION is the version number to use in the current project." (project-update-version ede-object) (ede-update-version-in-source ede-object newversion)))) -(defmethod project-update-version ((ot ede-project)) +(cl-defmethod project-update-version ((ot ede-project)) "The :version of the project OT has been updated. Handle saving, or other detail." (error "project-update-version not supported by %s" (eieio-object-name ot))) -(defmethod ede-update-version-in-source ((this ede-project) version) +(cl-defmethod ede-update-version-in-source ((this ede-project) version) "Change occurrences of a version string in sources. In project THIS, cycle over all targets to give them a chance to set their sources to VERSION." (ede-map-targets this (lambda (targ) (ede-update-version-in-source targ version)))) -(defmethod ede-update-version-in-source ((this ede-target) version) +(cl-defmethod ede-update-version-in-source ((this ede-target) version) "In sources for THIS, change version numbers to VERSION." (if (and (slot-boundp this 'versionsource) (oref this versionsource)) |