diff options
| author | Stefan Monnier | 2015-02-04 13:49:49 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2015-02-04 13:49:49 -0500 |
| commit | 73b17f7c2b723a0ad4ea04cf1a5a8be5bbdf6121 (patch) | |
| tree | fc2ee663521960bf1c102bb98a72f31903e5110b | |
| parent | 102a21d68976ab9dc85304e0bc47b7562d3cf93f (diff) | |
| download | emacs-73b17f7c2b723a0ad4ea04cf1a5a8be5bbdf6121.tar.gz emacs-73b17f7c2b723a0ad4ea04cf1a5a8be5bbdf6121.zip | |
* lisp/cedet: Use cl-generic instead of EIEIO's defgeneric/defmethod
* lisp/cedet/**/*.el: Mechanically replace all calls to defmethod/defgeneric
by calls to cl-defmethod/cl-defgeneric.
* lisp/cedet/srecode/table.el:
* lisp/cedet/srecode/fields.el:
* lisp/cedet/srecode/dictionary.el:
* lisp/cedet/srecode/compile.el:
* lisp/cedet/semantic/debug.el:
* lisp/cedet/semantic/db-ref.el:
* lisp/cedet/ede/base.el:
* lisp/cedet/ede/auto.el:
* lisp/cedet/ede.el: Require `cl-generic'.
64 files changed, 836 insertions, 812 deletions
diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index 5c958350ff0..6bbae7e08a8 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | 2015-02-04 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | Use cl-generic instead of EIEIO's defgeneric/defmethod. | ||
| 4 | * **/*.el: Mechanically replace all calls to defmethod/defgeneric by | ||
| 5 | calls to cl-defmethod/cl-defgeneric. | ||
| 6 | * srecode/table.el: | ||
| 7 | * srecode/fields.el: | ||
| 8 | * srecode/dictionary.el: | ||
| 9 | * srecode/compile.el: | ||
| 10 | * semantic/debug.el: | ||
| 11 | * semantic/db-ref.el: | ||
| 12 | * ede/base.el: | ||
| 13 | * ede/auto.el: | ||
| 14 | * ede.el: Require `cl-generic'. | ||
| 15 | |||
| 1 | 2015-01-07 Stefan Monnier <monnier@iro.umontreal.ca> | 16 | 2015-01-07 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 17 | ||
| 3 | Don't use <class> as a variable and don't assume that <class>-list-p is | 18 | Don't use <class> as a variable and don't assume that <class>-list-p is |
diff --git a/lisp/cedet/ede.el b/lisp/cedet/ede.el index 87cfb85b2c2..074fda97862 100644 --- a/lisp/cedet/ede.el +++ b/lisp/cedet/ede.el | |||
| @@ -41,6 +41,7 @@ | |||
| 41 | 41 | ||
| 42 | (require 'cedet) | 42 | (require 'cedet) |
| 43 | (require 'eieio) | 43 | (require 'eieio) |
| 44 | (require 'cl-generic) | ||
| 44 | (require 'eieio-speedbar) | 45 | (require 'eieio-speedbar) |
| 45 | (require 'ede/source) | 46 | (require 'ede/source) |
| 46 | (require 'ede/base) | 47 | (require 'ede/base) |
| @@ -430,7 +431,7 @@ version of the keymap." | |||
| 430 | 431 | ||
| 431 | ;;; Menu building methods for building | 432 | ;;; Menu building methods for building |
| 432 | ;; | 433 | ;; |
| 433 | (defmethod ede-menu-items-build ((obj ede-project) &optional current) | 434 | (cl-defmethod ede-menu-items-build ((obj ede-project) &optional current) |
| 434 | "Return a list of menu items for building project OBJ. | 435 | "Return a list of menu items for building project OBJ. |
| 435 | If optional argument CURRENT is non-nil, return sub-menu code." | 436 | If optional argument CURRENT is non-nil, return sub-menu code." |
| 436 | (if current | 437 | (if current |
| @@ -440,7 +441,7 @@ If optional argument CURRENT is non-nil, return sub-menu code." | |||
| 440 | (concat "Build Project " (ede-name obj)) | 441 | (concat "Build Project " (ede-name obj)) |
| 441 | `(project-compile-project ,obj)))))) | 442 | `(project-compile-project ,obj)))))) |
| 442 | 443 | ||
| 443 | (defmethod ede-menu-items-build ((obj ede-target) &optional current) | 444 | (cl-defmethod ede-menu-items-build ((obj ede-target) &optional current) |
| 444 | "Return a list of menu items for building target OBJ. | 445 | "Return a list of menu items for building target OBJ. |
| 445 | If optional argument CURRENT is non-nil, return sub-menu code." | 446 | If optional argument CURRENT is non-nil, return sub-menu code." |
| 446 | (if current | 447 | (if current |
| @@ -821,7 +822,7 @@ Optional argument NAME is the name to give this project." | |||
| 821 | ;; Allert the user | 822 | ;; Allert the user |
| 822 | (message "Project created and saved. You may now create targets.")) | 823 | (message "Project created and saved. You may now create targets.")) |
| 823 | 824 | ||
| 824 | (defmethod ede-add-subproject ((proj-a ede-project) proj-b) | 825 | (cl-defmethod ede-add-subproject ((proj-a ede-project) proj-b) |
| 825 | "Add into PROJ-A, the subproject PROJ-B." | 826 | "Add into PROJ-A, the subproject PROJ-B." |
| 826 | (oset proj-a subproj (cons proj-b (oref proj-a subproj)))) | 827 | (oset proj-a subproj (cons proj-b (oref proj-a subproj)))) |
| 827 | 828 | ||
| @@ -986,75 +987,75 @@ Optional argument FORCE forces the file to be removed without asking." | |||
| 986 | ;; files should inherit from `ede-project'. Create the appropriate | 987 | ;; files should inherit from `ede-project'. Create the appropriate |
| 987 | ;; methods based on those below. | 988 | ;; methods based on those below. |
| 988 | 989 | ||
| 989 | (defmethod project-interactive-select-target ((this ede-project-placeholder) prompt) | 990 | (cl-defmethod project-interactive-select-target ((this ede-project-placeholder) prompt) |
| 990 | ; checkdoc-params: (prompt) | 991 | ; checkdoc-params: (prompt) |
| 991 | "Make sure placeholder THIS is replaced with the real thing, and pass through." | 992 | "Make sure placeholder THIS is replaced with the real thing, and pass through." |
| 992 | (project-interactive-select-target this prompt)) | 993 | (project-interactive-select-target this prompt)) |
| 993 | 994 | ||
| 994 | (defmethod project-interactive-select-target ((this ede-project) prompt) | 995 | (cl-defmethod project-interactive-select-target ((this ede-project) prompt) |
| 995 | "Interactively query for a target that exists in project THIS. | 996 | "Interactively query for a target that exists in project THIS. |
| 996 | Argument PROMPT is the prompt to use when querying the user for a target." | 997 | Argument PROMPT is the prompt to use when querying the user for a target." |
| 997 | (let ((ob (object-assoc-list 'name (oref this targets)))) | 998 | (let ((ob (object-assoc-list 'name (oref this targets)))) |
| 998 | (cdr (assoc (completing-read prompt ob nil t) ob)))) | 999 | (cdr (assoc (completing-read prompt ob nil t) ob)))) |
| 999 | 1000 | ||
| 1000 | (defmethod project-add-file ((this ede-project-placeholder) file) | 1001 | (cl-defmethod project-add-file ((this ede-project-placeholder) file) |
| 1001 | ; checkdoc-params: (file) | 1002 | ; checkdoc-params: (file) |
| 1002 | "Make sure placeholder THIS is replaced with the real thing, and pass through." | 1003 | "Make sure placeholder THIS is replaced with the real thing, and pass through." |
| 1003 | (project-add-file this file)) | 1004 | (project-add-file this file)) |
| 1004 | 1005 | ||
| 1005 | (defmethod project-add-file ((ot ede-target) file) | 1006 | (cl-defmethod project-add-file ((ot ede-target) file) |
| 1006 | "Add the current buffer into project project target OT. | 1007 | "Add the current buffer into project project target OT. |
| 1007 | Argument FILE is the file to add." | 1008 | Argument FILE is the file to add." |
| 1008 | (error "add-file not supported by %s" (eieio-object-name ot))) | 1009 | (error "add-file not supported by %s" (eieio-object-name ot))) |
| 1009 | 1010 | ||
| 1010 | (defmethod project-remove-file ((ot ede-target) fnnd) | 1011 | (cl-defmethod project-remove-file ((ot ede-target) fnnd) |
| 1011 | "Remove the current buffer from project target OT. | 1012 | "Remove the current buffer from project target OT. |
| 1012 | Argument FNND is an argument." | 1013 | Argument FNND is an argument." |
| 1013 | (error "remove-file not supported by %s" (eieio-object-name ot))) | 1014 | (error "remove-file not supported by %s" (eieio-object-name ot))) |
| 1014 | 1015 | ||
| 1015 | (defmethod project-edit-file-target ((ot ede-target)) | 1016 | (cl-defmethod project-edit-file-target ((ot ede-target)) |
| 1016 | "Edit the target OT associated with this file." | 1017 | "Edit the target OT associated with this file." |
| 1017 | (find-file (oref (ede-current-project) file))) | 1018 | (find-file (oref (ede-current-project) file))) |
| 1018 | 1019 | ||
| 1019 | (defmethod project-new-target ((proj ede-project) &rest args) | 1020 | (cl-defmethod project-new-target ((proj ede-project) &rest args) |
| 1020 | "Create a new target. It is up to the project PROJ to get the name." | 1021 | "Create a new target. It is up to the project PROJ to get the name." |
| 1021 | (error "new-target not supported by %s" (eieio-object-name proj))) | 1022 | (error "new-target not supported by %s" (eieio-object-name proj))) |
| 1022 | 1023 | ||
| 1023 | (defmethod project-new-target-custom ((proj ede-project)) | 1024 | (cl-defmethod project-new-target-custom ((proj ede-project)) |
| 1024 | "Create a new target. It is up to the project PROJ to get the name." | 1025 | "Create a new target. It is up to the project PROJ to get the name." |
| 1025 | (error "New-target-custom not supported by %s" (eieio-object-name proj))) | 1026 | (error "New-target-custom not supported by %s" (eieio-object-name proj))) |
| 1026 | 1027 | ||
| 1027 | (defmethod project-delete-target ((ot ede-target)) | 1028 | (cl-defmethod project-delete-target ((ot ede-target)) |
| 1028 | "Delete the current target OT from its parent project." | 1029 | "Delete the current target OT from its parent project." |
| 1029 | (error "add-file not supported by %s" (eieio-object-name ot))) | 1030 | (error "add-file not supported by %s" (eieio-object-name ot))) |
| 1030 | 1031 | ||
| 1031 | (defmethod project-compile-project ((obj ede-project) &optional command) | 1032 | (cl-defmethod project-compile-project ((obj ede-project) &optional command) |
| 1032 | "Compile the entire current project OBJ. | 1033 | "Compile the entire current project OBJ. |
| 1033 | Argument COMMAND is the command to use when compiling." | 1034 | Argument COMMAND is the command to use when compiling." |
| 1034 | (error "compile-project not supported by %s" (eieio-object-name obj))) | 1035 | (error "compile-project not supported by %s" (eieio-object-name obj))) |
| 1035 | 1036 | ||
| 1036 | (defmethod project-compile-target ((obj ede-target) &optional command) | 1037 | (cl-defmethod project-compile-target ((obj ede-target) &optional command) |
| 1037 | "Compile the current target OBJ. | 1038 | "Compile the current target OBJ. |
| 1038 | Argument COMMAND is the command to use for compiling the target." | 1039 | Argument COMMAND is the command to use for compiling the target." |
| 1039 | (error "compile-target not supported by %s" (eieio-object-name obj))) | 1040 | (error "compile-target not supported by %s" (eieio-object-name obj))) |
| 1040 | 1041 | ||
| 1041 | (defmethod project-debug-target ((obj ede-target)) | 1042 | (cl-defmethod project-debug-target ((obj ede-target)) |
| 1042 | "Run the current project target OBJ in a debugger." | 1043 | "Run the current project target OBJ in a debugger." |
| 1043 | (error "debug-target not supported by %s" (eieio-object-name obj))) | 1044 | (error "debug-target not supported by %s" (eieio-object-name obj))) |
| 1044 | 1045 | ||
| 1045 | (defmethod project-run-target ((obj ede-target)) | 1046 | (cl-defmethod project-run-target ((obj ede-target)) |
| 1046 | "Run the current project target OBJ." | 1047 | "Run the current project target OBJ." |
| 1047 | (error "run-target not supported by %s" (eieio-object-name obj))) | 1048 | (error "run-target not supported by %s" (eieio-object-name obj))) |
| 1048 | 1049 | ||
| 1049 | (defmethod project-make-dist ((this ede-project)) | 1050 | (cl-defmethod project-make-dist ((this ede-project)) |
| 1050 | "Build a distribution for the project based on THIS project." | 1051 | "Build a distribution for the project based on THIS project." |
| 1051 | (error "Make-dist not supported by %s" (eieio-object-name this))) | 1052 | (error "Make-dist not supported by %s" (eieio-object-name this))) |
| 1052 | 1053 | ||
| 1053 | (defmethod project-dist-files ((this ede-project)) | 1054 | (cl-defmethod project-dist-files ((this ede-project)) |
| 1054 | "Return a list of files that constitute a distribution of THIS project." | 1055 | "Return a list of files that constitute a distribution of THIS project." |
| 1055 | (error "Dist-files is not supported by %s" (eieio-object-name this))) | 1056 | (error "Dist-files is not supported by %s" (eieio-object-name this))) |
| 1056 | 1057 | ||
| 1057 | (defmethod project-rescan ((this ede-project)) | 1058 | (cl-defmethod project-rescan ((this ede-project)) |
| 1058 | "Rescan the EDE project THIS." | 1059 | "Rescan the EDE project THIS." |
| 1059 | (error "Rescanning a project is not supported by %s" (eieio-object-name this))) | 1060 | (error "Rescanning a project is not supported by %s" (eieio-object-name this))) |
| 1060 | 1061 | ||
| @@ -1248,7 +1249,7 @@ that contains the target that becomes buffer's object." | |||
| 1248 | ;; Return our findings. | 1249 | ;; Return our findings. |
| 1249 | ede-object)) | 1250 | ede-object)) |
| 1250 | 1251 | ||
| 1251 | (defmethod ede-target-in-project-p ((proj ede-project) target) | 1252 | (cl-defmethod ede-target-in-project-p ((proj ede-project) target) |
| 1252 | "Is PROJ the parent of TARGET? | 1253 | "Is PROJ the parent of TARGET? |
| 1253 | If TARGET belongs to a subproject, return that project file." | 1254 | If TARGET belongs to a subproject, return that project file." |
| 1254 | (if (and (slot-boundp proj 'targets) | 1255 | (if (and (slot-boundp proj 'targets) |
| @@ -1273,7 +1274,7 @@ could become slow in time." | |||
| 1273 | projs (cdr projs))) | 1274 | projs (cdr projs))) |
| 1274 | ans))) | 1275 | ans))) |
| 1275 | 1276 | ||
| 1276 | (defmethod ede-find-target ((proj ede-project) buffer) | 1277 | (cl-defmethod ede-find-target ((proj ede-project) buffer) |
| 1277 | "Fetch the target in PROJ belonging to BUFFER or nil." | 1278 | "Fetch the target in PROJ belonging to BUFFER or nil." |
| 1278 | (with-current-buffer buffer | 1279 | (with-current-buffer buffer |
| 1279 | 1280 | ||
| @@ -1295,16 +1296,16 @@ could become slow in time." | |||
| 1295 | (setq targets (cdr targets))) | 1296 | (setq targets (cdr targets))) |
| 1296 | f))))) | 1297 | f))))) |
| 1297 | 1298 | ||
| 1298 | (defmethod ede-target-buffer-in-sourcelist ((this ede-target) buffer source) | 1299 | (cl-defmethod ede-target-buffer-in-sourcelist ((this ede-target) buffer source) |
| 1299 | "Return non-nil if object THIS is in BUFFER to a SOURCE list. | 1300 | "Return non-nil if object THIS is in BUFFER to a SOURCE list. |
| 1300 | Handles complex path issues." | 1301 | Handles complex path issues." |
| 1301 | (member (ede-convert-path this (buffer-file-name buffer)) source)) | 1302 | (member (ede-convert-path this (buffer-file-name buffer)) source)) |
| 1302 | 1303 | ||
| 1303 | (defmethod ede-buffer-mine ((this ede-project) buffer) | 1304 | (cl-defmethod ede-buffer-mine ((this ede-project) buffer) |
| 1304 | "Return non-nil if object THIS lays claim to the file in BUFFER." | 1305 | "Return non-nil if object THIS lays claim to the file in BUFFER." |
| 1305 | nil) | 1306 | nil) |
| 1306 | 1307 | ||
| 1307 | (defmethod ede-buffer-mine ((this ede-target) buffer) | 1308 | (cl-defmethod ede-buffer-mine ((this ede-target) buffer) |
| 1308 | "Return non-nil if object THIS lays claim to the file in BUFFER." | 1309 | "Return non-nil if object THIS lays claim to the file in BUFFER." |
| 1309 | (condition-case nil | 1310 | (condition-case nil |
| 1310 | (ede-target-buffer-in-sourcelist this buffer (oref this source)) | 1311 | (ede-target-buffer-in-sourcelist this buffer (oref this source)) |
| @@ -1354,22 +1355,22 @@ This includes buffers controlled by a specific target of PROJECT." | |||
| 1354 | "Execute PROC on all buffers controlled by EDE." | 1355 | "Execute PROC on all buffers controlled by EDE." |
| 1355 | (mapcar proc (ede-buffers))) | 1356 | (mapcar proc (ede-buffers))) |
| 1356 | 1357 | ||
| 1357 | (defmethod ede-map-project-buffers ((this ede-project) proc) | 1358 | (cl-defmethod ede-map-project-buffers ((this ede-project) proc) |
| 1358 | "For THIS, execute PROC on all buffers belonging to THIS." | 1359 | "For THIS, execute PROC on all buffers belonging to THIS." |
| 1359 | (mapcar proc (ede-project-buffers this))) | 1360 | (mapcar proc (ede-project-buffers this))) |
| 1360 | 1361 | ||
| 1361 | (defmethod ede-map-target-buffers ((this ede-target) proc) | 1362 | (cl-defmethod ede-map-target-buffers ((this ede-target) proc) |
| 1362 | "For THIS, execute PROC on all buffers belonging to THIS." | 1363 | "For THIS, execute PROC on all buffers belonging to THIS." |
| 1363 | (mapcar proc (ede-target-buffers this))) | 1364 | (mapcar proc (ede-target-buffers this))) |
| 1364 | 1365 | ||
| 1365 | ;; other types of mapping | 1366 | ;; other types of mapping |
| 1366 | (defmethod ede-map-subprojects ((this ede-project) proc) | 1367 | (cl-defmethod ede-map-subprojects ((this ede-project) proc) |
| 1367 | "For object THIS, execute PROC on all direct subprojects. | 1368 | "For object THIS, execute PROC on all direct subprojects. |
| 1368 | This function does not apply PROC to sub-sub projects. | 1369 | This function does not apply PROC to sub-sub projects. |
| 1369 | See also `ede-map-all-subprojects'." | 1370 | See also `ede-map-all-subprojects'." |
| 1370 | (mapcar proc (oref this subproj))) | 1371 | (mapcar proc (oref this subproj))) |
| 1371 | 1372 | ||
| 1372 | (defmethod ede-map-all-subprojects ((this ede-project) allproc) | 1373 | (cl-defmethod ede-map-all-subprojects ((this ede-project) allproc) |
| 1373 | "For object THIS, execute PROC on THIS and all subprojects. | 1374 | "For object THIS, execute PROC on THIS and all subprojects. |
| 1374 | This function also applies PROC to sub-sub projects. | 1375 | This function also applies PROC to sub-sub projects. |
| 1375 | See also `ede-map-subprojects'." | 1376 | See also `ede-map-subprojects'." |
| @@ -1383,11 +1384,11 @@ See also `ede-map-subprojects'." | |||
| 1383 | 1384 | ||
| 1384 | ;; (ede-map-all-subprojects (ede-load-project-file "../semantic/") (lambda (sp) (oref sp file))) | 1385 | ;; (ede-map-all-subprojects (ede-load-project-file "../semantic/") (lambda (sp) (oref sp file))) |
| 1385 | 1386 | ||
| 1386 | (defmethod ede-map-targets ((this ede-project) proc) | 1387 | (cl-defmethod ede-map-targets ((this ede-project) proc) |
| 1387 | "For object THIS, execute PROC on all targets." | 1388 | "For object THIS, execute PROC on all targets." |
| 1388 | (mapcar proc (oref this targets))) | 1389 | (mapcar proc (oref this targets))) |
| 1389 | 1390 | ||
| 1390 | (defmethod ede-map-any-target-p ((this ede-project) proc) | 1391 | (cl-defmethod ede-map-any-target-p ((this ede-project) proc) |
| 1391 | "For project THIS, map PROC to all targets and return if any non-nil. | 1392 | "For project THIS, map PROC to all targets and return if any non-nil. |
| 1392 | Return the first non-nil value returned by PROC." | 1393 | Return the first non-nil value returned by PROC." |
| 1393 | (eval (cons 'or (ede-map-targets this proc)))) | 1394 | (eval (cons 'or (ede-map-targets this proc)))) |
| @@ -1399,15 +1400,15 @@ Return the first non-nil value returned by PROC." | |||
| 1399 | ;; configuring items for Semantic. | 1400 | ;; configuring items for Semantic. |
| 1400 | 1401 | ||
| 1401 | ;; Generic paths | 1402 | ;; Generic paths |
| 1402 | (defmethod ede-system-include-path ((this ede-project)) | 1403 | (cl-defmethod ede-system-include-path ((this ede-project)) |
| 1403 | "Get the system include path used by project THIS." | 1404 | "Get the system include path used by project THIS." |
| 1404 | nil) | 1405 | nil) |
| 1405 | 1406 | ||
| 1406 | (defmethod ede-system-include-path ((this ede-target)) | 1407 | (cl-defmethod ede-system-include-path ((this ede-target)) |
| 1407 | "Get the system include path used by project THIS." | 1408 | "Get the system include path used by project THIS." |
| 1408 | nil) | 1409 | nil) |
| 1409 | 1410 | ||
| 1410 | (defmethod ede-source-paths ((this ede-project) mode) | 1411 | (cl-defmethod ede-source-paths ((this ede-project) mode) |
| 1411 | "Get the base to all source trees in the current project for MODE. | 1412 | "Get the base to all source trees in the current project for MODE. |
| 1412 | For example, <root>/src for sources of c/c++, Java, etc, | 1413 | For example, <root>/src for sources of c/c++, Java, etc, |
| 1413 | and <root>/doc for doc sources." | 1414 | and <root>/doc for doc sources." |
| @@ -1435,20 +1436,20 @@ and <root>/doc for doc sources." | |||
| 1435 | (message "Choosing preprocessor syms for project %s" | 1436 | (message "Choosing preprocessor syms for project %s" |
| 1436 | (eieio-object-name (car objs))))))) | 1437 | (eieio-object-name (car objs))))))) |
| 1437 | 1438 | ||
| 1438 | (defmethod ede-system-include-path ((this ede-project)) | 1439 | (cl-defmethod ede-system-include-path ((this ede-project)) |
| 1439 | "Get the system include path used by project THIS." | 1440 | "Get the system include path used by project THIS." |
| 1440 | nil) | 1441 | nil) |
| 1441 | 1442 | ||
| 1442 | (defmethod ede-preprocessor-map ((this ede-project)) | 1443 | (cl-defmethod ede-preprocessor-map ((this ede-project)) |
| 1443 | "Get the pre-processor map for project THIS." | 1444 | "Get the pre-processor map for project THIS." |
| 1444 | nil) | 1445 | nil) |
| 1445 | 1446 | ||
| 1446 | (defmethod ede-preprocessor-map ((this ede-target)) | 1447 | (cl-defmethod ede-preprocessor-map ((this ede-target)) |
| 1447 | "Get the pre-processor map for project THIS." | 1448 | "Get the pre-processor map for project THIS." |
| 1448 | nil) | 1449 | nil) |
| 1449 | 1450 | ||
| 1450 | ;; Java | 1451 | ;; Java |
| 1451 | (defmethod ede-java-classpath ((this ede-project)) | 1452 | (cl-defmethod ede-java-classpath ((this ede-project)) |
| 1452 | "Return the classpath for this project." | 1453 | "Return the classpath for this project." |
| 1453 | ;; @TODO - Can JDEE add something here? | 1454 | ;; @TODO - Can JDEE add something here? |
| 1454 | nil) | 1455 | nil) |
| @@ -1504,7 +1505,7 @@ It does not apply the value to buffers." | |||
| 1504 | (error "Cannot set project variable until it is added with `ede-make-project-local-variable'")) | 1505 | (error "Cannot set project variable until it is added with `ede-make-project-local-variable'")) |
| 1505 | (setcdr va value))) | 1506 | (setcdr va value))) |
| 1506 | 1507 | ||
| 1507 | (defmethod ede-set-project-variables ((project ede-project) &optional buffer) | 1508 | (cl-defmethod ede-set-project-variables ((project ede-project) &optional buffer) |
| 1508 | "Set variables local to PROJECT in BUFFER." | 1509 | "Set variables local to PROJECT in BUFFER." |
| 1509 | (if (not buffer) (setq buffer (current-buffer))) | 1510 | (if (not buffer) (setq buffer (current-buffer))) |
| 1510 | (with-current-buffer buffer | 1511 | (with-current-buffer buffer |
| @@ -1512,7 +1513,7 @@ It does not apply the value to buffers." | |||
| 1512 | (make-local-variable (car v)) | 1513 | (make-local-variable (car v)) |
| 1513 | (set (car v) (cdr v))))) | 1514 | (set (car v) (cdr v))))) |
| 1514 | 1515 | ||
| 1515 | (defmethod ede-commit-local-variables ((proj ede-project)) | 1516 | (cl-defmethod ede-commit-local-variables ((proj ede-project)) |
| 1516 | "Commit change to local variables in PROJ." | 1517 | "Commit change to local variables in PROJ." |
| 1517 | nil) | 1518 | nil) |
| 1518 | 1519 | ||
diff --git a/lisp/cedet/ede/auto.el b/lisp/cedet/ede/auto.el index 769bea4ce50..7e8df6b89af 100644 --- a/lisp/cedet/ede/auto.el +++ b/lisp/cedet/ede/auto.el | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | ;;; Code: | 30 | ;;; Code: |
| 31 | 31 | ||
| 32 | (require 'eieio) | 32 | (require 'eieio) |
| 33 | (require 'cl-generic) | ||
| 33 | 34 | ||
| 34 | (declare-function ede-directory-safe-p "ede") | 35 | (declare-function ede-directory-safe-p "ede") |
| 35 | (declare-function ede-add-project-to-global-list "ede") | 36 | (declare-function ede-add-project-to-global-list "ede") |
| @@ -62,7 +63,7 @@ location is varied dependent on other complex criteria, this class | |||
| 62 | can be used to define that match without loading the specific project | 63 | can be used to define that match without loading the specific project |
| 63 | into memory.") | 64 | into memory.") |
| 64 | 65 | ||
| 65 | (defmethod ede-dirmatch-installed ((dirmatch ede-project-autoload-dirmatch)) | 66 | (cl-defmethod ede-dirmatch-installed ((dirmatch ede-project-autoload-dirmatch)) |
| 66 | "Return non-nil if the tool DIRMATCH might match is installed on the system." | 67 | "Return non-nil if the tool DIRMATCH might match is installed on the system." |
| 67 | (let ((fc (oref dirmatch fromconfig))) | 68 | (let ((fc (oref dirmatch fromconfig))) |
| 68 | 69 | ||
| @@ -77,7 +78,7 @@ into memory.") | |||
| 77 | (t (error "Unknown dirmatch type."))))) | 78 | (t (error "Unknown dirmatch type."))))) |
| 78 | 79 | ||
| 79 | 80 | ||
| 80 | (defmethod ede-do-dirmatch ((dirmatch ede-project-autoload-dirmatch) file) | 81 | (cl-defmethod ede-do-dirmatch ((dirmatch ede-project-autoload-dirmatch) file) |
| 81 | "Does DIRMATCH match the filename FILE." | 82 | "Does DIRMATCH match the filename FILE." |
| 82 | (let ((fc (oref dirmatch fromconfig))) | 83 | (let ((fc (oref dirmatch fromconfig))) |
| 83 | 84 | ||
| @@ -271,7 +272,7 @@ added. Possible values are: | |||
| 271 | ;; | 272 | ;; |
| 272 | 273 | ||
| 273 | ;; New method using detect.el | 274 | ;; New method using detect.el |
| 274 | (defmethod ede-auto-detect-in-dir ((this ede-project-autoload) dir) | 275 | (cl-defmethod ede-auto-detect-in-dir ((this ede-project-autoload) dir) |
| 275 | "Return non-nil if THIS project autoload is found in DIR." | 276 | "Return non-nil if THIS project autoload is found in DIR." |
| 276 | (let* ((d (file-name-as-directory dir)) | 277 | (let* ((d (file-name-as-directory dir)) |
| 277 | (pf (oref this proj-file)) | 278 | (pf (oref this proj-file)) |
| @@ -288,7 +289,7 @@ added. Possible values are: | |||
| 288 | ;(message "Dirmatch %S not installed." dirmatch) | 289 | ;(message "Dirmatch %S not installed." dirmatch) |
| 289 | ))))))) | 290 | ))))))) |
| 290 | 291 | ||
| 291 | (defmethod ede-auto-load-project ((this ede-project-autoload) dir) | 292 | (cl-defmethod ede-auto-load-project ((this ede-project-autoload) dir) |
| 292 | "Load in the project associated with THIS project autoload description. | 293 | "Load in the project associated with THIS project autoload description. |
| 293 | THIS project description should be valid for DIR, where the project will | 294 | THIS project description should be valid for DIR, where the project will |
| 294 | be loaded. | 295 | be loaded. |
| @@ -315,13 +316,13 @@ NOTE: Do not call this - it should only be called from `ede-load-project-file'." | |||
| 315 | ;; See if we can do without them. | 316 | ;; See if we can do without them. |
| 316 | 317 | ||
| 317 | ;; @FIXME - delete from loaddefs to remove this. | 318 | ;; @FIXME - delete from loaddefs to remove this. |
| 318 | (defmethod ede-project-root ((this ede-project-autoload)) | 319 | (cl-defmethod ede-project-root ((this ede-project-autoload)) |
| 319 | "If a project knows its root, return it here. | 320 | "If a project knows its root, return it here. |
| 320 | Allows for one-project-object-for-a-tree type systems." | 321 | Allows for one-project-object-for-a-tree type systems." |
| 321 | nil) | 322 | nil) |
| 322 | 323 | ||
| 323 | ;; @FIXME - delete from loaddefs to remove this. | 324 | ;; @FIXME - delete from loaddefs to remove this. |
| 324 | (defmethod ede-project-root-directory ((this ede-project-autoload) &optional file) | 325 | (cl-defmethod ede-project-root-directory ((this ede-project-autoload) &optional file) |
| 325 | "" nil) | 326 | "" nil) |
| 326 | 327 | ||
| 327 | (provide 'ede/auto) | 328 | (provide 'ede/auto) |
diff --git a/lisp/cedet/ede/base.el b/lisp/cedet/ede/base.el index ce7857b53a3..6d5e242de03 100644 --- a/lisp/cedet/ede/base.el +++ b/lisp/cedet/ede/base.el | |||
| @@ -27,6 +27,7 @@ | |||
| 27 | 27 | ||
| 28 | ;;; Code: | 28 | ;;; Code: |
| 29 | (require 'eieio) | 29 | (require 'eieio) |
| 30 | (require 'cl-generic) | ||
| 30 | (require 'eieio-speedbar) | 31 | (require 'eieio-speedbar) |
| 31 | (require 'ede/auto) | 32 | (require 'ede/auto) |
| 32 | 33 | ||
| @@ -402,7 +403,7 @@ If set to nil, then the cache is not saved." | |||
| 402 | ;; | 403 | ;; |
| 403 | ;; Mode related methods are in ede.el. These methods are related | 404 | ;; Mode related methods are in ede.el. These methods are related |
| 404 | ;; project specific activities not directly tied to a keybinding. | 405 | ;; project specific activities not directly tied to a keybinding. |
| 405 | (defmethod ede-subproject-relative-path ((proj ede-project) &optional parent-in) | 406 | (cl-defmethod ede-subproject-relative-path ((proj ede-project) &optional parent-in) |
| 406 | "Get a path name for PROJ which is relative to the parent project. | 407 | "Get a path name for PROJ which is relative to the parent project. |
| 407 | If PARENT is specified, then be relative to the PARENT project. | 408 | If PARENT is specified, then be relative to the PARENT project. |
| 408 | Specifying PARENT is useful for sub-sub projects relative to the root project." | 409 | 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." | |||
| 412 | (file-relative-name dir (file-name-directory (oref parent file))) | 413 | (file-relative-name dir (file-name-directory (oref parent file))) |
| 413 | ""))) | 414 | ""))) |
| 414 | 415 | ||
| 415 | (defmethod ede-subproject-p ((proj ede-project)) | 416 | (cl-defmethod ede-subproject-p ((proj ede-project)) |
| 416 | "Return non-nil if PROJ is a sub project." | 417 | "Return non-nil if PROJ is a sub project." |
| 417 | ;; @TODO - Use this in more places, and also pay attention to | 418 | ;; @TODO - Use this in more places, and also pay attention to |
| 418 | ;; metasubproject in ede/proj.el | 419 | ;; metasubproject in ede/proj.el |
| @@ -425,26 +426,26 @@ Specifying PARENT is useful for sub-sub projects relative to the root project." | |||
| 425 | ;; no need to in most situations because they are either a) simple, or | 426 | ;; no need to in most situations because they are either a) simple, or |
| 426 | ;; b) cosmetic. | 427 | ;; b) cosmetic. |
| 427 | 428 | ||
| 428 | (defmethod ede-name ((this ede-target)) | 429 | (cl-defmethod ede-name ((this ede-target)) |
| 429 | "Return the name of THIS target." | 430 | "Return the name of THIS target." |
| 430 | (oref this name)) | 431 | (oref this name)) |
| 431 | 432 | ||
| 432 | (defmethod ede-target-name ((this ede-target)) | 433 | (cl-defmethod ede-target-name ((this ede-target)) |
| 433 | "Return the name of THIS target, suitable for make or debug style commands." | 434 | "Return the name of THIS target, suitable for make or debug style commands." |
| 434 | (oref this name)) | 435 | (oref this name)) |
| 435 | 436 | ||
| 436 | (defmethod ede-name ((this ede-project)) | 437 | (cl-defmethod ede-name ((this ede-project)) |
| 437 | "Return a short-name for THIS project file. | 438 | "Return a short-name for THIS project file. |
| 438 | Do this by extracting the lowest directory name." | 439 | Do this by extracting the lowest directory name." |
| 439 | (oref this name)) | 440 | (oref this name)) |
| 440 | 441 | ||
| 441 | (defmethod ede-description ((this ede-project)) | 442 | (cl-defmethod ede-description ((this ede-project)) |
| 442 | "Return a description suitable for the minibuffer about THIS." | 443 | "Return a description suitable for the minibuffer about THIS." |
| 443 | (format "Project %s: %d subprojects, %d targets." | 444 | (format "Project %s: %d subprojects, %d targets." |
| 444 | (ede-name this) (length (oref this subproj)) | 445 | (ede-name this) (length (oref this subproj)) |
| 445 | (length (oref this targets)))) | 446 | (length (oref this targets)))) |
| 446 | 447 | ||
| 447 | (defmethod ede-description ((this ede-target)) | 448 | (cl-defmethod ede-description ((this ede-target)) |
| 448 | "Return a description suitable for the minibuffer about THIS." | 449 | "Return a description suitable for the minibuffer about THIS." |
| 449 | (format "Target %s: with %d source files." | 450 | (format "Target %s: with %d source files." |
| 450 | (ede-name this) (length (oref this source)))) | 451 | (ede-name this) (length (oref this source)))) |
| @@ -463,11 +464,11 @@ Not all buffers need headers, so return nil if no applicable." | |||
| 463 | (ede-buffer-header-file ede-object (current-buffer)) | 464 | (ede-buffer-header-file ede-object (current-buffer)) |
| 464 | nil)) | 465 | nil)) |
| 465 | 466 | ||
| 466 | (defmethod ede-buffer-header-file ((this ede-project) buffer) | 467 | (cl-defmethod ede-buffer-header-file ((this ede-project) buffer) |
| 467 | "Return nil, projects don't have header files." | 468 | "Return nil, projects don't have header files." |
| 468 | nil) | 469 | nil) |
| 469 | 470 | ||
| 470 | (defmethod ede-buffer-header-file ((this ede-target) buffer) | 471 | (cl-defmethod ede-buffer-header-file ((this ede-target) buffer) |
| 471 | "There are no default header files in EDE. | 472 | "There are no default header files in EDE. |
| 472 | Do a quick check to see if there is a Header tag in this buffer." | 473 | Do a quick check to see if there is a Header tag in this buffer." |
| 473 | (with-current-buffer buffer | 474 | (with-current-buffer buffer |
| @@ -489,12 +490,12 @@ Some projects may have multiple documentation files, so return a list." | |||
| 489 | (ede-buffer-documentation-files ede-object (current-buffer)) | 490 | (ede-buffer-documentation-files ede-object (current-buffer)) |
| 490 | nil)) | 491 | nil)) |
| 491 | 492 | ||
| 492 | (defmethod ede-buffer-documentation-files ((this ede-project) buffer) | 493 | (cl-defmethod ede-buffer-documentation-files ((this ede-project) buffer) |
| 493 | "Return all documentation in project THIS based on BUFFER." | 494 | "Return all documentation in project THIS based on BUFFER." |
| 494 | ;; Find the info node. | 495 | ;; Find the info node. |
| 495 | (ede-documentation this)) | 496 | (ede-documentation this)) |
| 496 | 497 | ||
| 497 | (defmethod ede-buffer-documentation-files ((this ede-target) buffer) | 498 | (cl-defmethod ede-buffer-documentation-files ((this ede-target) buffer) |
| 498 | "Check for some documentation files for THIS. | 499 | "Check for some documentation files for THIS. |
| 499 | Also do a quick check to see if there is a Documentation tag in this BUFFER." | 500 | Also do a quick check to see if there is a Documentation tag in this BUFFER." |
| 500 | (with-current-buffer buffer | 501 | (with-current-buffer buffer |
| @@ -505,7 +506,7 @@ Also do a quick check to see if there is a Documentation tag in this BUFFER." | |||
| 505 | (let ((cp (ede-toplevel))) | 506 | (let ((cp (ede-toplevel))) |
| 506 | (ede-buffer-documentation-files cp (current-buffer)))))) | 507 | (ede-buffer-documentation-files cp (current-buffer)))))) |
| 507 | 508 | ||
| 508 | (defmethod ede-documentation ((this ede-project)) | 509 | (cl-defmethod ede-documentation ((this ede-project)) |
| 509 | "Return a list of files that provide documentation. | 510 | "Return a list of files that provide documentation. |
| 510 | Documentation is not for object THIS, but is provided by THIS for other | 511 | Documentation is not for object THIS, but is provided by THIS for other |
| 511 | files in the project." | 512 | files in the project." |
| @@ -520,7 +521,7 @@ files in the project." | |||
| 520 | proj (cdr proj))) | 521 | proj (cdr proj))) |
| 521 | found)) | 522 | found)) |
| 522 | 523 | ||
| 523 | (defmethod ede-documentation ((this ede-target)) | 524 | (cl-defmethod ede-documentation ((this ede-target)) |
| 524 | "Return a list of files that provide documentation. | 525 | "Return a list of files that provide documentation. |
| 525 | Documentation is not for object THIS, but is provided by THIS for other | 526 | Documentation is not for object THIS, but is provided by THIS for other |
| 526 | files in the project." | 527 | files in the project." |
| @@ -531,7 +532,7 @@ files in the project." | |||
| 531 | (ede-html-documentation (ede-toplevel)) | 532 | (ede-html-documentation (ede-toplevel)) |
| 532 | ) | 533 | ) |
| 533 | 534 | ||
| 534 | (defmethod ede-html-documentation ((this ede-project)) | 535 | (cl-defmethod ede-html-documentation ((this ede-project)) |
| 535 | "Return a list of HTML files provided by project THIS." | 536 | "Return a list of HTML files provided by project THIS." |
| 536 | 537 | ||
| 537 | ) | 538 | ) |
| @@ -541,7 +542,7 @@ files in the project." | |||
| 541 | ;; These methods are used to determine if a target "wants", or could | 542 | ;; These methods are used to determine if a target "wants", or could |
| 542 | ;; somehow handle a file, or some source type. | 543 | ;; somehow handle a file, or some source type. |
| 543 | ;; | 544 | ;; |
| 544 | (defmethod ede-want-file-p ((this ede-target) file) | 545 | (cl-defmethod ede-want-file-p ((this ede-target) file) |
| 545 | "Return non-nil if THIS target wants FILE." | 546 | "Return non-nil if THIS target wants FILE." |
| 546 | ;; By default, all targets reference the source object, and let it decide. | 547 | ;; By default, all targets reference the source object, and let it decide. |
| 547 | (let ((src (ede-target-sourcecode this))) | 548 | (let ((src (ede-target-sourcecode this))) |
| @@ -549,7 +550,7 @@ files in the project." | |||
| 549 | (setq src (cdr src))) | 550 | (setq src (cdr src))) |
| 550 | src)) | 551 | src)) |
| 551 | 552 | ||
| 552 | (defmethod ede-want-file-source-p ((this ede-target) file) | 553 | (cl-defmethod ede-want-file-source-p ((this ede-target) file) |
| 553 | "Return non-nil if THIS target wants FILE." | 554 | "Return non-nil if THIS target wants FILE." |
| 554 | ;; By default, all targets reference the source object, and let it decide. | 555 | ;; By default, all targets reference the source object, and let it decide. |
| 555 | (let ((src (ede-target-sourcecode this))) | 556 | (let ((src (ede-target-sourcecode this))) |
| @@ -557,7 +558,7 @@ files in the project." | |||
| 557 | (setq src (cdr src))) | 558 | (setq src (cdr src))) |
| 558 | src)) | 559 | src)) |
| 559 | 560 | ||
| 560 | (defmethod ede-target-sourcecode ((this ede-target)) | 561 | (cl-defmethod ede-target-sourcecode ((this ede-target)) |
| 561 | "Return the sourcecode objects which THIS permits." | 562 | "Return the sourcecode objects which THIS permits." |
| 562 | (let ((sc (oref this sourcetype)) | 563 | (let ((sc (oref this sourcetype)) |
| 563 | (rs nil)) | 564 | (rs nil)) |
diff --git a/lisp/cedet/ede/config.el b/lisp/cedet/ede/config.el index e479af05595..f91a6c1751c 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.") | |||
| 113 | 113 | ||
| 114 | ;;; Rescanning | 114 | ;;; Rescanning |
| 115 | 115 | ||
| 116 | (defmethod project-rescan ((this ede-project-with-config)) | 116 | (cl-defmethod project-rescan ((this ede-project-with-config)) |
| 117 | "Rescan this generic project from the sources." | 117 | "Rescan this generic project from the sources." |
| 118 | ;; Force the config to be rescanned. | 118 | ;; Force the config to be rescanned. |
| 119 | (oset this config nil) | 119 | (oset this config nil) |
| @@ -123,7 +123,7 @@ initialize the :file slot of the persistent baseclass.") | |||
| 123 | 123 | ||
| 124 | ;;; Project Methods for configuration | 124 | ;;; Project Methods for configuration |
| 125 | 125 | ||
| 126 | (defmethod ede-config-get-configuration ((proj ede-project-with-config) &optional loadask) | 126 | (cl-defmethod ede-config-get-configuration ((proj ede-project-with-config) &optional loadask) |
| 127 | "Return the configuration for the project PROJ. | 127 | "Return the configuration for the project PROJ. |
| 128 | If optional LOADASK is non-nil, then if a project file exists, and if | 128 | If optional LOADASK is non-nil, then if a project file exists, and if |
| 129 | the directory isn't on the `safe' list, ask to add it to the safe list." | 129 | 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." | |||
| 170 | (oset config project proj))) | 170 | (oset config project proj))) |
| 171 | config)) | 171 | config)) |
| 172 | 172 | ||
| 173 | (defmethod ede-config-setup-configuration ((proj ede-project-with-config) config) | 173 | (cl-defmethod ede-config-setup-configuration ((proj ede-project-with-config) config) |
| 174 | "Default configuration setup method." | 174 | "Default configuration setup method." |
| 175 | nil) | 175 | nil) |
| 176 | 176 | ||
| 177 | (defmethod ede-commit-project ((proj ede-project-with-config)) | 177 | (cl-defmethod ede-commit-project ((proj ede-project-with-config)) |
| 178 | "Commit any change to PROJ to its file." | 178 | "Commit any change to PROJ to its file." |
| 179 | (let ((config (ede-config-get-configuration proj))) | 179 | (let ((config (ede-config-get-configuration proj))) |
| 180 | (ede-commit config))) | 180 | (ede-commit config))) |
| 181 | 181 | ||
| 182 | ;;; Customization | 182 | ;;; Customization |
| 183 | ;; | 183 | ;; |
| 184 | (defmethod ede-customize ((proj ede-project-with-config)) | 184 | (cl-defmethod ede-customize ((proj ede-project-with-config)) |
| 185 | "Customize the EDE project PROJ by actually configuring the config object." | 185 | "Customize the EDE project PROJ by actually configuring the config object." |
| 186 | (let ((config (ede-config-get-configuration proj t))) | 186 | (let ((config (ede-config-get-configuration proj t))) |
| 187 | (eieio-customize-object config))) | 187 | (eieio-customize-object config))) |
| 188 | 188 | ||
| 189 | (defmethod ede-customize ((target ede-target-with-config)) | 189 | (cl-defmethod ede-customize ((target ede-target-with-config)) |
| 190 | "Customize the EDE TARGET by actually configuring the config object." | 190 | "Customize the EDE TARGET by actually configuring the config object." |
| 191 | ;; Nothing unique for the targets, use the project. | 191 | ;; Nothing unique for the targets, use the project. |
| 192 | (ede-customize-project)) | 192 | (ede-customize-project)) |
| 193 | 193 | ||
| 194 | (defmethod eieio-done-customizing ((config ede-extra-config)) | 194 | (cl-defmethod eieio-done-customizing ((config ede-extra-config)) |
| 195 | "Called when EIEIO is done customizing the configuration object. | 195 | "Called when EIEIO is done customizing the configuration object. |
| 196 | We need to go back through the old buffers, and update them with | 196 | We need to go back through the old buffers, and update them with |
| 197 | the new configuration." | 197 | the new configuration." |
| @@ -206,7 +206,7 @@ the new configuration." | |||
| 206 | (with-current-buffer b | 206 | (with-current-buffer b |
| 207 | (ede-apply-target-options))))))) | 207 | (ede-apply-target-options))))))) |
| 208 | 208 | ||
| 209 | (defmethod ede-commit ((config ede-extra-config)) | 209 | (cl-defmethod ede-commit ((config ede-extra-config)) |
| 210 | "Commit all changes to the configuration to disk." | 210 | "Commit all changes to the configuration to disk." |
| 211 | ;; So long as the user is trying to safe this config, make sure they can | 211 | ;; So long as the user is trying to safe this config, make sure they can |
| 212 | ;; get at it again later. | 212 | ;; get at it again later. |
| @@ -253,7 +253,7 @@ the new configuration." | |||
| 253 | This class brings in method overloads for running and debugging | 253 | This class brings in method overloads for running and debugging |
| 254 | programs from a project.") | 254 | programs from a project.") |
| 255 | 255 | ||
| 256 | (defmethod project-debug-target ((target ede-target-with-config-program)) | 256 | (cl-defmethod project-debug-target ((target ede-target-with-config-program)) |
| 257 | "Run the current project derived from TARGET in a debugger." | 257 | "Run the current project derived from TARGET in a debugger." |
| 258 | (let* ((proj (ede-target-parent target)) | 258 | (let* ((proj (ede-target-parent target)) |
| 259 | (config (ede-config-get-configuration proj t)) | 259 | (config (ede-config-get-configuration proj t)) |
| @@ -268,7 +268,7 @@ programs from a project.") | |||
| 268 | (cmdsym (intern-soft (car cmdsplit)))) | 268 | (cmdsym (intern-soft (car cmdsplit)))) |
| 269 | (call-interactively cmdsym t))) | 269 | (call-interactively cmdsym t))) |
| 270 | 270 | ||
| 271 | (defmethod project-run-target ((target ede-target-with-config-program)) | 271 | (cl-defmethod project-run-target ((target ede-target-with-config-program)) |
| 272 | "Run the current project derived from TARGET." | 272 | "Run the current project derived from TARGET." |
| 273 | (let* ((proj (ede-target-parent target)) | 273 | (let* ((proj (ede-target-parent target)) |
| 274 | (config (ede-config-get-configuration proj t)) | 274 | (config (ede-config-get-configuration proj t)) |
| @@ -299,14 +299,14 @@ This class brings in method overloads for building.") | |||
| 299 | "Class to mix into a project with configuration for builds. | 299 | "Class to mix into a project with configuration for builds. |
| 300 | This class brings in method overloads for for building.") | 300 | This class brings in method overloads for for building.") |
| 301 | 301 | ||
| 302 | (defmethod project-compile-project ((proj ede-project-with-config-build) &optional command) | 302 | (cl-defmethod project-compile-project ((proj ede-project-with-config-build) &optional command) |
| 303 | "Compile the entire current project PROJ. | 303 | "Compile the entire current project PROJ. |
| 304 | Argument COMMAND is the command to use when compiling." | 304 | Argument COMMAND is the command to use when compiling." |
| 305 | (let* ((config (ede-config-get-configuration proj t)) | 305 | (let* ((config (ede-config-get-configuration proj t)) |
| 306 | (comp (oref config :build-command))) | 306 | (comp (oref config :build-command))) |
| 307 | (compile comp))) | 307 | (compile comp))) |
| 308 | 308 | ||
| 309 | (defmethod project-compile-target ((obj ede-target-with-config-build) &optional command) | 309 | (cl-defmethod project-compile-target ((obj ede-target-with-config-build) &optional command) |
| 310 | "Compile the current target OBJ. | 310 | "Compile the current target OBJ. |
| 311 | Argument COMMAND is the command to use for compiling the target." | 311 | Argument COMMAND is the command to use for compiling the target." |
| 312 | (project-compile-project (ede-current-project) command)) | 312 | (project-compile-project (ede-current-project) command)) |
| @@ -358,7 +358,7 @@ parsed again.")) | |||
| 358 | This target brings in methods used by Semantic to query | 358 | This target brings in methods used by Semantic to query |
| 359 | the preprocessor map, and include paths.") | 359 | the preprocessor map, and include paths.") |
| 360 | 360 | ||
| 361 | (defmethod ede-preprocessor-map ((this ede-target-with-config-c)) | 361 | (cl-defmethod ede-preprocessor-map ((this ede-target-with-config-c)) |
| 362 | "Get the pre-processor map for some generic C code." | 362 | "Get the pre-processor map for some generic C code." |
| 363 | (let* ((proj (ede-target-parent this)) | 363 | (let* ((proj (ede-target-parent this)) |
| 364 | (root (ede-project-root proj)) | 364 | (root (ede-project-root proj)) |
| @@ -380,7 +380,7 @@ the preprocessor map, and include paths.") | |||
| 380 | filemap | 380 | filemap |
| 381 | )) | 381 | )) |
| 382 | 382 | ||
| 383 | (defmethod ede-system-include-path ((this ede-target-with-config-c)) | 383 | (cl-defmethod ede-system-include-path ((this ede-target-with-config-c)) |
| 384 | "Get the system include path used by project THIS." | 384 | "Get the system include path used by project THIS." |
| 385 | (let* ((proj (ede-target-parent this)) | 385 | (let* ((proj (ede-target-parent this)) |
| 386 | (config (ede-config-get-configuration proj))) | 386 | (config (ede-config-get-configuration proj))) |
| @@ -402,7 +402,7 @@ java class path.") | |||
| 402 | () | 402 | () |
| 403 | "Class to mix into a project to support java.") | 403 | "Class to mix into a project to support java.") |
| 404 | 404 | ||
| 405 | (defmethod ede-java-classpath ((proj ede-project-with-config-java)) | 405 | (cl-defmethod ede-java-classpath ((proj ede-project-with-config-java)) |
| 406 | "Return the classpath for this project." | 406 | "Return the classpath for this project." |
| 407 | (oref (ede-config-get-configuration proj) :classpath)) | 407 | (oref (ede-config-get-configuration proj) :classpath)) |
| 408 | 408 | ||
diff --git a/lisp/cedet/ede/cpp-root.el b/lisp/cedet/ede/cpp-root.el index e32066af89b..81c6737531a 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.") | |||
| 276 | ;; find previous copies of this project, and make sure that one of the | 276 | ;; find previous copies of this project, and make sure that one of the |
| 277 | ;; objects is deleted. | 277 | ;; objects is deleted. |
| 278 | 278 | ||
| 279 | (defmethod initialize-instance ((this ede-cpp-root-project) | 279 | (cl-defmethod initialize-instance ((this ede-cpp-root-project) |
| 280 | &rest fields) | 280 | &rest fields) |
| 281 | "Make sure the :file is fully expanded." | 281 | "Make sure the :file is fully expanded." |
| 282 | ;; Add ourselves to the master list | 282 | ;; Add ourselves to the master list |
| 283 | (call-next-method) | 283 | (cl-call-next-method) |
| 284 | (let ((f (expand-file-name (oref this :file)))) | 284 | (let ((f (expand-file-name (oref this :file)))) |
| 285 | ;; Remove any previous entries from the main list. | 285 | ;; Remove any previous entries from the main list. |
| 286 | (let ((old (eieio-instance-tracker-find (file-name-directory f) | 286 | (let ((old (eieio-instance-tracker-find (file-name-directory f) |
| @@ -311,7 +311,7 @@ Each directory needs a project file to control it.") | |||
| 311 | ;; This is a way to allow a subdirectory to point back to the root | 311 | ;; This is a way to allow a subdirectory to point back to the root |
| 312 | ;; project, simplifying authoring new single-point projects. | 312 | ;; project, simplifying authoring new single-point projects. |
| 313 | 313 | ||
| 314 | (defmethod ede-find-subproject-for-directory ((proj ede-cpp-root-project) | 314 | (cl-defmethod ede-find-subproject-for-directory ((proj ede-cpp-root-project) |
| 315 | dir) | 315 | dir) |
| 316 | "Return PROJ, for handling all subdirs below DIR." | 316 | "Return PROJ, for handling all subdirs below DIR." |
| 317 | proj) | 317 | proj) |
| @@ -321,7 +321,7 @@ Each directory needs a project file to control it.") | |||
| 321 | ;; Creating new targets on a per directory basis is a good way to keep | 321 | ;; Creating new targets on a per directory basis is a good way to keep |
| 322 | ;; files organized. See ede-emacs for an example with multiple file | 322 | ;; files organized. See ede-emacs for an example with multiple file |
| 323 | ;; types. | 323 | ;; types. |
| 324 | (defmethod ede-find-target ((proj ede-cpp-root-project) buffer) | 324 | (cl-defmethod ede-find-target ((proj ede-cpp-root-project) buffer) |
| 325 | "Find an EDE target in PROJ for BUFFER. | 325 | "Find an EDE target in PROJ for BUFFER. |
| 326 | If one doesn't exist, create a new one for this directory." | 326 | If one doesn't exist, create a new one for this directory." |
| 327 | (let* ((targets (oref proj targets)) | 327 | (let* ((targets (oref proj targets)) |
| @@ -347,13 +347,13 @@ If one doesn't exist, create a new one for this directory." | |||
| 347 | ;; | 347 | ;; |
| 348 | ;; This tools also uses the ede-locate setup for augmented file name | 348 | ;; This tools also uses the ede-locate setup for augmented file name |
| 349 | ;; lookup using external tools. | 349 | ;; lookup using external tools. |
| 350 | (defmethod ede-expand-filename-impl ((proj ede-cpp-root-project) name) | 350 | (cl-defmethod ede-expand-filename-impl ((proj ede-cpp-root-project) name) |
| 351 | "Within this project PROJ, find the file NAME. | 351 | "Within this project PROJ, find the file NAME. |
| 352 | This knows details about or source tree." | 352 | This knows details about or source tree." |
| 353 | ;; The slow part of the original is looping over subprojects. | 353 | ;; The slow part of the original is looping over subprojects. |
| 354 | ;; This version has no subprojects, so this will handle some | 354 | ;; This version has no subprojects, so this will handle some |
| 355 | ;; basic cases. | 355 | ;; basic cases. |
| 356 | (let ((ans (call-next-method))) | 356 | (let ((ans (cl-call-next-method))) |
| 357 | (unless ans | 357 | (unless ans |
| 358 | (let* ((lf (oref proj locate-fcn)) | 358 | (let* ((lf (oref proj locate-fcn)) |
| 359 | (dir (file-name-directory (oref proj file)))) | 359 | (dir (file-name-directory (oref proj file)))) |
| @@ -372,16 +372,16 @@ This knows details about or source tree." | |||
| 372 | (setq ans tmp)) | 372 | (setq ans tmp)) |
| 373 | (setq ip (cdr ip)) )) | 373 | (setq ip (cdr ip)) )) |
| 374 | ;; Else, do the usual. | 374 | ;; Else, do the usual. |
| 375 | (setq ans (call-next-method))) | 375 | (setq ans (cl-call-next-method))) |
| 376 | ))) | 376 | ))) |
| 377 | ;; TODO - does this call-next-method happen twice. Is that bad?? Why is it here? | 377 | ;; TODO - does this call-next-method happen twice. Is that bad?? Why is it here? |
| 378 | (or ans (call-next-method)))) | 378 | (or ans (cl-call-next-method)))) |
| 379 | 379 | ||
| 380 | (defmethod ede-project-root ((this ede-cpp-root-project)) | 380 | (cl-defmethod ede-project-root ((this ede-cpp-root-project)) |
| 381 | "Return my root." | 381 | "Return my root." |
| 382 | this) | 382 | this) |
| 383 | 383 | ||
| 384 | (defmethod ede-project-root-directory ((this ede-cpp-root-project)) | 384 | (cl-defmethod ede-project-root-directory ((this ede-cpp-root-project)) |
| 385 | "Return my root." | 385 | "Return my root." |
| 386 | (oref this directory)) | 386 | (oref this directory)) |
| 387 | 387 | ||
| @@ -390,12 +390,12 @@ This knows details about or source tree." | |||
| 390 | ;; The following code is specific to setting up header files, | 390 | ;; The following code is specific to setting up header files, |
| 391 | ;; include lists, and Preprocessor symbol tables. | 391 | ;; include lists, and Preprocessor symbol tables. |
| 392 | 392 | ||
| 393 | (defmethod ede-cpp-root-header-file-p ((proj ede-cpp-root-project) name) | 393 | (cl-defmethod ede-cpp-root-header-file-p ((proj ede-cpp-root-project) name) |
| 394 | "Non nil if in PROJ the filename NAME is a header." | 394 | "Non nil if in PROJ the filename NAME is a header." |
| 395 | (save-match-data | 395 | (save-match-data |
| 396 | (string-match (oref proj header-match-regexp) name))) | 396 | (string-match (oref proj header-match-regexp) name))) |
| 397 | 397 | ||
| 398 | (defmethod ede-cpp-root-translate-file ((proj ede-cpp-root-project) filename) | 398 | (cl-defmethod ede-cpp-root-translate-file ((proj ede-cpp-root-project) filename) |
| 399 | "For PROJ, translate a user specified FILENAME. | 399 | "For PROJ, translate a user specified FILENAME. |
| 400 | This is for project include paths and spp source files." | 400 | This is for project include paths and spp source files." |
| 401 | ;; Step one: Root of this project. | 401 | ;; Step one: Root of this project. |
| @@ -411,11 +411,11 @@ This is for project include paths and spp source files." | |||
| 411 | 411 | ||
| 412 | filename)) | 412 | filename)) |
| 413 | 413 | ||
| 414 | (defmethod ede-system-include-path ((this ede-cpp-root-project)) | 414 | (cl-defmethod ede-system-include-path ((this ede-cpp-root-project)) |
| 415 | "Get the system include path used by project THIS." | 415 | "Get the system include path used by project THIS." |
| 416 | (oref this system-include-path)) | 416 | (oref this system-include-path)) |
| 417 | 417 | ||
| 418 | (defmethod ede-preprocessor-map ((this ede-cpp-root-project)) | 418 | (cl-defmethod ede-preprocessor-map ((this ede-cpp-root-project)) |
| 419 | "Get the pre-processor map for project THIS." | 419 | "Get the pre-processor map for project THIS." |
| 420 | (require 'semantic/db) | 420 | (require 'semantic/db) |
| 421 | (let ((spp (oref this spp-table)) | 421 | (let ((spp (oref this spp-table)) |
| @@ -445,15 +445,15 @@ This is for project include paths and spp source files." | |||
| 445 | (oref this spp-files)) | 445 | (oref this spp-files)) |
| 446 | spp)) | 446 | spp)) |
| 447 | 447 | ||
| 448 | (defmethod ede-system-include-path ((this ede-cpp-root-target)) | 448 | (cl-defmethod ede-system-include-path ((this ede-cpp-root-target)) |
| 449 | "Get the system include path used by target THIS." | 449 | "Get the system include path used by target THIS." |
| 450 | (ede-system-include-path (ede-target-parent this))) | 450 | (ede-system-include-path (ede-target-parent this))) |
| 451 | 451 | ||
| 452 | (defmethod ede-preprocessor-map ((this ede-cpp-root-target)) | 452 | (cl-defmethod ede-preprocessor-map ((this ede-cpp-root-target)) |
| 453 | "Get the pre-processor map for project THIS." | 453 | "Get the pre-processor map for project THIS." |
| 454 | (ede-preprocessor-map (ede-target-parent this))) | 454 | (ede-preprocessor-map (ede-target-parent this))) |
| 455 | 455 | ||
| 456 | (defmethod project-compile-project ((proj ede-cpp-root-project) &optional command) | 456 | (cl-defmethod project-compile-project ((proj ede-cpp-root-project) &optional command) |
| 457 | "Compile the entire current project PROJ. | 457 | "Compile the entire current project PROJ. |
| 458 | Argument COMMAND is the command to use when compiling." | 458 | Argument COMMAND is the command to use when compiling." |
| 459 | ;; we need to be in the proj root dir for this to work | 459 | ;; 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." | |||
| 469 | (let ((default-directory (ede-project-root-directory proj))) | 469 | (let ((default-directory (ede-project-root-directory proj))) |
| 470 | (compile cmd-str))))) | 470 | (compile cmd-str))))) |
| 471 | 471 | ||
| 472 | (defmethod project-compile-target ((obj ede-cpp-root-target) &optional command) | 472 | (cl-defmethod project-compile-target ((obj ede-cpp-root-target) &optional command) |
| 473 | "Compile the current target OBJ. | 473 | "Compile the current target OBJ. |
| 474 | Argument COMMAND is the command to use for compiling the target." | 474 | Argument COMMAND is the command to use for compiling the target." |
| 475 | (when (oref obj :project) | 475 | (when (oref obj :project) |
| 476 | (project-compile-project (oref obj :project) command))) | 476 | (project-compile-project (oref obj :project) command))) |
| 477 | 477 | ||
| 478 | 478 | ||
| 479 | (defmethod project-rescan ((this ede-cpp-root-project)) | 479 | (cl-defmethod project-rescan ((this ede-cpp-root-project)) |
| 480 | "Don't rescan this project from the sources." | 480 | "Don't rescan this project from the sources." |
| 481 | (message "cpp-root has nothing to rescan.")) | 481 | (message "cpp-root has nothing to rescan.")) |
| 482 | 482 | ||
diff --git a/lisp/cedet/ede/custom.el b/lisp/cedet/ede/custom.el index a39b4880283..5b8783fd273 100644 --- a/lisp/cedet/ede/custom.el +++ b/lisp/cedet/ede/custom.el | |||
| @@ -76,11 +76,11 @@ OBJ is the target object to customize." | |||
| 76 | (error "No logical target to customize")) | 76 | (error "No logical target to customize")) |
| 77 | (ede-customize obj)) | 77 | (ede-customize obj)) |
| 78 | 78 | ||
| 79 | (defmethod ede-customize ((proj ede-project)) | 79 | (cl-defmethod ede-customize ((proj ede-project)) |
| 80 | "Customize the EDE project PROJ." | 80 | "Customize the EDE project PROJ." |
| 81 | (eieio-customize-object proj 'default)) | 81 | (eieio-customize-object proj 'default)) |
| 82 | 82 | ||
| 83 | (defmethod ede-customize ((target ede-target)) | 83 | (cl-defmethod ede-customize ((target ede-target)) |
| 84 | "Customize the EDE TARGET." | 84 | "Customize the EDE TARGET." |
| 85 | (eieio-customize-object target 'default)) | 85 | (eieio-customize-object target 'default)) |
| 86 | 86 | ||
| @@ -177,7 +177,7 @@ OBJ is the target object to customize." | |||
| 177 | ;;; Customization hooks | 177 | ;;; Customization hooks |
| 178 | ;; | 178 | ;; |
| 179 | ;; These hooks are used when finishing up a customization. | 179 | ;; These hooks are used when finishing up a customization. |
| 180 | (defmethod eieio-done-customizing ((proj ede-project)) | 180 | (cl-defmethod eieio-done-customizing ((proj ede-project)) |
| 181 | "Call this when a user finishes customizing PROJ." | 181 | "Call this when a user finishes customizing PROJ." |
| 182 | (let ((ov eieio-ede-old-variables) | 182 | (let ((ov eieio-ede-old-variables) |
| 183 | (nv (oref proj local-variables))) | 183 | (nv (oref proj local-variables))) |
| @@ -196,11 +196,11 @@ OBJ is the target object to customize." | |||
| 196 | ;; These two methods should be implemented by subclasses of | 196 | ;; These two methods should be implemented by subclasses of |
| 197 | ;; project and targets in order to account for user specified | 197 | ;; project and targets in order to account for user specified |
| 198 | ;; changes. | 198 | ;; changes. |
| 199 | (defmethod eieio-done-customizing ((target ede-target)) | 199 | (cl-defmethod eieio-done-customizing ((target ede-target)) |
| 200 | "Call this when a user finishes customizing TARGET." | 200 | "Call this when a user finishes customizing TARGET." |
| 201 | nil) | 201 | nil) |
| 202 | 202 | ||
| 203 | (defmethod ede-commit-project ((proj ede-project)) | 203 | (cl-defmethod ede-commit-project ((proj ede-project)) |
| 204 | "Commit any change to PROJ to its file." | 204 | "Commit any change to PROJ to its file." |
| 205 | nil | 205 | nil |
| 206 | ) | 206 | ) |
diff --git a/lisp/cedet/ede/emacs.el b/lisp/cedet/ede/emacs.el index 621e8951dd7..ca58810cdd6 100644 --- a/lisp/cedet/ede/emacs.el +++ b/lisp/cedet/ede/emacs.el | |||
| @@ -141,25 +141,25 @@ All directories need at least one target.") | |||
| 141 | "EDE Emacs Project target for Misc files. | 141 | "EDE Emacs Project target for Misc files. |
| 142 | All directories need at least one target.") | 142 | All directories need at least one target.") |
| 143 | 143 | ||
| 144 | (defmethod initialize-instance ((this ede-emacs-project) | 144 | (cl-defmethod initialize-instance ((this ede-emacs-project) |
| 145 | &rest fields) | 145 | &rest fields) |
| 146 | "Make sure the targets slot is bound." | 146 | "Make sure the targets slot is bound." |
| 147 | (call-next-method) | 147 | (cl-call-next-method) |
| 148 | (unless (slot-boundp this 'targets) | 148 | (unless (slot-boundp this 'targets) |
| 149 | (oset this :targets nil))) | 149 | (oset this :targets nil))) |
| 150 | 150 | ||
| 151 | ;;; File Stuff | 151 | ;;; File Stuff |
| 152 | ;; | 152 | ;; |
| 153 | (defmethod ede-project-root-directory ((this ede-emacs-project) | 153 | (cl-defmethod ede-project-root-directory ((this ede-emacs-project) |
| 154 | &optional file) | 154 | &optional file) |
| 155 | "Return the root for THIS Emacs project with file." | 155 | "Return the root for THIS Emacs project with file." |
| 156 | (ede-up-directory (file-name-directory (oref this file)))) | 156 | (ede-up-directory (file-name-directory (oref this file)))) |
| 157 | 157 | ||
| 158 | (defmethod ede-project-root ((this ede-emacs-project)) | 158 | (cl-defmethod ede-project-root ((this ede-emacs-project)) |
| 159 | "Return my root." | 159 | "Return my root." |
| 160 | this) | 160 | this) |
| 161 | 161 | ||
| 162 | (defmethod ede-find-subproject-for-directory ((proj ede-emacs-project) | 162 | (cl-defmethod ede-find-subproject-for-directory ((proj ede-emacs-project) |
| 163 | dir) | 163 | dir) |
| 164 | "Return PROJ, for handling all subdirs below DIR." | 164 | "Return PROJ, for handling all subdirs below DIR." |
| 165 | proj) | 165 | proj) |
| @@ -176,7 +176,7 @@ All directories need at least one target.") | |||
| 176 | )) | 176 | )) |
| 177 | match)) | 177 | match)) |
| 178 | 178 | ||
| 179 | (defmethod ede-find-target ((proj ede-emacs-project) buffer) | 179 | (cl-defmethod ede-find-target ((proj ede-emacs-project) buffer) |
| 180 | "Find an EDE target in PROJ for BUFFER. | 180 | "Find an EDE target in PROJ for BUFFER. |
| 181 | If one doesn't exist, create a new one for this directory." | 181 | If one doesn't exist, create a new one for this directory." |
| 182 | (let* ((ext (file-name-extension (buffer-file-name buffer))) | 182 | (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." | |||
| 204 | 204 | ||
| 205 | ;;; UTILITIES SUPPORT. | 205 | ;;; UTILITIES SUPPORT. |
| 206 | ;; | 206 | ;; |
| 207 | (defmethod ede-preprocessor-map ((this ede-emacs-target-c)) | 207 | (cl-defmethod ede-preprocessor-map ((this ede-emacs-target-c)) |
| 208 | "Get the pre-processor map for Emacs C code. | 208 | "Get the pre-processor map for Emacs C code. |
| 209 | All files need the macros from lisp.h!" | 209 | All files need the macros from lisp.h!" |
| 210 | (require 'semantic/db) | 210 | (require 'semantic/db) |
| @@ -253,7 +253,7 @@ All files need the macros from lisp.h!" | |||
| 253 | (setq dirs (cdr dirs)))) | 253 | (setq dirs (cdr dirs)))) |
| 254 | ans)) | 254 | ans)) |
| 255 | 255 | ||
| 256 | (defmethod ede-expand-filename-impl ((proj ede-emacs-project) name) | 256 | (cl-defmethod ede-expand-filename-impl ((proj ede-emacs-project) name) |
| 257 | "Within this project PROJ, find the file NAME. | 257 | "Within this project PROJ, find the file NAME. |
| 258 | Knows about how the Emacs source tree is organized." | 258 | Knows about how the Emacs source tree is organized." |
| 259 | (let* ((ext (file-name-extension name)) | 259 | (let* ((ext (file-name-extension name)) |
| @@ -269,13 +269,13 @@ Knows about how the Emacs source tree is organized." | |||
| 269 | '("doc")) | 269 | '("doc")) |
| 270 | (t nil))) | 270 | (t nil))) |
| 271 | ) | 271 | ) |
| 272 | (if (not dirs) (call-next-method) | 272 | (if (not dirs) (cl-call-next-method) |
| 273 | (ede-emacs-find-in-directories name dir dirs)) | 273 | (ede-emacs-find-in-directories name dir dirs)) |
| 274 | )) | 274 | )) |
| 275 | 275 | ||
| 276 | ;;; Command Support | 276 | ;;; Command Support |
| 277 | ;; | 277 | ;; |
| 278 | (defmethod project-rescan ((this ede-emacs-project)) | 278 | (cl-defmethod project-rescan ((this ede-emacs-project)) |
| 279 | "Rescan this Emacs project from the sources." | 279 | "Rescan this Emacs project from the sources." |
| 280 | (let ((ver (ede-emacs-version (ede-project-root-directory this)))) | 280 | (let ((ver (ede-emacs-version (ede-project-root-directory this)))) |
| 281 | (oset this name (car ver)) | 281 | (oset this name (car ver)) |
diff --git a/lisp/cedet/ede/files.el b/lisp/cedet/ede/files.el index a3febfa4e5d..1922337feb0 100644 --- a/lisp/cedet/ede/files.el +++ b/lisp/cedet/ede/files.el | |||
| @@ -69,12 +69,12 @@ the current EDE project." | |||
| 69 | 69 | ||
| 70 | ;;; Placeholders for ROOT directory scanning on base objects | 70 | ;;; Placeholders for ROOT directory scanning on base objects |
| 71 | ;; | 71 | ;; |
| 72 | (defmethod ede-project-root ((this ede-project-placeholder)) | 72 | (cl-defmethod ede-project-root ((this ede-project-placeholder)) |
| 73 | "If a project knows its root, return it here. | 73 | "If a project knows its root, return it here. |
| 74 | Allows for one-project-object-for-a-tree type systems." | 74 | Allows for one-project-object-for-a-tree type systems." |
| 75 | (oref this rootproject)) | 75 | (oref this rootproject)) |
| 76 | 76 | ||
| 77 | (defmethod ede-project-root-directory ((this ede-project-placeholder) | 77 | (cl-defmethod ede-project-root-directory ((this ede-project-placeholder) |
| 78 | &optional file) | 78 | &optional file) |
| 79 | "If a project knows its root, return it here. | 79 | "If a project knows its root, return it here. |
| 80 | Allows for one-project-object-for-a-tree type systems. | 80 | Allows for one-project-object-for-a-tree type systems. |
| @@ -116,7 +116,7 @@ of the anchor file for the project." | |||
| 116 | (ede--put-inode-dir-hash dir (nth 10 fattr)) | 116 | (ede--put-inode-dir-hash dir (nth 10 fattr)) |
| 117 | ))))) | 117 | ))))) |
| 118 | 118 | ||
| 119 | (defmethod ede--project-inode ((proj ede-project-placeholder)) | 119 | (cl-defmethod ede--project-inode ((proj ede-project-placeholder)) |
| 120 | "Get the inode of the directory project PROJ is in." | 120 | "Get the inode of the directory project PROJ is in." |
| 121 | (if (slot-boundp proj 'dirinode) | 121 | (if (slot-boundp proj 'dirinode) |
| 122 | (oref proj dirinode) | 122 | (oref proj dirinode) |
| @@ -217,7 +217,7 @@ If optional EXACT is non-nil, only return exact matches for DIR." | |||
| 217 | ;; the short answer we found -> ie - we are in a subproject. | 217 | ;; the short answer we found -> ie - we are in a subproject. |
| 218 | (or ans shortans))) | 218 | (or ans shortans))) |
| 219 | 219 | ||
| 220 | (defmethod ede-find-subproject-for-directory ((proj ede-project-placeholder) | 220 | (cl-defmethod ede-find-subproject-for-directory ((proj ede-project-placeholder) |
| 221 | dir) | 221 | dir) |
| 222 | "Find a subproject of PROJ that corresponds to DIR." | 222 | "Find a subproject of PROJ that corresponds to DIR." |
| 223 | (if ede--disable-inode | 223 | (if ede--disable-inode |
| @@ -374,7 +374,7 @@ If DIR is not part of a project, return nil." | |||
| 374 | 374 | ||
| 375 | ;;; DIRECTORY CONVERSION STUFF | 375 | ;;; DIRECTORY CONVERSION STUFF |
| 376 | ;; | 376 | ;; |
| 377 | (defmethod ede-convert-path ((this ede-project) path) | 377 | (cl-defmethod ede-convert-path ((this ede-project) path) |
| 378 | "Convert path in a standard way for a given project. | 378 | "Convert path in a standard way for a given project. |
| 379 | Default to making it project relative. | 379 | Default to making it project relative. |
| 380 | Argument THIS is the project to convert PATH to." | 380 | Argument THIS is the project to convert PATH to." |
| @@ -388,7 +388,7 @@ Argument THIS is the project to convert PATH to." | |||
| 388 | (substring fptf (match-end 0)) | 388 | (substring fptf (match-end 0)) |
| 389 | (error "Cannot convert relativize path %s" fp)))))) | 389 | (error "Cannot convert relativize path %s" fp)))))) |
| 390 | 390 | ||
| 391 | (defmethod ede-convert-path ((this ede-target) path &optional project) | 391 | (cl-defmethod ede-convert-path ((this ede-target) path &optional project) |
| 392 | "Convert path in a standard way for a given project. | 392 | "Convert path in a standard way for a given project. |
| 393 | Default to making it project relative. | 393 | Default to making it project relative. |
| 394 | Argument THIS is the project to convert PATH to. | 394 | 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." | |||
| 419 | (oref top locate-obj) | 419 | (oref top locate-obj) |
| 420 | ))) | 420 | ))) |
| 421 | 421 | ||
| 422 | (defmethod ede-expand-filename ((this ede-project) filename &optional force) | 422 | (cl-defmethod ede-expand-filename ((this ede-project) filename &optional force) |
| 423 | "Return a fully qualified file name based on project THIS. | 423 | "Return a fully qualified file name based on project THIS. |
| 424 | FILENAME should be just a filename which occurs in a directory controlled | 424 | FILENAME should be just a filename which occurs in a directory controlled |
| 425 | by this project. | 425 | by this project. |
| @@ -476,7 +476,7 @@ is returned." | |||
| 476 | 476 | ||
| 477 | ans)) | 477 | ans)) |
| 478 | 478 | ||
| 479 | (defmethod ede-expand-filename-impl ((this ede-project) filename &optional force) | 479 | (cl-defmethod ede-expand-filename-impl ((this ede-project) filename &optional force) |
| 480 | "Return a fully qualified file name based on project THIS. | 480 | "Return a fully qualified file name based on project THIS. |
| 481 | FILENAME should be just a filename which occurs in a directory controlled | 481 | FILENAME should be just a filename which occurs in a directory controlled |
| 482 | by this project. | 482 | by this project. |
| @@ -496,7 +496,7 @@ doesn't exist." | |||
| 496 | ;; Return it | 496 | ;; Return it |
| 497 | found)) | 497 | found)) |
| 498 | 498 | ||
| 499 | (defmethod ede-expand-filename-local ((this ede-project) filename) | 499 | (cl-defmethod ede-expand-filename-local ((this ede-project) filename) |
| 500 | "Expand filename locally to project THIS with filesystem tests." | 500 | "Expand filename locally to project THIS with filesystem tests." |
| 501 | (let ((path (ede-project-root-directory this))) | 501 | (let ((path (ede-project-root-directory this))) |
| 502 | (cond ((file-exists-p (expand-file-name filename path)) | 502 | (cond ((file-exists-p (expand-file-name filename path)) |
| @@ -504,7 +504,7 @@ doesn't exist." | |||
| 504 | ((file-exists-p (expand-file-name (concat "include/" filename) path)) | 504 | ((file-exists-p (expand-file-name (concat "include/" filename) path)) |
| 505 | (expand-file-name (concat "include/" filename) path))))) | 505 | (expand-file-name (concat "include/" filename) path))))) |
| 506 | 506 | ||
| 507 | (defmethod ede-expand-filename-impl-via-subproj ((this ede-project) filename) | 507 | (cl-defmethod ede-expand-filename-impl-via-subproj ((this ede-project) filename) |
| 508 | "Return a fully qualified file name based on project THIS. | 508 | "Return a fully qualified file name based on project THIS. |
| 509 | FILENAME should be just a filename which occurs in a directory controlled | 509 | FILENAME should be just a filename which occurs in a directory controlled |
| 510 | by this project." | 510 | by this project." |
| @@ -520,7 +520,7 @@ by this project." | |||
| 520 | ;; Return it | 520 | ;; Return it |
| 521 | found)) | 521 | found)) |
| 522 | 522 | ||
| 523 | (defmethod ede-expand-filename ((this ede-target) filename &optional force) | 523 | (cl-defmethod ede-expand-filename ((this ede-target) filename &optional force) |
| 524 | "Return a fully qualified file name based on target THIS. | 524 | "Return a fully qualified file name based on target THIS. |
| 525 | FILENAME should be a filename which occurs in a directory in which THIS works. | 525 | FILENAME should be a filename which occurs in a directory in which THIS works. |
| 526 | Optional argument FORCE forces the default filename to be provided even if it | 526 | 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 4d1e0e20707..7e1425f1318 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.") | |||
| 148 | "The baseclass for all generic EDE project types." | 148 | "The baseclass for all generic EDE project types." |
| 149 | :abstract t) | 149 | :abstract t) |
| 150 | 150 | ||
| 151 | (defmethod initialize-instance ((this ede-generic-project) | 151 | (cl-defmethod initialize-instance ((this ede-generic-project) |
| 152 | &rest fields) | 152 | &rest fields) |
| 153 | "Make sure the targets slot is bound." | 153 | "Make sure the targets slot is bound." |
| 154 | (call-next-method) | 154 | (cl-call-next-method) |
| 155 | (unless (slot-boundp this 'targets) | 155 | (unless (slot-boundp this 'targets) |
| 156 | (oset this :targets nil)) | 156 | (oset this :targets nil)) |
| 157 | ) | 157 | ) |
| 158 | 158 | ||
| 159 | (defmethod ede-project-root ((this ede-generic-project)) | 159 | (cl-defmethod ede-project-root ((this ede-generic-project)) |
| 160 | "Return my root." | 160 | "Return my root." |
| 161 | this) | 161 | this) |
| 162 | 162 | ||
| 163 | (defmethod ede-find-subproject-for-directory ((proj ede-generic-project) | 163 | (cl-defmethod ede-find-subproject-for-directory ((proj ede-generic-project) |
| 164 | dir) | 164 | dir) |
| 165 | "Return PROJ, for handling all subdirs below DIR." | 165 | "Return PROJ, for handling all subdirs below DIR." |
| 166 | proj) | 166 | proj) |
| @@ -216,7 +216,7 @@ All directories need at least one target.") | |||
| 216 | )) | 216 | )) |
| 217 | match)) | 217 | match)) |
| 218 | 218 | ||
| 219 | (defmethod ede-find-target ((proj ede-generic-project) buffer) | 219 | (cl-defmethod ede-find-target ((proj ede-generic-project) buffer) |
| 220 | "Find an EDE target in PROJ for BUFFER. | 220 | "Find an EDE target in PROJ for BUFFER. |
| 221 | If one doesn't exist, create a new one for this directory." | 221 | If one doesn't exist, create a new one for this directory." |
| 222 | (let* ((ext (file-name-extension (buffer-file-name buffer))) | 222 | (let* ((ext (file-name-extension (buffer-file-name buffer))) |
| @@ -322,7 +322,7 @@ the class `ede-generic-project' project." | |||
| 322 | ) | 322 | ) |
| 323 | "Generic Project for makefiles.") | 323 | "Generic Project for makefiles.") |
| 324 | 324 | ||
| 325 | (defmethod ede-generic-setup-configuration ((proj ede-generic-makefile-project) config) | 325 | (cl-defmethod ede-generic-setup-configuration ((proj ede-generic-makefile-project) config) |
| 326 | "Setup a configuration for Make." | 326 | "Setup a configuration for Make." |
| 327 | (oset config build-command "make -k") | 327 | (oset config build-command "make -k") |
| 328 | (oset config debug-command "gdb ") | 328 | (oset config debug-command "gdb ") |
| @@ -335,7 +335,7 @@ the class `ede-generic-project' project." | |||
| 335 | ) | 335 | ) |
| 336 | "Generic Project for scons.") | 336 | "Generic Project for scons.") |
| 337 | 337 | ||
| 338 | (defmethod ede-generic-setup-configuration ((proj ede-generic-scons-project) config) | 338 | (cl-defmethod ede-generic-setup-configuration ((proj ede-generic-scons-project) config) |
| 339 | "Setup a configuration for SCONS." | 339 | "Setup a configuration for SCONS." |
| 340 | (oset config build-command "scons") | 340 | (oset config build-command "scons") |
| 341 | (oset config debug-command "gdb ") | 341 | (oset config debug-command "gdb ") |
| @@ -348,7 +348,7 @@ the class `ede-generic-project' project." | |||
| 348 | ) | 348 | ) |
| 349 | "Generic Project for cmake.") | 349 | "Generic Project for cmake.") |
| 350 | 350 | ||
| 351 | (defmethod ede-generic-setup-configuration ((proj ede-generic-cmake-project) config) | 351 | (cl-defmethod ede-generic-setup-configuration ((proj ede-generic-cmake-project) config) |
| 352 | "Setup a configuration for CMake." | 352 | "Setup a configuration for CMake." |
| 353 | (oset config build-command "cmake") | 353 | (oset config build-command "cmake") |
| 354 | (oset config debug-command "gdb ") | 354 | (oset config debug-command "gdb ") |
| @@ -359,7 +359,7 @@ the class `ede-generic-project' project." | |||
| 359 | () | 359 | () |
| 360 | "Generic project found via Version Control files.") | 360 | "Generic project found via Version Control files.") |
| 361 | 361 | ||
| 362 | (defmethod ede-generic-setup-configuration ((proj ede-generic-vc-project) config) | 362 | (cl-defmethod ede-generic-setup-configuration ((proj ede-generic-vc-project) config) |
| 363 | "Setup a configuration for projects identified by revision control." | 363 | "Setup a configuration for projects identified by revision control." |
| 364 | ) | 364 | ) |
| 365 | 365 | ||
diff --git a/lisp/cedet/ede/linux.el b/lisp/cedet/ede/linux.el index c962724ce08..6887d387070 100644 --- a/lisp/cedet/ede/linux.el +++ b/lisp/cedet/ede/linux.el | |||
| @@ -231,25 +231,25 @@ All directories need at least one target.") | |||
| 231 | "EDE Linux Project target for Misc files. | 231 | "EDE Linux Project target for Misc files. |
| 232 | All directories need at least one target.") | 232 | All directories need at least one target.") |
| 233 | 233 | ||
| 234 | (defmethod initialize-instance ((this ede-linux-project) | 234 | (cl-defmethod initialize-instance ((this ede-linux-project) |
| 235 | &rest fields) | 235 | &rest fields) |
| 236 | "Make sure the targets slot is bound." | 236 | "Make sure the targets slot is bound." |
| 237 | (call-next-method) | 237 | (cl-call-next-method) |
| 238 | (unless (slot-boundp this 'targets) | 238 | (unless (slot-boundp this 'targets) |
| 239 | (oset this :targets nil))) | 239 | (oset this :targets nil))) |
| 240 | 240 | ||
| 241 | ;;; File Stuff | 241 | ;;; File Stuff |
| 242 | ;; | 242 | ;; |
| 243 | (defmethod ede-project-root-directory ((this ede-linux-project) | 243 | (cl-defmethod ede-project-root-directory ((this ede-linux-project) |
| 244 | &optional file) | 244 | &optional file) |
| 245 | "Return the root for THIS Linux project with file." | 245 | "Return the root for THIS Linux project with file." |
| 246 | (ede-up-directory (file-name-directory (oref this file)))) | 246 | (ede-up-directory (file-name-directory (oref this file)))) |
| 247 | 247 | ||
| 248 | (defmethod ede-project-root ((this ede-linux-project)) | 248 | (cl-defmethod ede-project-root ((this ede-linux-project)) |
| 249 | "Return my root." | 249 | "Return my root." |
| 250 | this) | 250 | this) |
| 251 | 251 | ||
| 252 | (defmethod ede-find-subproject-for-directory ((proj ede-linux-project) | 252 | (cl-defmethod ede-find-subproject-for-directory ((proj ede-linux-project) |
| 253 | dir) | 253 | dir) |
| 254 | "Return PROJ, for handling all subdirs below DIR." | 254 | "Return PROJ, for handling all subdirs below DIR." |
| 255 | proj) | 255 | proj) |
| @@ -266,7 +266,7 @@ All directories need at least one target.") | |||
| 266 | )) | 266 | )) |
| 267 | match)) | 267 | match)) |
| 268 | 268 | ||
| 269 | (defmethod ede-find-target ((proj ede-linux-project) buffer) | 269 | (cl-defmethod ede-find-target ((proj ede-linux-project) buffer) |
| 270 | "Find an EDE target in PROJ for BUFFER. | 270 | "Find an EDE target in PROJ for BUFFER. |
| 271 | If one doesn't exist, create a new one for this directory." | 271 | If one doesn't exist, create a new one for this directory." |
| 272 | (let* ((ext (file-name-extension (buffer-file-name buffer))) | 272 | (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." | |||
| 292 | 292 | ||
| 293 | ;;; UTILITIES SUPPORT. | 293 | ;;; UTILITIES SUPPORT. |
| 294 | ;; | 294 | ;; |
| 295 | (defmethod ede-preprocessor-map ((this ede-linux-target-c)) | 295 | (cl-defmethod ede-preprocessor-map ((this ede-linux-target-c)) |
| 296 | "Get the pre-processor map for Linux C code. | 296 | "Get the pre-processor map for Linux C code. |
| 297 | All files need the macros from lisp.h!" | 297 | All files need the macros from lisp.h!" |
| 298 | (require 'semantic/db) | 298 | (require 'semantic/db) |
| @@ -317,7 +317,7 @@ All files need the macros from lisp.h!" | |||
| 317 | (let ((F (expand-file-name name (expand-file-name subdir root)))) | 317 | (let ((F (expand-file-name name (expand-file-name subdir root)))) |
| 318 | (when (file-exists-p F) F))) | 318 | (when (file-exists-p F) F))) |
| 319 | 319 | ||
| 320 | (defmethod ede-expand-filename-impl ((proj ede-linux-project) name) | 320 | (cl-defmethod ede-expand-filename-impl ((proj ede-linux-project) name) |
| 321 | "Within this project PROJ, find the file NAME. | 321 | "Within this project PROJ, find the file NAME. |
| 322 | Knows about how the Linux source tree is organized." | 322 | Knows about how the Linux source tree is organized." |
| 323 | (let* ((ext (file-name-extension name)) | 323 | (let* ((ext (file-name-extension name)) |
| @@ -338,11 +338,11 @@ Knows about how the Linux source tree is organized." | |||
| 338 | ((string-match "txt" ext) | 338 | ((string-match "txt" ext) |
| 339 | (ede-linux-file-exists-name name dir "Documentation")) | 339 | (ede-linux-file-exists-name name dir "Documentation")) |
| 340 | (t nil)))) | 340 | (t nil)))) |
| 341 | (or F (call-next-method)))) | 341 | (or F (cl-call-next-method)))) |
| 342 | 342 | ||
| 343 | ;;; Command Support | 343 | ;;; Command Support |
| 344 | ;; | 344 | ;; |
| 345 | (defmethod project-compile-project ((proj ede-linux-project) | 345 | (cl-defmethod project-compile-project ((proj ede-linux-project) |
| 346 | &optional command) | 346 | &optional command) |
| 347 | "Compile the entire current project. | 347 | "Compile the entire current project. |
| 348 | Argument COMMAND is the command to use when compiling." | 348 | Argument COMMAND is the command to use when compiling." |
| @@ -359,7 +359,7 @@ Argument COMMAND is the command to use when compiling." | |||
| 359 | 359 | ||
| 360 | (compile command))) | 360 | (compile command))) |
| 361 | 361 | ||
| 362 | (defmethod project-compile-target ((obj ede-linux-target-c) &optional command) | 362 | (cl-defmethod project-compile-target ((obj ede-linux-target-c) &optional command) |
| 363 | "Compile the current target. | 363 | "Compile the current target. |
| 364 | Argument COMMAND is the command to use for compiling the target." | 364 | Argument COMMAND is the command to use for compiling the target." |
| 365 | (let* ((proj (ede-target-parent obj)) | 365 | (let* ((proj (ede-target-parent obj)) |
| @@ -378,7 +378,7 @@ Argument COMMAND is the command to use for compiling the target." | |||
| 378 | 378 | ||
| 379 | (compile command))) | 379 | (compile command))) |
| 380 | 380 | ||
| 381 | (defmethod project-rescan ((this ede-linux-project)) | 381 | (cl-defmethod project-rescan ((this ede-linux-project)) |
| 382 | "Rescan this Linux project from the sources." | 382 | "Rescan this Linux project from the sources." |
| 383 | (let* ((dir (ede-project-root-directory this)) | 383 | (let* ((dir (ede-project-root-directory this)) |
| 384 | (bdir (ede-linux--get-build-directory dir)) | 384 | (bdir (ede-linux--get-build-directory dir)) |
diff --git a/lisp/cedet/ede/locate.el b/lisp/cedet/ede/locate.el index c0c8ae3b38b..2ff83418f78 100644 --- a/lisp/cedet/ede/locate.el +++ b/lisp/cedet/ede/locate.el | |||
| @@ -110,34 +110,34 @@ based on `ede-locate-setup-options'." | |||
| 110 | ) | 110 | ) |
| 111 | "Baseclass for LOCATE feature in EDE.") | 111 | "Baseclass for LOCATE feature in EDE.") |
| 112 | 112 | ||
| 113 | (defmethod initialize-instance ((loc ede-locate-base) &rest fields) | 113 | (cl-defmethod initialize-instance ((loc ede-locate-base) &rest fields) |
| 114 | "Make sure we have a hash table." | 114 | "Make sure we have a hash table." |
| 115 | ;; Basic setup. | 115 | ;; Basic setup. |
| 116 | (call-next-method) | 116 | (cl-call-next-method) |
| 117 | ;; Make sure we have a hash table. | 117 | ;; Make sure we have a hash table. |
| 118 | (ede-locate-flush-hash loc) | 118 | (ede-locate-flush-hash loc) |
| 119 | ) | 119 | ) |
| 120 | 120 | ||
| 121 | (defmethod ede-locate-ok-in-project :static ((loc ede-locate-base) | 121 | (cl-defmethod ede-locate-ok-in-project ((loc (subclass ede-locate-base)) |
| 122 | root) | 122 | root) |
| 123 | "Is it ok to use this project type under ROOT." | 123 | "Is it ok to use this project type under ROOT." |
| 124 | t) | 124 | t) |
| 125 | 125 | ||
| 126 | (defmethod ede-locate-flush-hash ((loc ede-locate-base)) | 126 | (cl-defmethod ede-locate-flush-hash ((loc ede-locate-base)) |
| 127 | "For LOC, flush hashtable and start from scratch." | 127 | "For LOC, flush hashtable and start from scratch." |
| 128 | (oset loc hash (make-hash-table :test 'equal))) | 128 | (oset loc hash (make-hash-table :test 'equal))) |
| 129 | 129 | ||
| 130 | (defmethod ede-locate-file-in-hash ((loc ede-locate-base) | 130 | (cl-defmethod ede-locate-file-in-hash ((loc ede-locate-base) |
| 131 | filestring) | 131 | filestring) |
| 132 | "For LOC, is the file FILESTRING in our hashtable?" | 132 | "For LOC, is the file FILESTRING in our hashtable?" |
| 133 | (gethash filestring (oref loc hash))) | 133 | (gethash filestring (oref loc hash))) |
| 134 | 134 | ||
| 135 | (defmethod ede-locate-add-file-to-hash ((loc ede-locate-base) | 135 | (cl-defmethod ede-locate-add-file-to-hash ((loc ede-locate-base) |
| 136 | filestring fullfilename) | 136 | filestring fullfilename) |
| 137 | "For LOC, add FILESTR to the hash with FULLFILENAME." | 137 | "For LOC, add FILESTR to the hash with FULLFILENAME." |
| 138 | (puthash filestring fullfilename (oref loc hash))) | 138 | (puthash filestring fullfilename (oref loc hash))) |
| 139 | 139 | ||
| 140 | (defmethod ede-locate-file-in-project ((loc ede-locate-base) | 140 | (cl-defmethod ede-locate-file-in-project ((loc ede-locate-base) |
| 141 | filesubstring | 141 | filesubstring |
| 142 | ) | 142 | ) |
| 143 | "Locate with LOC occurrences of FILESUBSTRING. | 143 | "Locate with LOC occurrences of FILESUBSTRING. |
| @@ -149,7 +149,7 @@ that created this EDE locate object." | |||
| 149 | (oset loc lastanswer ans) | 149 | (oset loc lastanswer ans) |
| 150 | ans)) | 150 | ans)) |
| 151 | 151 | ||
| 152 | (defmethod ede-locate-file-in-project-impl ((loc ede-locate-base) | 152 | (cl-defmethod ede-locate-file-in-project-impl ((loc ede-locate-base) |
| 153 | filesubstring | 153 | filesubstring |
| 154 | ) | 154 | ) |
| 155 | "Locate with LOC occurrences of FILESUBSTRING. | 155 | "Locate with LOC occurrences of FILESUBSTRING. |
| @@ -158,8 +158,8 @@ that created this EDE locate object." | |||
| 158 | nil | 158 | nil |
| 159 | ) | 159 | ) |
| 160 | 160 | ||
| 161 | (defmethod ede-locate-create/update-root-database :STATIC | 161 | (cl-defmethod ede-locate-create/update-root-database |
| 162 | ((loc ede-locate-base) root) | 162 | ((loc (subclass ede-locate-base)) root) |
| 163 | "Create or update the database for the current project. | 163 | "Create or update the database for the current project. |
| 164 | You cannot create projects for the baseclass." | 164 | You cannot create projects for the baseclass." |
| 165 | (error "Cannot create/update a database of type %S" | 165 | (error "Cannot create/update a database of type %S" |
| @@ -177,13 +177,13 @@ You cannot create projects for the baseclass." | |||
| 177 | Configure the Emacs `locate-program' variable to also | 177 | Configure the Emacs `locate-program' variable to also |
| 178 | configure the use of EDE locate.") | 178 | configure the use of EDE locate.") |
| 179 | 179 | ||
| 180 | (defmethod ede-locate-ok-in-project :static ((loc ede-locate-locate) | 180 | (cl-defmethod ede-locate-ok-in-project ((loc (subclass ede-locate-locate)) |
| 181 | root) | 181 | root) |
| 182 | "Is it ok to use this project type under ROOT." | 182 | "Is it ok to use this project type under ROOT." |
| 183 | (or (featurep 'locate) (locate-library "locate")) | 183 | (or (featurep 'locate) (locate-library "locate")) |
| 184 | ) | 184 | ) |
| 185 | 185 | ||
| 186 | (defmethod ede-locate-file-in-project-impl ((loc ede-locate-locate) | 186 | (cl-defmethod ede-locate-file-in-project-impl ((loc ede-locate-locate) |
| 187 | filesubstring) | 187 | filesubstring) |
| 188 | "Locate with LOC occurrences of FILESUBSTRING under PROJECTROOT. | 188 | "Locate with LOC occurrences of FILESUBSTRING under PROJECTROOT. |
| 189 | Searches are done under the current root of the EDE project | 189 | Searches are done under the current root of the EDE project |
| @@ -220,12 +220,12 @@ that created this EDE locate object." | |||
| 220 | Configure EDE's use of GNU Global through the cedet-global.el | 220 | Configure EDE's use of GNU Global through the cedet-global.el |
| 221 | variable `cedet-global-command'.") | 221 | variable `cedet-global-command'.") |
| 222 | 222 | ||
| 223 | (defmethod initialize-instance ((loc ede-locate-global) | 223 | (cl-defmethod initialize-instance ((loc ede-locate-global) |
| 224 | &rest slots) | 224 | &rest slots) |
| 225 | "Make sure that we can use GNU Global." | 225 | "Make sure that we can use GNU Global." |
| 226 | (require 'cedet-global) | 226 | (require 'cedet-global) |
| 227 | ;; Get ourselves initialized. | 227 | ;; Get ourselves initialized. |
| 228 | (call-next-method) | 228 | (cl-call-next-method) |
| 229 | ;; Do the checks. | 229 | ;; Do the checks. |
| 230 | (cedet-gnu-global-version-check) | 230 | (cedet-gnu-global-version-check) |
| 231 | (let* ((default-directory (oref loc root)) | 231 | (let* ((default-directory (oref loc root)) |
| @@ -235,7 +235,7 @@ variable `cedet-global-command'.") | |||
| 235 | (oref loc root)))) | 235 | (oref loc root)))) |
| 236 | ) | 236 | ) |
| 237 | 237 | ||
| 238 | (defmethod ede-locate-ok-in-project :static ((loc ede-locate-global) | 238 | (cl-defmethod ede-locate-ok-in-project ((loc (subclass ede-locate-global)) |
| 239 | root) | 239 | root) |
| 240 | "Is it ok to use this project type under ROOT." | 240 | "Is it ok to use this project type under ROOT." |
| 241 | (require 'cedet-global) | 241 | (require 'cedet-global) |
| @@ -244,7 +244,7 @@ variable `cedet-global-command'.") | |||
| 244 | (newroot (cedet-gnu-global-root))) | 244 | (newroot (cedet-gnu-global-root))) |
| 245 | newroot)) | 245 | newroot)) |
| 246 | 246 | ||
| 247 | (defmethod ede-locate-file-in-project-impl ((loc ede-locate-global) | 247 | (cl-defmethod ede-locate-file-in-project-impl ((loc ede-locate-global) |
| 248 | filesubstring) | 248 | filesubstring) |
| 249 | "Locate with LOC occurrences of FILESUBSTRING under PROJECTROOT. | 249 | "Locate with LOC occurrences of FILESUBSTRING under PROJECTROOT. |
| 250 | Searches are done under the current root of the EDE project | 250 | Searches are done under the current root of the EDE project |
| @@ -253,8 +253,8 @@ that created this EDE locate object." | |||
| 253 | (let ((default-directory (oref loc root))) | 253 | (let ((default-directory (oref loc root))) |
| 254 | (cedet-gnu-global-expand-filename filesubstring))) | 254 | (cedet-gnu-global-expand-filename filesubstring))) |
| 255 | 255 | ||
| 256 | (defmethod ede-locate-create/update-root-database :STATIC | 256 | (cl-defmethod ede-locate-create/update-root-database |
| 257 | ((loc ede-locate-global) root) | 257 | ((loc (subclass ede-locate-global)) root) |
| 258 | "Create or update the GNU Global database for the current project." | 258 | "Create or update the GNU Global database for the current project." |
| 259 | (cedet-gnu-global-create/update-database root)) | 259 | (cedet-gnu-global-create/update-database root)) |
| 260 | 260 | ||
| @@ -272,11 +272,11 @@ that created this EDE locate object." | |||
| 272 | Configure EDE's use of IDUtils through the cedet-idutils.el | 272 | Configure EDE's use of IDUtils through the cedet-idutils.el |
| 273 | file name searching variable `cedet-idutils-file-command'.") | 273 | file name searching variable `cedet-idutils-file-command'.") |
| 274 | 274 | ||
| 275 | (defmethod initialize-instance ((loc ede-locate-idutils) | 275 | (cl-defmethod initialize-instance ((loc ede-locate-idutils) |
| 276 | &rest slots) | 276 | &rest slots) |
| 277 | "Make sure that we can use IDUtils." | 277 | "Make sure that we can use IDUtils." |
| 278 | ;; Get ourselves initialized. | 278 | ;; Get ourselves initialized. |
| 279 | (call-next-method) | 279 | (cl-call-next-method) |
| 280 | ;; Do the checks. | 280 | ;; Do the checks. |
| 281 | (require 'cedet-idutils) | 281 | (require 'cedet-idutils) |
| 282 | (cedet-idutils-version-check) | 282 | (cedet-idutils-version-check) |
| @@ -285,7 +285,7 @@ file name searching variable `cedet-idutils-file-command'.") | |||
| 285 | (oref loc root))) | 285 | (oref loc root))) |
| 286 | ) | 286 | ) |
| 287 | 287 | ||
| 288 | (defmethod ede-locate-ok-in-project :static ((loc ede-locate-idutils) | 288 | (cl-defmethod ede-locate-ok-in-project ((loc (subclass ede-locate-idutils)) |
| 289 | root) | 289 | root) |
| 290 | "Is it ok to use this project type under ROOT." | 290 | "Is it ok to use this project type under ROOT." |
| 291 | (require 'cedet-idutils) | 291 | (require 'cedet-idutils) |
| @@ -293,7 +293,7 @@ file name searching variable `cedet-idutils-file-command'.") | |||
| 293 | (when (cedet-idutils-support-for-directory root) | 293 | (when (cedet-idutils-support-for-directory root) |
| 294 | root)) | 294 | root)) |
| 295 | 295 | ||
| 296 | (defmethod ede-locate-file-in-project-impl ((loc ede-locate-idutils) | 296 | (cl-defmethod ede-locate-file-in-project-impl ((loc ede-locate-idutils) |
| 297 | filesubstring) | 297 | filesubstring) |
| 298 | "Locate with LOC occurrences of FILESUBSTRING under PROJECTROOT. | 298 | "Locate with LOC occurrences of FILESUBSTRING under PROJECTROOT. |
| 299 | Searches are done under the current root of the EDE project | 299 | Searches are done under the current root of the EDE project |
| @@ -302,8 +302,8 @@ that created this EDE locate object." | |||
| 302 | (let ((default-directory (oref loc root))) | 302 | (let ((default-directory (oref loc root))) |
| 303 | (cedet-idutils-expand-filename filesubstring))) | 303 | (cedet-idutils-expand-filename filesubstring))) |
| 304 | 304 | ||
| 305 | (defmethod ede-locate-create/update-root-database :STATIC | 305 | (cl-defmethod ede-locate-create/update-root-database |
| 306 | ((loc ede-locate-idutils) root) | 306 | ((loc (subclass ede-locate-idutils)) root) |
| 307 | "Create or update the GNU Global database for the current project." | 307 | "Create or update the GNU Global database for the current project." |
| 308 | (cedet-idutils-create/update-database root)) | 308 | (cedet-idutils-create/update-database root)) |
| 309 | 309 | ||
| @@ -321,11 +321,11 @@ that created this EDE locate object." | |||
| 321 | Configure EDE's use of Cscope through the cedet-cscope.el | 321 | Configure EDE's use of Cscope through the cedet-cscope.el |
| 322 | file name searching variable `cedet-cscope-file-command'.") | 322 | file name searching variable `cedet-cscope-file-command'.") |
| 323 | 323 | ||
| 324 | (defmethod initialize-instance ((loc ede-locate-cscope) | 324 | (cl-defmethod initialize-instance ((loc ede-locate-cscope) |
| 325 | &rest slots) | 325 | &rest slots) |
| 326 | "Make sure that we can use Cscope." | 326 | "Make sure that we can use Cscope." |
| 327 | ;; Get ourselves initialized. | 327 | ;; Get ourselves initialized. |
| 328 | (call-next-method) | 328 | (cl-call-next-method) |
| 329 | ;; Do the checks. | 329 | ;; Do the checks. |
| 330 | (require 'cedet-cscope) | 330 | (require 'cedet-cscope) |
| 331 | (cedet-cscope-version-check) | 331 | (cedet-cscope-version-check) |
| @@ -334,7 +334,7 @@ file name searching variable `cedet-cscope-file-command'.") | |||
| 334 | (oref loc root))) | 334 | (oref loc root))) |
| 335 | ) | 335 | ) |
| 336 | 336 | ||
| 337 | (defmethod ede-locate-ok-in-project :static ((loc ede-locate-cscope) | 337 | (cl-defmethod ede-locate-ok-in-project ((loc (subclass ede-locate-cscope)) |
| 338 | root) | 338 | root) |
| 339 | "Is it ok to use this project type under ROOT." | 339 | "Is it ok to use this project type under ROOT." |
| 340 | (require 'cedet-cscope) | 340 | (require 'cedet-cscope) |
| @@ -342,7 +342,7 @@ file name searching variable `cedet-cscope-file-command'.") | |||
| 342 | (when (cedet-cscope-support-for-directory root) | 342 | (when (cedet-cscope-support-for-directory root) |
| 343 | root)) | 343 | root)) |
| 344 | 344 | ||
| 345 | (defmethod ede-locate-file-in-project-impl ((loc ede-locate-cscope) | 345 | (cl-defmethod ede-locate-file-in-project-impl ((loc ede-locate-cscope) |
| 346 | filesubstring) | 346 | filesubstring) |
| 347 | "Locate with LOC occurrences of FILESUBSTRING under PROJECTROOT. | 347 | "Locate with LOC occurrences of FILESUBSTRING under PROJECTROOT. |
| 348 | Searches are done under the current root of the EDE project | 348 | Searches are done under the current root of the EDE project |
| @@ -351,8 +351,8 @@ that created this EDE locate object." | |||
| 351 | (require 'cedet-cscope) | 351 | (require 'cedet-cscope) |
| 352 | (cedet-cscope-expand-filename filesubstring))) | 352 | (cedet-cscope-expand-filename filesubstring))) |
| 353 | 353 | ||
| 354 | (defmethod ede-locate-create/update-root-database :STATIC | 354 | (cl-defmethod ede-locate-create/update-root-database |
| 355 | ((loc ede-locate-cscope) root) | 355 | ((loc (subclass ede-locate-cscope)) root) |
| 356 | "Create or update the GNU Global database for the current project." | 356 | "Create or update the GNU Global database for the current project." |
| 357 | (require 'cedet-cscope) | 357 | (require 'cedet-cscope) |
| 358 | (cedet-cscope-create/update-database root)) | 358 | (cedet-cscope-create/update-database root)) |
diff --git a/lisp/cedet/ede/pconf.el b/lisp/cedet/ede/pconf.el index b22cd87e1ea..6545b858eff 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 | |||
| 36 | don't do it. A value of nil means to just do it.") | 36 | don't do it. A value of nil means to just do it.") |
| 37 | 37 | ||
| 38 | ;;; Code: | 38 | ;;; Code: |
| 39 | (defmethod ede-proj-configure-file ((this ede-proj-project)) | 39 | (cl-defmethod ede-proj-configure-file ((this ede-proj-project)) |
| 40 | "The configure.ac script used by project THIS." | 40 | "The configure.ac script used by project THIS." |
| 41 | (ede-expand-filename (ede-toplevel this) "configure.ac" t)) | 41 | (ede-expand-filename (ede-toplevel this) "configure.ac" t)) |
| 42 | 42 | ||
| 43 | (defmethod ede-proj-configure-test-required-file ((this ede-proj-project) file) | 43 | (cl-defmethod ede-proj-configure-test-required-file ((this ede-proj-project) file) |
| 44 | "For project THIS, test that the file FILE exists, or create it." | 44 | "For project THIS, test that the file FILE exists, or create it." |
| 45 | (let ((f (ede-expand-filename (ede-toplevel this) file t))) | 45 | (let ((f (ede-expand-filename (ede-toplevel this) file t))) |
| 46 | (when (not (file-exists-p f)) | 46 | (when (not (file-exists-p f)) |
| @@ -60,7 +60,7 @@ don't do it. A value of nil means to just do it.") | |||
| 60 | (error "Quit"))))))) | 60 | (error "Quit"))))))) |
| 61 | 61 | ||
| 62 | 62 | ||
| 63 | (defmethod ede-proj-configure-synchronize ((this ede-proj-project)) | 63 | (cl-defmethod ede-proj-configure-synchronize ((this ede-proj-project)) |
| 64 | "Synchronize what we know about project THIS into configure.ac." | 64 | "Synchronize what we know about project THIS into configure.ac." |
| 65 | (let ((b (find-file-noselect (ede-proj-configure-file this))) | 65 | (let ((b (find-file-noselect (ede-proj-configure-file this))) |
| 66 | ;;(td (file-name-directory (ede-proj-configure-file this))) | 66 | ;;(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.") | |||
| 149 | 149 | ||
| 150 | )))) | 150 | )))) |
| 151 | 151 | ||
| 152 | (defmethod ede-proj-configure-recreate ((this ede-proj-project)) | 152 | (cl-defmethod ede-proj-configure-recreate ((this ede-proj-project)) |
| 153 | "Delete project THIS's configure script and start over." | 153 | "Delete project THIS's configure script and start over." |
| 154 | (if (not (ede-proj-configure-file this)) | 154 | (if (not (ede-proj-configure-file this)) |
| 155 | (error "Could not determine configure.ac for %S" (eieio-object-name this))) | 155 | (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.") | |||
| 159 | (if b (kill-buffer b))) | 159 | (if b (kill-buffer b))) |
| 160 | (ede-proj-configure-synchronize this)) | 160 | (ede-proj-configure-synchronize this)) |
| 161 | 161 | ||
| 162 | (defmethod ede-proj-tweak-autoconf ((this ede-proj-target)) | 162 | (cl-defmethod ede-proj-tweak-autoconf ((this ede-proj-target)) |
| 163 | "Tweak the configure file (current buffer) to accommodate THIS." | 163 | "Tweak the configure file (current buffer) to accommodate THIS." |
| 164 | ;; Check the compilers belonging to THIS, and call the autoconf | 164 | ;; Check the compilers belonging to THIS, and call the autoconf |
| 165 | ;; setup for those compilers. | 165 | ;; setup for those compilers. |
| @@ -167,7 +167,7 @@ don't do it. A value of nil means to just do it.") | |||
| 167 | (mapc 'ede-proj-tweak-autoconf (ede-proj-linkers this)) | 167 | (mapc 'ede-proj-tweak-autoconf (ede-proj-linkers this)) |
| 168 | ) | 168 | ) |
| 169 | 169 | ||
| 170 | (defmethod ede-proj-flush-autoconf ((this ede-proj-target)) | 170 | (cl-defmethod ede-proj-flush-autoconf ((this ede-proj-target)) |
| 171 | "Flush the configure file (current buffer) to accommodate THIS. | 171 | "Flush the configure file (current buffer) to accommodate THIS. |
| 172 | By flushing, remove any cruft that may be in the file. Subsequent | 172 | By flushing, remove any cruft that may be in the file. Subsequent |
| 173 | calls to `ede-proj-tweak-autoconf' can restore items removed by flush." | 173 | 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." | |||
| 175 | 175 | ||
| 176 | 176 | ||
| 177 | ;; @TODO - No-one calls this ??? | 177 | ;; @TODO - No-one calls this ??? |
| 178 | (defmethod ede-proj-configure-add-missing ((this ede-proj-target)) | 178 | (cl-defmethod ede-proj-configure-add-missing ((this ede-proj-target)) |
| 179 | "Query if any files needed by THIS provided by automake are missing. | 179 | "Query if any files needed by THIS provided by automake are missing. |
| 180 | Results in --add-missing being passed to automake." | 180 | Results in --add-missing being passed to automake." |
| 181 | nil) | 181 | nil) |
| 182 | 182 | ||
| 183 | ;; @TODO - No-one implements this yet. | 183 | ;; @TODO - No-one implements this yet. |
| 184 | (defmethod ede-proj-configure-create-missing ((this ede-proj-target)) | 184 | (cl-defmethod ede-proj-configure-create-missing ((this ede-proj-target)) |
| 185 | "Add any missing files for THIS by creating them." | 185 | "Add any missing files for THIS by creating them." |
| 186 | nil) | 186 | nil) |
| 187 | 187 | ||
diff --git a/lisp/cedet/ede/pmake.el b/lisp/cedet/ede/pmake.el index deefb7bc69a..3307202bf73 100644 --- a/lisp/cedet/ede/pmake.el +++ b/lisp/cedet/ede/pmake.el | |||
| @@ -52,7 +52,7 @@ | |||
| 52 | (declare-function ede-srecode-insert "ede/srecode") | 52 | (declare-function ede-srecode-insert "ede/srecode") |
| 53 | 53 | ||
| 54 | ;;; Code: | 54 | ;;; Code: |
| 55 | (defmethod ede-proj-makefile-create ((this ede-proj-project) mfilename) | 55 | (cl-defmethod ede-proj-makefile-create ((this ede-proj-project) mfilename) |
| 56 | "Create a Makefile for all Makefile targets in THIS. | 56 | "Create a Makefile for all Makefile targets in THIS. |
| 57 | MFILENAME is the makefile to generate." | 57 | MFILENAME is the makefile to generate." |
| 58 | (require 'ede/srecode) | 58 | (require 'ede/srecode) |
| @@ -284,26 +284,26 @@ Change . to _ in the variable name." | |||
| 284 | (setq name (replace-match "_" nil t name))) | 284 | (setq name (replace-match "_" nil t name))) |
| 285 | name)) | 285 | name)) |
| 286 | 286 | ||
| 287 | (defmethod ede-proj-makefile-sourcevar ((this ede-proj-target)) | 287 | (cl-defmethod ede-proj-makefile-sourcevar ((this ede-proj-target)) |
| 288 | "Return the variable name for THIS's sources." | 288 | "Return the variable name for THIS's sources." |
| 289 | (concat (ede-pmake-varname this) "_YOU_FOUND_A_BUG")) | 289 | (concat (ede-pmake-varname this) "_YOU_FOUND_A_BUG")) |
| 290 | 290 | ||
| 291 | ;;; DEPENDENCY FILE GENERATOR LISTS | 291 | ;;; DEPENDENCY FILE GENERATOR LISTS |
| 292 | ;; | 292 | ;; |
| 293 | (defmethod ede-proj-makefile-dependency-files ((this ede-proj-target)) | 293 | (cl-defmethod ede-proj-makefile-dependency-files ((this ede-proj-target)) |
| 294 | "Return a list of source files to convert to dependencies. | 294 | "Return a list of source files to convert to dependencies. |
| 295 | Argument THIS is the target to get sources from." | 295 | Argument THIS is the target to get sources from." |
| 296 | nil) | 296 | nil) |
| 297 | 297 | ||
| 298 | ;;; GENERIC VARIABLES | 298 | ;;; GENERIC VARIABLES |
| 299 | ;; | 299 | ;; |
| 300 | (defmethod ede-proj-makefile-configuration-variables ((this ede-proj-project) | 300 | (cl-defmethod ede-proj-makefile-configuration-variables ((this ede-proj-project) |
| 301 | configuration) | 301 | configuration) |
| 302 | "Return a list of configuration variables from THIS. | 302 | "Return a list of configuration variables from THIS. |
| 303 | Use CONFIGURATION as the current configuration to query." | 303 | Use CONFIGURATION as the current configuration to query." |
| 304 | (cdr (assoc configuration (oref this configuration-variables)))) | 304 | (cdr (assoc configuration (oref this configuration-variables)))) |
| 305 | 305 | ||
| 306 | (defmethod ede-proj-makefile-insert-variables-new ((this ede-proj-project)) | 306 | (cl-defmethod ede-proj-makefile-insert-variables-new ((this ede-proj-project)) |
| 307 | "Insert variables needed by target THIS. | 307 | "Insert variables needed by target THIS. |
| 308 | 308 | ||
| 309 | NOTE: Not yet in use! This is part of an SRecode conversion of | 309 | 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 | |||
| 358 | ; )) | 358 | ; )) |
| 359 | ) | 359 | ) |
| 360 | 360 | ||
| 361 | (defmethod ede-proj-makefile-insert-variables ((this ede-proj-project)) | 361 | (cl-defmethod ede-proj-makefile-insert-variables ((this ede-proj-project)) |
| 362 | "Insert variables needed by target THIS." | 362 | "Insert variables needed by target THIS." |
| 363 | (let ((conf-table (ede-proj-makefile-configuration-variables | 363 | (let ((conf-table (ede-proj-makefile-configuration-variables |
| 364 | this (oref this configuration-default))) | 364 | this (oref this configuration-default))) |
| @@ -392,7 +392,7 @@ NOTE: Not yet in use! This is part of an SRecode conversion of | |||
| 392 | (insert "\nede_FILES=" (file-name-nondirectory (oref this file)) " " | 392 | (insert "\nede_FILES=" (file-name-nondirectory (oref this file)) " " |
| 393 | (file-name-nondirectory (ede-proj-dist-makefile this)) "\n")) | 393 | (file-name-nondirectory (ede-proj-dist-makefile this)) "\n")) |
| 394 | 394 | ||
| 395 | (defmethod ede-proj-makefile-insert-source-variables ((this ede-proj-target) | 395 | (cl-defmethod ede-proj-makefile-insert-source-variables ((this ede-proj-target) |
| 396 | &optional | 396 | &optional |
| 397 | moresource) | 397 | moresource) |
| 398 | "Insert the source variables needed by THIS. | 398 | "Insert the source variables needed by THIS. |
| @@ -406,7 +406,7 @@ sources variable." | |||
| 406 | (if moresource | 406 | (if moresource |
| 407 | (insert " \\\n " (mapconcat (lambda (a) a) moresource " ") ""))))) | 407 | (insert " \\\n " (mapconcat (lambda (a) a) moresource " ") ""))))) |
| 408 | 408 | ||
| 409 | (defmethod ede-proj-makefile-insert-variables ((this ede-proj-target) &optional | 409 | (cl-defmethod ede-proj-makefile-insert-variables ((this ede-proj-target) &optional |
| 410 | moresource) | 410 | moresource) |
| 411 | "Insert variables needed by target THIS. | 411 | "Insert variables needed by target THIS. |
| 412 | Optional argument MORESOURCE is a list of additional sources to add to the | 412 | Optional argument MORESOURCE is a list of additional sources to add to the |
| @@ -414,18 +414,18 @@ sources variable." | |||
| 414 | (ede-proj-makefile-insert-source-variables this moresource) | 414 | (ede-proj-makefile-insert-source-variables this moresource) |
| 415 | ) | 415 | ) |
| 416 | 416 | ||
| 417 | (defmethod ede-proj-makefile-configuration-variables ((this ede-proj-target-makefile) | 417 | (cl-defmethod ede-proj-makefile-configuration-variables ((this ede-proj-target-makefile) |
| 418 | configuration) | 418 | configuration) |
| 419 | "Return a list of configuration variables from THIS. | 419 | "Return a list of configuration variables from THIS. |
| 420 | Use CONFIGURATION as the current configuration to query." | 420 | Use CONFIGURATION as the current configuration to query." |
| 421 | (cdr (assoc configuration (oref this configuration-variables)))) | 421 | (cdr (assoc configuration (oref this configuration-variables)))) |
| 422 | 422 | ||
| 423 | (defmethod ede-proj-makefile-insert-variables ((this ede-proj-target-makefile) | 423 | (cl-defmethod ede-proj-makefile-insert-variables ((this ede-proj-target-makefile) |
| 424 | &optional moresource) | 424 | &optional moresource) |
| 425 | "Insert variables needed by target THIS. | 425 | "Insert variables needed by target THIS. |
| 426 | Optional argument MORESOURCE is a list of additional sources to add to the | 426 | Optional argument MORESOURCE is a list of additional sources to add to the |
| 427 | sources variable." | 427 | sources variable." |
| 428 | (call-next-method) | 428 | (cl-call-next-method) |
| 429 | (let* ((proj (ede-target-parent this)) | 429 | (let* ((proj (ede-target-parent this)) |
| 430 | (conf-table (ede-proj-makefile-configuration-variables | 430 | (conf-table (ede-proj-makefile-configuration-variables |
| 431 | this (oref proj configuration-default))) | 431 | this (oref proj configuration-default))) |
| @@ -449,19 +449,19 @@ sources variable." | |||
| 449 | (ede-linker-only-once linker | 449 | (ede-linker-only-once linker |
| 450 | (ede-proj-makefile-insert-variables linker))))) | 450 | (ede-proj-makefile-insert-variables linker))))) |
| 451 | 451 | ||
| 452 | (defmethod ede-proj-makefile-insert-automake-pre-variables | 452 | (cl-defmethod ede-proj-makefile-insert-automake-pre-variables |
| 453 | ((this ede-proj-target)) | 453 | ((this ede-proj-target)) |
| 454 | "Insert variables needed by target THIS in Makefile.am before SOURCES." | 454 | "Insert variables needed by target THIS in Makefile.am before SOURCES." |
| 455 | nil) | 455 | nil) |
| 456 | 456 | ||
| 457 | (defmethod ede-proj-makefile-insert-automake-post-variables | 457 | (cl-defmethod ede-proj-makefile-insert-automake-post-variables |
| 458 | ((this ede-proj-target)) | 458 | ((this ede-proj-target)) |
| 459 | "Insert variables needed by target THIS in Makefile.am after SOURCES." | 459 | "Insert variables needed by target THIS in Makefile.am after SOURCES." |
| 460 | nil) | 460 | nil) |
| 461 | 461 | ||
| 462 | ;;; GARBAGE PATTERNS | 462 | ;;; GARBAGE PATTERNS |
| 463 | ;; | 463 | ;; |
| 464 | (defmethod ede-proj-makefile-garbage-patterns ((this ede-proj-project)) | 464 | (cl-defmethod ede-proj-makefile-garbage-patterns ((this ede-proj-project)) |
| 465 | "Return a list of patterns that are considered garbage to THIS. | 465 | "Return a list of patterns that are considered garbage to THIS. |
| 466 | These are removed with make clean." | 466 | These are removed with make clean." |
| 467 | (let ((mc (ede-map-targets | 467 | (let ((mc (ede-map-targets |
| @@ -476,7 +476,7 @@ These are removed with make clean." | |||
| 476 | (setq mc (cdr mc))) | 476 | (setq mc (cdr mc))) |
| 477 | (nreverse uniq))) | 477 | (nreverse uniq))) |
| 478 | 478 | ||
| 479 | (defmethod ede-proj-makefile-garbage-patterns ((this ede-proj-target)) | 479 | (cl-defmethod ede-proj-makefile-garbage-patterns ((this ede-proj-target)) |
| 480 | "Return a list of patterns that are considered garbage to THIS. | 480 | "Return a list of patterns that are considered garbage to THIS. |
| 481 | These are removed with make clean." | 481 | These are removed with make clean." |
| 482 | ;; Get the source object from THIS, and use the specified garbage. | 482 | ;; Get the source object from THIS, and use the specified garbage. |
| @@ -490,7 +490,7 @@ These are removed with make clean." | |||
| 490 | 490 | ||
| 491 | ;;; RULES | 491 | ;;; RULES |
| 492 | ;; | 492 | ;; |
| 493 | (defmethod ede-proj-makefile-insert-subproj-rules ((this ede-proj-project)) | 493 | (cl-defmethod ede-proj-makefile-insert-subproj-rules ((this ede-proj-project)) |
| 494 | "Insert a rule for the project THIS which should be a subproject." | 494 | "Insert a rule for the project THIS which should be a subproject." |
| 495 | (insert ".PHONY:" (ede-name this)) | 495 | (insert ".PHONY:" (ede-name this)) |
| 496 | (newline) | 496 | (newline) |
| @@ -501,29 +501,29 @@ These are removed with make clean." | |||
| 501 | (newline) | 501 | (newline) |
| 502 | ) | 502 | ) |
| 503 | 503 | ||
| 504 | (defmethod ede-proj-makefile-insert-rules ((this ede-proj-project)) | 504 | (cl-defmethod ede-proj-makefile-insert-rules ((this ede-proj-project)) |
| 505 | "Insert rules needed by THIS target." | 505 | "Insert rules needed by THIS target." |
| 506 | (mapc 'ede-proj-makefile-insert-rules (oref this inference-rules)) | 506 | (mapc 'ede-proj-makefile-insert-rules (oref this inference-rules)) |
| 507 | ) | 507 | ) |
| 508 | 508 | ||
| 509 | (defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-project)) | 509 | (cl-defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-project)) |
| 510 | "Insert any symbols that the DIST rule should depend on. | 510 | "Insert any symbols that the DIST rule should depend on. |
| 511 | Argument THIS is the project that should insert stuff." | 511 | Argument THIS is the project that should insert stuff." |
| 512 | (mapc 'ede-proj-makefile-insert-dist-dependencies (oref this targets)) | 512 | (mapc 'ede-proj-makefile-insert-dist-dependencies (oref this targets)) |
| 513 | ) | 513 | ) |
| 514 | 514 | ||
| 515 | (defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-target)) | 515 | (cl-defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-target)) |
| 516 | "Insert any symbols that the DIST rule should depend on. | 516 | "Insert any symbols that the DIST rule should depend on. |
| 517 | Argument THIS is the target that should insert stuff." | 517 | Argument THIS is the target that should insert stuff." |
| 518 | nil) | 518 | nil) |
| 519 | 519 | ||
| 520 | (defmethod ede-proj-makefile-insert-dist-filepatterns ((this ede-proj-target)) | 520 | (cl-defmethod ede-proj-makefile-insert-dist-filepatterns ((this ede-proj-target)) |
| 521 | "Insert any symbols that the DIST rule should depend on. | 521 | "Insert any symbols that the DIST rule should depend on. |
| 522 | Argument THIS is the target that should insert stuff." | 522 | Argument THIS is the target that should insert stuff." |
| 523 | (ede-proj-makefile-insert-dist-dependencies this) | 523 | (ede-proj-makefile-insert-dist-dependencies this) |
| 524 | ) | 524 | ) |
| 525 | 525 | ||
| 526 | (defmethod ede-proj-makefile-automake-insert-subdirs ((this ede-proj-project)) | 526 | (cl-defmethod ede-proj-makefile-automake-insert-subdirs ((this ede-proj-project)) |
| 527 | "Insert a SUBDIRS variable for Automake." | 527 | "Insert a SUBDIRS variable for Automake." |
| 528 | (proj-comp-insert-variable-once "SUBDIRS" | 528 | (proj-comp-insert-variable-once "SUBDIRS" |
| 529 | (ede-map-subprojects | 529 | (ede-map-subprojects |
| @@ -531,11 +531,11 @@ Argument THIS is the target that should insert stuff." | |||
| 531 | (insert " " (ede-subproject-relative-path sproj)) | 531 | (insert " " (ede-subproject-relative-path sproj)) |
| 532 | )))) | 532 | )))) |
| 533 | 533 | ||
| 534 | (defmethod ede-proj-makefile-automake-insert-extradist ((this ede-proj-project)) | 534 | (cl-defmethod ede-proj-makefile-automake-insert-extradist ((this ede-proj-project)) |
| 535 | "Insert the EXTRADIST variable entries needed for Automake and EDE." | 535 | "Insert the EXTRADIST variable entries needed for Automake and EDE." |
| 536 | (proj-comp-insert-variable-once "EXTRA_DIST" (insert "Project.ede"))) | 536 | (proj-comp-insert-variable-once "EXTRA_DIST" (insert "Project.ede"))) |
| 537 | 537 | ||
| 538 | (defmethod ede-proj-makefile-insert-dist-rules ((this ede-proj-project)) | 538 | (cl-defmethod ede-proj-makefile-insert-dist-rules ((this ede-proj-project)) |
| 539 | "Insert distribution rules for THIS in a Makefile, such as CLEAN and DIST." | 539 | "Insert distribution rules for THIS in a Makefile, such as CLEAN and DIST." |
| 540 | (let ((junk (ede-proj-makefile-garbage-patterns this)) | 540 | (let ((junk (ede-proj-makefile-garbage-patterns this)) |
| 541 | tmp) | 541 | tmp) |
| @@ -602,11 +602,11 @@ Argument THIS is the target that should insert stuff." | |||
| 602 | "\t@false\n\n" | 602 | "\t@false\n\n" |
| 603 | "\n\n# End of Makefile\n"))) | 603 | "\n\n# End of Makefile\n"))) |
| 604 | 604 | ||
| 605 | (defmethod ede-proj-makefile-insert-rules ((this ede-proj-target)) | 605 | (cl-defmethod ede-proj-makefile-insert-rules ((this ede-proj-target)) |
| 606 | "Insert rules needed by THIS target." | 606 | "Insert rules needed by THIS target." |
| 607 | nil) | 607 | nil) |
| 608 | 608 | ||
| 609 | (defmethod ede-proj-makefile-insert-rules ((this ede-proj-target-makefile)) | 609 | (cl-defmethod ede-proj-makefile-insert-rules ((this ede-proj-target-makefile)) |
| 610 | "Insert rules needed by THIS target." | 610 | "Insert rules needed by THIS target." |
| 611 | (mapc 'ede-proj-makefile-insert-rules (oref this rules)) | 611 | (mapc 'ede-proj-makefile-insert-rules (oref this rules)) |
| 612 | (let ((c (ede-proj-compilers this))) | 612 | (let ((c (ede-proj-compilers this))) |
| @@ -619,7 +619,7 @@ Argument THIS is the target that should insert stuff." | |||
| 619 | (ede-proj-makefile-insert-commands this) | 619 | (ede-proj-makefile-insert-commands this) |
| 620 | ))) | 620 | ))) |
| 621 | 621 | ||
| 622 | (defmethod ede-proj-makefile-insert-commands ((this ede-proj-target-makefile)) | 622 | (cl-defmethod ede-proj-makefile-insert-commands ((this ede-proj-target-makefile)) |
| 623 | "Insert the commands needed by target THIS. | 623 | "Insert the commands needed by target THIS. |
| 624 | For targets, insert the commands needed by the chosen compiler." | 624 | For targets, insert the commands needed by the chosen compiler." |
| 625 | (mapc 'ede-proj-makefile-insert-commands (ede-proj-compilers this)) | 625 | (mapc 'ede-proj-makefile-insert-commands (ede-proj-compilers this)) |
| @@ -627,18 +627,18 @@ For targets, insert the commands needed by the chosen compiler." | |||
| 627 | (mapc 'ede-proj-makefile-insert-commands (ede-proj-linkers this)))) | 627 | (mapc 'ede-proj-makefile-insert-commands (ede-proj-linkers this)))) |
| 628 | 628 | ||
| 629 | 629 | ||
| 630 | (defmethod ede-proj-makefile-insert-user-rules ((this ede-proj-project)) | 630 | (cl-defmethod ede-proj-makefile-insert-user-rules ((this ede-proj-project)) |
| 631 | "Insert user specified rules needed by THIS target. | 631 | "Insert user specified rules needed by THIS target. |
| 632 | This is different from `ede-proj-makefile-insert-rules' in that this | 632 | This is different from `ede-proj-makefile-insert-rules' in that this |
| 633 | function won't create the building rules which are auto created with | 633 | function won't create the building rules which are auto created with |
| 634 | automake." | 634 | automake." |
| 635 | (mapc 'ede-proj-makefile-insert-user-rules (oref this inference-rules))) | 635 | (mapc 'ede-proj-makefile-insert-user-rules (oref this inference-rules))) |
| 636 | 636 | ||
| 637 | (defmethod ede-proj-makefile-insert-user-rules ((this ede-proj-target)) | 637 | (cl-defmethod ede-proj-makefile-insert-user-rules ((this ede-proj-target)) |
| 638 | "Insert user specified rules needed by THIS target." | 638 | "Insert user specified rules needed by THIS target." |
| 639 | (mapc 'ede-proj-makefile-insert-rules (oref this rules))) | 639 | (mapc 'ede-proj-makefile-insert-rules (oref this rules))) |
| 640 | 640 | ||
| 641 | (defmethod ede-proj-makefile-dependencies ((this ede-proj-target-makefile)) | 641 | (cl-defmethod ede-proj-makefile-dependencies ((this ede-proj-target-makefile)) |
| 642 | "Return a string representing the dependencies for THIS. | 642 | "Return a string representing the dependencies for THIS. |
| 643 | Some compilers only use the first element in the dependencies, others | 643 | Some compilers only use the first element in the dependencies, others |
| 644 | have a list of intermediates (object files), and others don't care. | 644 | have a list of intermediates (object files), and others don't care. |
| @@ -667,7 +667,7 @@ This allows customization of how these elements appear." | |||
| 667 | out)))) | 667 | out)))) |
| 668 | 668 | ||
| 669 | ;; Tags | 669 | ;; Tags |
| 670 | (defmethod ede-proj-makefile-tags ((this ede-proj-project) targets) | 670 | (cl-defmethod ede-proj-makefile-tags ((this ede-proj-project) targets) |
| 671 | "Insert into the current location rules to make recursive TAGS files. | 671 | "Insert into the current location rules to make recursive TAGS files. |
| 672 | Argument THIS is the project to create tags for. | 672 | Argument THIS is the project to create tags for. |
| 673 | Argument TARGETS are the targets we should depend on for TAGS." | 673 | 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 ca729cee29e..0c7ffdd1560 100644 --- a/lisp/cedet/ede/proj-archive.el +++ b/lisp/cedet/ede/proj-archive.el | |||
| @@ -43,7 +43,7 @@ | |||
| 43 | :objectextention "") | 43 | :objectextention "") |
| 44 | "Linker object for creating an archive.") | 44 | "Linker object for creating an archive.") |
| 45 | 45 | ||
| 46 | (defmethod ede-proj-makefile-insert-source-variables :BEFORE | 46 | (cl-defmethod ede-proj-makefile-insert-source-variables :before |
| 47 | ((this ede-proj-target-makefile-archive) &optional moresource) | 47 | ((this ede-proj-target-makefile-archive) &optional moresource) |
| 48 | "Insert bin_PROGRAMS variables needed by target THIS. | 48 | "Insert bin_PROGRAMS variables needed by target THIS. |
| 49 | We aren't actually inserting SOURCE details, but this is used by the | 49 | 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." | |||
| 52 | (concat "lib" (ede-name this) "_a_LIBRARIES") | 52 | (concat "lib" (ede-name this) "_a_LIBRARIES") |
| 53 | (insert (concat "lib" (ede-name this) ".a")))) | 53 | (insert (concat "lib" (ede-name this) ".a")))) |
| 54 | 54 | ||
| 55 | (defmethod ede-proj-makefile-garbage-patterns | 55 | (cl-defmethod ede-proj-makefile-garbage-patterns |
| 56 | ((this ede-proj-target-makefile-archive)) | 56 | ((this ede-proj-target-makefile-archive)) |
| 57 | "Add archive name to the garbage patterns. | 57 | "Add archive name to the garbage patterns. |
| 58 | This makes sure that the archive is removed with 'make clean'." | 58 | This makes sure that the archive is removed with 'make clean'." |
| 59 | (let ((garb (call-next-method))) | 59 | (let ((garb (cl-call-next-method))) |
| 60 | (append garb (list (concat "lib" (ede-name this) ".a"))))) | 60 | (append garb (list (concat "lib" (ede-name this) ".a"))))) |
| 61 | 61 | ||
| 62 | (provide 'ede/proj-archive) | 62 | (provide 'ede/proj-archive) |
diff --git a/lisp/cedet/ede/proj-aux.el b/lisp/cedet/ede/proj-aux.el index 266b865ff41..0e76cda1986 100644 --- a/lisp/cedet/ede/proj-aux.el +++ b/lisp/cedet/ede/proj-aux.el | |||
| @@ -39,7 +39,7 @@ | |||
| 39 | :sourcepattern "^[A-Z]+$\\|\\.txt$") | 39 | :sourcepattern "^[A-Z]+$\\|\\.txt$") |
| 40 | "Miscellaneous fields definition.") | 40 | "Miscellaneous fields definition.") |
| 41 | 41 | ||
| 42 | (defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-aux)) | 42 | (cl-defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-aux)) |
| 43 | "Return the variable name for THIS's sources." | 43 | "Return the variable name for THIS's sources." |
| 44 | (concat (ede-pmake-varname this) "_AUX")) | 44 | (concat (ede-pmake-varname this) "_AUX")) |
| 45 | 45 | ||
diff --git a/lisp/cedet/ede/proj-comp.el b/lisp/cedet/ede/proj-comp.el index abe5866de0a..87eae6cb1c0 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.")) | |||
| 173 | This is used when creating a Makefile to prevent duplicate variables and | 173 | This is used when creating a Makefile to prevent duplicate variables and |
| 174 | rules from being created.") | 174 | rules from being created.") |
| 175 | 175 | ||
| 176 | (defmethod initialize-instance :AFTER ((this ede-compiler) &rest fields) | 176 | (cl-defmethod initialize-instance :after ((this ede-compiler) &rest fields) |
| 177 | "Make sure that all ede compiler objects are cached in | 177 | "Make sure that all ede compiler objects are cached in |
| 178 | `ede-compiler-list'." | 178 | `ede-compiler-list'." |
| 179 | (add-to-list 'ede-compiler-list this)) | 179 | (add-to-list 'ede-compiler-list this)) |
| 180 | 180 | ||
| 181 | (defmethod initialize-instance :AFTER ((this ede-linker) &rest fields) | 181 | (cl-defmethod initialize-instance :after ((this ede-linker) &rest fields) |
| 182 | "Make sure that all ede compiler objects are cached in | 182 | "Make sure that all ede compiler objects are cached in |
| 183 | `ede-linker-list'." | 183 | `ede-linker-list'." |
| 184 | (add-to-list 'ede-linker-list this)) | 184 | (add-to-list 'ede-linker-list this)) |
| @@ -235,7 +235,7 @@ This will prevent rules from creating duplicate variables or rules." | |||
| 235 | (car-safe linkers)) | 235 | (car-safe linkers)) |
| 236 | 236 | ||
| 237 | ;;; Methods: | 237 | ;;; Methods: |
| 238 | (defmethod ede-proj-tweak-autoconf ((this ede-compilation-program)) | 238 | (cl-defmethod ede-proj-tweak-autoconf ((this ede-compilation-program)) |
| 239 | "Tweak the configure file (current buffer) to accommodate THIS." | 239 | "Tweak the configure file (current buffer) to accommodate THIS." |
| 240 | (mapcar | 240 | (mapcar |
| 241 | (lambda (obj) | 241 | (lambda (obj) |
| @@ -247,7 +247,7 @@ This will prevent rules from creating duplicate variables or rules." | |||
| 247 | ) | 247 | ) |
| 248 | (oref this autoconf))) | 248 | (oref this autoconf))) |
| 249 | 249 | ||
| 250 | (defmethod ede-proj-flush-autoconf ((this ede-compilation-program)) | 250 | (cl-defmethod ede-proj-flush-autoconf ((this ede-compilation-program)) |
| 251 | "Flush the configure file (current buffer) to accommodate THIS." | 251 | "Flush the configure file (current buffer) to accommodate THIS." |
| 252 | nil) | 252 | nil) |
| 253 | 253 | ||
| @@ -263,7 +263,7 @@ Execute BODY in a location where a value can be placed." | |||
| 263 | )) | 263 | )) |
| 264 | (put 'proj-comp-insert-variable-once 'lisp-indent-function 1) | 264 | (put 'proj-comp-insert-variable-once 'lisp-indent-function 1) |
| 265 | 265 | ||
| 266 | (defmethod ede-proj-makefile-insert-variables ((this ede-compilation-program)) | 266 | (cl-defmethod ede-proj-makefile-insert-variables ((this ede-compilation-program)) |
| 267 | "Insert variables needed by the compiler THIS." | 267 | "Insert variables needed by the compiler THIS." |
| 268 | (if (eieio-instance-inheritor-slot-boundp this 'variables) | 268 | (if (eieio-instance-inheritor-slot-boundp this 'variables) |
| 269 | (with-slots (variables) this | 269 | (with-slots (variables) this |
| @@ -276,19 +276,19 @@ Execute BODY in a location where a value can be placed." | |||
| 276 | (insert cd))))) | 276 | (insert cd))))) |
| 277 | variables)))) | 277 | variables)))) |
| 278 | 278 | ||
| 279 | (defmethod ede-compiler-intermediate-objects-p ((this ede-compiler)) | 279 | (cl-defmethod ede-compiler-intermediate-objects-p ((this ede-compiler)) |
| 280 | "Return non-nil if THIS has intermediate object files. | 280 | "Return non-nil if THIS has intermediate object files. |
| 281 | If this compiler creates code that can be linked together, | 281 | If this compiler creates code that can be linked together, |
| 282 | then the object files created by the compiler are considered intermediate." | 282 | then the object files created by the compiler are considered intermediate." |
| 283 | (oref this uselinker)) | 283 | (oref this uselinker)) |
| 284 | 284 | ||
| 285 | (defmethod ede-compiler-intermediate-object-variable ((this ede-compiler) | 285 | (cl-defmethod ede-compiler-intermediate-object-variable ((this ede-compiler) |
| 286 | targetname) | 286 | targetname) |
| 287 | "Return a string based on THIS representing a make object variable. | 287 | "Return a string based on THIS representing a make object variable. |
| 288 | TARGETNAME is the name of the target that these objects belong to." | 288 | TARGETNAME is the name of the target that these objects belong to." |
| 289 | (concat targetname "_OBJ")) | 289 | (concat targetname "_OBJ")) |
| 290 | 290 | ||
| 291 | (defmethod ede-proj-makefile-insert-object-variables ((this ede-compiler) | 291 | (cl-defmethod ede-proj-makefile-insert-object-variables ((this ede-compiler) |
| 292 | targetname sourcefiles) | 292 | targetname sourcefiles) |
| 293 | "Insert an OBJ variable to specify object code to be generated for THIS. | 293 | "Insert an OBJ variable to specify object code to be generated for THIS. |
| 294 | The name of the target is TARGETNAME as a string. SOURCEFILES is the list of | 294 | The name of the target is TARGETNAME as a string. SOURCEFILES is the list of |
| @@ -312,19 +312,19 @@ Not all compilers do this." | |||
| 312 | sourcefiles) | 312 | sourcefiles) |
| 313 | (insert "\n"))))) | 313 | (insert "\n"))))) |
| 314 | 314 | ||
| 315 | (defmethod ede-proj-makefile-insert-rules ((this ede-compilation-program)) | 315 | (cl-defmethod ede-proj-makefile-insert-rules ((this ede-compilation-program)) |
| 316 | "Insert rules needed for THIS compiler object." | 316 | "Insert rules needed for THIS compiler object." |
| 317 | (ede-compiler-only-once this | 317 | (ede-compiler-only-once this |
| 318 | (mapc 'ede-proj-makefile-insert-rules (oref this rules)))) | 318 | (mapc 'ede-proj-makefile-insert-rules (oref this rules)))) |
| 319 | 319 | ||
| 320 | (defmethod ede-proj-makefile-insert-rules ((this ede-makefile-rule)) | 320 | (cl-defmethod ede-proj-makefile-insert-rules ((this ede-makefile-rule)) |
| 321 | "Insert rules needed for THIS rule object." | 321 | "Insert rules needed for THIS rule object." |
| 322 | (if (oref this phony) (insert ".PHONY: " (oref this target) "\n")) | 322 | (if (oref this phony) (insert ".PHONY: " (oref this target) "\n")) |
| 323 | (insert (oref this target) ": " (oref this dependencies) "\n\t" | 323 | (insert (oref this target) ": " (oref this dependencies) "\n\t" |
| 324 | (mapconcat (lambda (c) c) (oref this rules) "\n\t") | 324 | (mapconcat (lambda (c) c) (oref this rules) "\n\t") |
| 325 | "\n\n")) | 325 | "\n\n")) |
| 326 | 326 | ||
| 327 | (defmethod ede-proj-makefile-insert-commands ((this ede-compilation-program)) | 327 | (cl-defmethod ede-proj-makefile-insert-commands ((this ede-compilation-program)) |
| 328 | "Insert the commands needed to use compiler THIS. | 328 | "Insert the commands needed to use compiler THIS. |
| 329 | The object creating makefile rules must call this method for the | 329 | The object creating makefile rules must call this method for the |
| 330 | compiler it decides to use after inserting in the rule." | 330 | 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 8e01445233e..778d485c44c 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. | |||
| 57 | "This target consists of a group of lisp files. | 57 | "This target consists of a group of lisp files. |
| 58 | A lisp target may be one general program with many separate lisp files in it.") | 58 | A lisp target may be one general program with many separate lisp files in it.") |
| 59 | 59 | ||
| 60 | (defmethod ede-proj-makefile-insert-rules :after ((this ede-proj-target-elisp)) | 60 | (cl-defmethod ede-proj-makefile-insert-rules :after ((this ede-proj-target-elisp)) |
| 61 | "Insert rules needed by THIS target. | 61 | "Insert rules needed by THIS target. |
| 62 | This inserts the PRELOADS target-local variable." | 62 | This inserts the PRELOADS target-local variable." |
| 63 | (let ((preloads (oref this pre-load-packages))) | 63 | (let ((preloads (oref this pre-load-packages))) |
| @@ -67,7 +67,7 @@ This inserts the PRELOADS target-local variable." | |||
| 67 | (mapconcat 'identity preloads " "))))) | 67 | (mapconcat 'identity preloads " "))))) |
| 68 | (insert "\n")) | 68 | (insert "\n")) |
| 69 | 69 | ||
| 70 | (defmethod ede-proj-makefile-dependencies ((this ede-proj-target-elisp)) | 70 | (cl-defmethod ede-proj-makefile-dependencies ((this ede-proj-target-elisp)) |
| 71 | "Return a string representing the dependencies for THIS. | 71 | "Return a string representing the dependencies for THIS. |
| 72 | Some compilers only use the first element in the dependencies, others | 72 | Some compilers only use the first element in the dependencies, others |
| 73 | have a list of intermediates (object files), and others don't care. | 73 | 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." | |||
| 109 | "Compile Emacs Lisp programs with XEmacs.") | 109 | "Compile Emacs Lisp programs with XEmacs.") |
| 110 | 110 | ||
| 111 | ;;; Claiming files | 111 | ;;; Claiming files |
| 112 | (defmethod ede-buffer-mine ((this ede-proj-target-elisp) buffer) | 112 | (cl-defmethod ede-buffer-mine ((this ede-proj-target-elisp) buffer) |
| 113 | "Return t if object THIS lays claim to the file in BUFFER. | 113 | "Return t if object THIS lays claim to the file in BUFFER. |
| 114 | Lays claim to all .elc files that match .el files in this target." | 114 | Lays claim to all .elc files that match .el files in this target." |
| 115 | (if (string-match "\\.elc$" (buffer-file-name buffer)) | 115 | (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." | |||
| 121 | ;; Is this in our list. | 121 | ;; Is this in our list. |
| 122 | (member fname (oref this auxsource)) | 122 | (member fname (oref this auxsource)) |
| 123 | ) | 123 | ) |
| 124 | (call-next-method) ; The usual thing. | 124 | (cl-call-next-method) ; The usual thing. |
| 125 | )) | 125 | )) |
| 126 | 126 | ||
| 127 | ;;; Emacs Lisp Compiler | 127 | ;;; Emacs Lisp Compiler |
| @@ -145,7 +145,7 @@ Lays claim to all .elc files that match .el files in this target." | |||
| 145 | packages (cdr packages)))) | 145 | packages (cdr packages)))) |
| 146 | paths)) | 146 | paths)) |
| 147 | 147 | ||
| 148 | (defmethod project-compile-target ((obj ede-proj-target-elisp)) | 148 | (cl-defmethod project-compile-target ((obj ede-proj-target-elisp)) |
| 149 | "Compile all sources in a Lisp target OBJ. | 149 | "Compile all sources in a Lisp target OBJ. |
| 150 | Bonus: Return a cons cell: (COMPILED . UPTODATE)." | 150 | Bonus: Return a cons cell: (COMPILED . UPTODATE)." |
| 151 | (let* ((proj (ede-target-parent obj)) | 151 | (let* ((proj (ede-target-parent obj)) |
| @@ -173,7 +173,7 @@ Bonus: Return a cons cell: (COMPILED . UPTODATE)." | |||
| 173 | (message "All Emacs Lisp sources are up to date in %s" (eieio-object-name obj)) | 173 | (message "All Emacs Lisp sources are up to date in %s" (eieio-object-name obj)) |
| 174 | (cons comp utd))) | 174 | (cons comp utd))) |
| 175 | 175 | ||
| 176 | (defmethod ede-update-version-in-source ((this ede-proj-target-elisp) version) | 176 | (cl-defmethod ede-update-version-in-source ((this ede-proj-target-elisp) version) |
| 177 | "In a Lisp file, updated a version string for THIS to VERSION. | 177 | "In a Lisp file, updated a version string for THIS to VERSION. |
| 178 | There are standards in Elisp files specifying how the version string | 178 | There are standards in Elisp files specifying how the version string |
| 179 | is found, such as a `-version' variable, or the standard header." | 179 | 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." | |||
| 195 | (insert version))))) | 195 | (insert version))))) |
| 196 | (setq vs (cdr vs))) | 196 | (setq vs (cdr vs))) |
| 197 | ;; The next method will include comments such as "Version:" | 197 | ;; The next method will include comments such as "Version:" |
| 198 | (call-next-method)))) | 198 | (cl-call-next-method)))) |
| 199 | 199 | ||
| 200 | 200 | ||
| 201 | ;;; Makefile generation functions | 201 | ;;; Makefile generation functions |
| 202 | ;; | 202 | ;; |
| 203 | (defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-elisp)) | 203 | (cl-defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-elisp)) |
| 204 | "Return the variable name for THIS's sources." | 204 | "Return the variable name for THIS's sources." |
| 205 | (cond ((ede-proj-automake-p) '("lisp_LISP" . share)) | 205 | (cond ((ede-proj-automake-p) '("lisp_LISP" . share)) |
| 206 | (t (concat (ede-pmake-varname this) "_LISP")))) | 206 | (t (concat (ede-pmake-varname this) "_LISP")))) |
| @@ -219,7 +219,7 @@ is found, such as a `-version' variable, or the standard header." | |||
| 219 | (setq items (cdr items))))) | 219 | (setq items (cdr items))))) |
| 220 | )) | 220 | )) |
| 221 | 221 | ||
| 222 | (defmethod ede-proj-makefile-insert-variables :AFTER ((this ede-proj-target-elisp)) | 222 | (cl-defmethod ede-proj-makefile-insert-variables :after ((this ede-proj-target-elisp)) |
| 223 | "Insert variables needed by target THIS." | 223 | "Insert variables needed by target THIS." |
| 224 | (let ((newitems (if (oref this aux-packages) | 224 | (let ((newitems (if (oref this aux-packages) |
| 225 | (ede-proj-elisp-packages-to-loadpath | 225 | (ede-proj-elisp-packages-to-loadpath |
| @@ -244,9 +244,9 @@ is found, such as a `-version' variable, or the standard header." | |||
| 244 | ) | 244 | ) |
| 245 | (error "Don't know how to update load path")))) | 245 | (error "Don't know how to update load path")))) |
| 246 | 246 | ||
| 247 | (defmethod ede-proj-tweak-autoconf ((this ede-proj-target-elisp)) | 247 | (cl-defmethod ede-proj-tweak-autoconf ((this ede-proj-target-elisp)) |
| 248 | "Tweak the configure file (current buffer) to accommodate THIS." | 248 | "Tweak the configure file (current buffer) to accommodate THIS." |
| 249 | (call-next-method) | 249 | (cl-call-next-method) |
| 250 | ;; Ok, now we have to tweak the autoconf provided `elisp-comp' program. | 250 | ;; Ok, now we have to tweak the autoconf provided `elisp-comp' program. |
| 251 | (let ((ec (ede-expand-filename this "elisp-comp" 'newfile)) | 251 | (let ((ec (ede-expand-filename this "elisp-comp" 'newfile)) |
| 252 | (enable-local-variables nil)) | 252 | (enable-local-variables nil)) |
| @@ -270,7 +270,7 @@ is found, such as a `-version' variable, or the standard header." | |||
| 270 | (save-buffer) | 270 | (save-buffer) |
| 271 | (kill-buffer))))) | 271 | (kill-buffer))))) |
| 272 | 272 | ||
| 273 | (defmethod ede-proj-flush-autoconf ((this ede-proj-target-elisp)) | 273 | (cl-defmethod ede-proj-flush-autoconf ((this ede-proj-target-elisp)) |
| 274 | "Flush the configure file (current buffer) to accommodate THIS." | 274 | "Flush the configure file (current buffer) to accommodate THIS." |
| 275 | ;; Remove crufty old paths from elisp-compile | 275 | ;; Remove crufty old paths from elisp-compile |
| 276 | (let ((ec (ede-expand-filename this "elisp-comp" 'newfile)) | 276 | (let ((ec (ede-expand-filename this "elisp-comp" 'newfile)) |
| @@ -311,14 +311,14 @@ Files do not need to be added to this target.") | |||
| 311 | 311 | ||
| 312 | 312 | ||
| 313 | ;;; Claiming files | 313 | ;;; Claiming files |
| 314 | (defmethod ede-buffer-mine ((this ede-proj-target-elisp-autoloads) buffer) | 314 | (cl-defmethod ede-buffer-mine ((this ede-proj-target-elisp-autoloads) buffer) |
| 315 | "Return t if object THIS lays claim to the file in BUFFER. | 315 | "Return t if object THIS lays claim to the file in BUFFER. |
| 316 | Lays claim to all .elc files that match .el files in this target." | 316 | Lays claim to all .elc files that match .el files in this target." |
| 317 | (if (string-match | 317 | (if (string-match |
| 318 | (concat (regexp-quote (oref this autoload-file)) "$") | 318 | (concat (regexp-quote (oref this autoload-file)) "$") |
| 319 | (buffer-file-name buffer)) | 319 | (buffer-file-name buffer)) |
| 320 | t | 320 | t |
| 321 | (call-next-method) ; The usual thing. | 321 | (cl-call-next-method) ; The usual thing. |
| 322 | )) | 322 | )) |
| 323 | 323 | ||
| 324 | ;; Compilers | 324 | ;; Compilers |
| @@ -338,7 +338,7 @@ Lays claim to all .elc files that match .el files in this target." | |||
| 338 | ) | 338 | ) |
| 339 | "Build an autoloads file.") | 339 | "Build an autoloads file.") |
| 340 | 340 | ||
| 341 | (defmethod ede-proj-compilers ((obj ede-proj-target-elisp-autoloads)) | 341 | (cl-defmethod ede-proj-compilers ((obj ede-proj-target-elisp-autoloads)) |
| 342 | "List of compilers being used by OBJ. | 342 | "List of compilers being used by OBJ. |
| 343 | If the `compiler' slot is empty, get the car of the compilers list." | 343 | If the `compiler' slot is empty, get the car of the compilers list." |
| 344 | (let ((comp (oref obj compiler))) | 344 | (let ((comp (oref obj compiler))) |
| @@ -351,7 +351,7 @@ If the `compiler' slot is empty, get the car of the compilers list." | |||
| 351 | (setq comp (list (car avail))))) | 351 | (setq comp (list (car avail))))) |
| 352 | comp)) | 352 | comp)) |
| 353 | 353 | ||
| 354 | (defmethod ede-proj-makefile-insert-source-variables ((this ede-proj-target-elisp-autoloads) | 354 | (cl-defmethod ede-proj-makefile-insert-source-variables ((this ede-proj-target-elisp-autoloads) |
| 355 | &optional | 355 | &optional |
| 356 | moresource) | 356 | moresource) |
| 357 | "Insert the source variables needed by THIS. | 357 | "Insert the source variables needed by THIS. |
| @@ -359,16 +359,16 @@ Optional argument MORESOURCE is a list of additional sources to add to the | |||
| 359 | sources variable." | 359 | sources variable." |
| 360 | nil) | 360 | nil) |
| 361 | 361 | ||
| 362 | (defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-elisp-autoloads)) | 362 | (cl-defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-elisp-autoloads)) |
| 363 | "Return the variable name for THIS's sources." | 363 | "Return the variable name for THIS's sources." |
| 364 | nil) ; "LOADDEFS") | 364 | nil) ; "LOADDEFS") |
| 365 | 365 | ||
| 366 | (defmethod ede-proj-makefile-dependencies ((this ede-proj-target-elisp-autoloads)) | 366 | (cl-defmethod ede-proj-makefile-dependencies ((this ede-proj-target-elisp-autoloads)) |
| 367 | "Return a string representing the dependencies for THIS. | 367 | "Return a string representing the dependencies for THIS. |
| 368 | Always return an empty string for an autoloads generator." | 368 | Always return an empty string for an autoloads generator." |
| 369 | "") | 369 | "") |
| 370 | 370 | ||
| 371 | (defmethod ede-proj-makefile-insert-variables :AFTER ((this ede-proj-target-elisp-autoloads)) | 371 | (cl-defmethod ede-proj-makefile-insert-variables :after ((this ede-proj-target-elisp-autoloads)) |
| 372 | "Insert variables needed by target THIS." | 372 | "Insert variables needed by target THIS." |
| 373 | (ede-pmake-insert-variable-shared "LOADDEFS" | 373 | (ede-pmake-insert-variable-shared "LOADDEFS" |
| 374 | (insert (oref this autoload-file))) | 374 | (insert (oref this autoload-file))) |
| @@ -378,7 +378,7 @@ Always return an empty string for an autoloads generator." | |||
| 378 | " "))) | 378 | " "))) |
| 379 | ) | 379 | ) |
| 380 | 380 | ||
| 381 | (defmethod project-compile-target ((obj ede-proj-target-elisp-autoloads)) | 381 | (cl-defmethod project-compile-target ((obj ede-proj-target-elisp-autoloads)) |
| 382 | "Create or update the autoload target." | 382 | "Create or update the autoload target." |
| 383 | (require 'cedet-autogen) | 383 | (require 'cedet-autogen) |
| 384 | (let ((default-directory (ede-expand-filename obj "."))) | 384 | (let ((default-directory (ede-expand-filename obj "."))) |
| @@ -387,13 +387,13 @@ Always return an empty string for an autoloads generator." | |||
| 387 | (oref obj autoload-dirs)) | 387 | (oref obj autoload-dirs)) |
| 388 | )) | 388 | )) |
| 389 | 389 | ||
| 390 | (defmethod ede-update-version-in-source ((this ede-proj-target-elisp-autoloads) version) | 390 | (cl-defmethod ede-update-version-in-source ((this ede-proj-target-elisp-autoloads) version) |
| 391 | "In a Lisp file, updated a version string for THIS to VERSION. | 391 | "In a Lisp file, updated a version string for THIS to VERSION. |
| 392 | There are standards in Elisp files specifying how the version string | 392 | There are standards in Elisp files specifying how the version string |
| 393 | is found, such as a `-version' variable, or the standard header." | 393 | is found, such as a `-version' variable, or the standard header." |
| 394 | nil) | 394 | nil) |
| 395 | 395 | ||
| 396 | (defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-target-elisp-autoloads)) | 396 | (cl-defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-target-elisp-autoloads)) |
| 397 | "Insert any symbols that the DIST rule should depend on. | 397 | "Insert any symbols that the DIST rule should depend on. |
| 398 | Emacs Lisp autoload files ship the generated .el files. | 398 | Emacs Lisp autoload files ship the generated .el files. |
| 399 | Argument THIS is the target which needs to insert an info file." | 399 | 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." | |||
| 402 | (insert " " (ede-proj-makefile-target-name this)) | 402 | (insert " " (ede-proj-makefile-target-name this)) |
| 403 | ) | 403 | ) |
| 404 | 404 | ||
| 405 | (defmethod ede-proj-makefile-insert-dist-filepatterns ((this ede-proj-target-elisp-autoloads)) | 405 | (cl-defmethod ede-proj-makefile-insert-dist-filepatterns ((this ede-proj-target-elisp-autoloads)) |
| 406 | "Insert any symbols that the DIST rule should distribute. | 406 | "Insert any symbols that the DIST rule should distribute. |
| 407 | Emacs Lisp autoload files ship the generated .el files. | 407 | Emacs Lisp autoload files ship the generated .el files. |
| 408 | Argument THIS is the target which needs to insert an info file." | 408 | Argument THIS is the target which needs to insert an info file." |
| 409 | (insert " " (oref this autoload-file)) | 409 | (insert " " (oref this autoload-file)) |
| 410 | ) | 410 | ) |
| 411 | 411 | ||
| 412 | (defmethod ede-proj-tweak-autoconf ((this ede-proj-target-elisp-autoloads)) | 412 | (cl-defmethod ede-proj-tweak-autoconf ((this ede-proj-target-elisp-autoloads)) |
| 413 | "Tweak the configure file (current buffer) to accommodate THIS." | 413 | "Tweak the configure file (current buffer) to accommodate THIS." |
| 414 | (error "Autoloads not supported in autoconf yet")) | 414 | (error "Autoloads not supported in autoconf yet")) |
| 415 | 415 | ||
| 416 | (defmethod ede-proj-flush-autoconf ((this ede-proj-target-elisp-autoloads)) | 416 | (cl-defmethod ede-proj-flush-autoconf ((this ede-proj-target-elisp-autoloads)) |
| 417 | "Flush the configure file (current buffer) to accommodate THIS." | 417 | "Flush the configure file (current buffer) to accommodate THIS." |
| 418 | nil) | 418 | nil) |
| 419 | 419 | ||
diff --git a/lisp/cedet/ede/proj-info.el b/lisp/cedet/ede/proj-info.el index 692b51b702f..a5031ae8758 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.")) | |||
| 72 | 72 | ||
| 73 | ;;; Makefile generation | 73 | ;;; Makefile generation |
| 74 | ;; | 74 | ;; |
| 75 | (defmethod ede-proj-configure-add-missing | 75 | (cl-defmethod ede-proj-configure-add-missing |
| 76 | ((this ede-proj-target-makefile-info)) | 76 | ((this ede-proj-target-makefile-info)) |
| 77 | "Query if any files needed by THIS provided by automake are missing. | 77 | "Query if any files needed by THIS provided by automake are missing. |
| 78 | Results in --add-missing being passed to automake." | 78 | Results in --add-missing being passed to automake." |
| 79 | (not (ede-expand-filename (ede-toplevel) "texinfo.tex"))) | 79 | (not (ede-expand-filename (ede-toplevel) "texinfo.tex"))) |
| 80 | 80 | ||
| 81 | (defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-makefile-info)) | 81 | (cl-defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-makefile-info)) |
| 82 | "Return the variable name for THIS's sources." | 82 | "Return the variable name for THIS's sources." |
| 83 | (concat (ede-pmake-varname this) "_TEXINFOS")) | 83 | (concat (ede-pmake-varname this) "_TEXINFOS")) |
| 84 | 84 | ||
| 85 | (defmethod ede-proj-makefile-insert-source-variables | 85 | (cl-defmethod ede-proj-makefile-insert-source-variables |
| 86 | ((this ede-proj-target-makefile-info) &optional moresource) | 86 | ((this ede-proj-target-makefile-info) &optional moresource) |
| 87 | "Insert the source variables needed by THIS info target. | 87 | "Insert the source variables needed by THIS info target. |
| 88 | Optional argument MORESOURCE is a list of additional sources to add to the | 88 | Optional argument MORESOURCE is a list of additional sources to add to the |
| @@ -90,7 +90,7 @@ sources variable. | |||
| 90 | Does the usual for Makefile mode, but splits source into two variables | 90 | Does the usual for Makefile mode, but splits source into two variables |
| 91 | when working in Automake mode." | 91 | when working in Automake mode." |
| 92 | (if (not (ede-proj-automake-p)) | 92 | (if (not (ede-proj-automake-p)) |
| 93 | (call-next-method) | 93 | (cl-call-next-method) |
| 94 | (let* ((sv (ede-proj-makefile-sourcevar this)) | 94 | (let* ((sv (ede-proj-makefile-sourcevar this)) |
| 95 | (src (copy-sequence (oref this source))) | 95 | (src (copy-sequence (oref this source))) |
| 96 | (menu (or (oref this menu) (car src)))) | 96 | (menu (or (oref this menu) (car src)))) |
| @@ -119,7 +119,7 @@ when working in Automake mode." | |||
| 119 | (kill-buffer buffer)) | 119 | (kill-buffer buffer)) |
| 120 | info)) | 120 | info)) |
| 121 | 121 | ||
| 122 | (defmethod ede-proj-makefile-target-name ((this ede-proj-target-makefile-info)) | 122 | (cl-defmethod ede-proj-makefile-target-name ((this ede-proj-target-makefile-info)) |
| 123 | "Return the name of the main target for THIS target." | 123 | "Return the name of the main target for THIS target." |
| 124 | ;; The target should be the main-menu file name translated to .info. | 124 | ;; The target should be the main-menu file name translated to .info. |
| 125 | (let* ((source (if (not (string= (oref this mainmenu) "")) | 125 | (let* ((source (if (not (string= (oref this mainmenu) "")) |
| @@ -128,7 +128,7 @@ when working in Automake mode." | |||
| 128 | (info (ede-makeinfo-find-info-filename source))) | 128 | (info (ede-makeinfo-find-info-filename source))) |
| 129 | (concat (or info (file-name-sans-extension source)) ".info"))) | 129 | (concat (or info (file-name-sans-extension source)) ".info"))) |
| 130 | 130 | ||
| 131 | (defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-target-makefile-info)) | 131 | (cl-defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-target-makefile-info)) |
| 132 | "Insert any symbols that the DIST rule should depend on. | 132 | "Insert any symbols that the DIST rule should depend on. |
| 133 | Texinfo files want to insert generated `.info' files. | 133 | Texinfo files want to insert generated `.info' files. |
| 134 | Argument THIS is the target which needs to insert an info file." | 134 | 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." | |||
| 137 | (insert " " (ede-proj-makefile-target-name this)) | 137 | (insert " " (ede-proj-makefile-target-name this)) |
| 138 | ) | 138 | ) |
| 139 | 139 | ||
| 140 | (defmethod ede-proj-makefile-insert-dist-filepatterns ((this ede-proj-target-makefile-info)) | 140 | (cl-defmethod ede-proj-makefile-insert-dist-filepatterns ((this ede-proj-target-makefile-info)) |
| 141 | "Insert any symbols that the DIST rule should depend on. | 141 | "Insert any symbols that the DIST rule should depend on. |
| 142 | Texinfo files want to insert generated `.info' files. | 142 | Texinfo files want to insert generated `.info' files. |
| 143 | Argument THIS is the target which needs to insert an info file." | 143 | 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." | |||
| 151 | ; n | 151 | ; n |
| 152 | ; (concat n ".info")))) | 152 | ; (concat n ".info")))) |
| 153 | 153 | ||
| 154 | (defmethod object-write ((this ede-proj-target-makefile-info)) | 154 | (cl-defmethod object-write ((this ede-proj-target-makefile-info)) |
| 155 | "Before committing any change to THIS, make sure the mainmenu is first." | 155 | "Before committing any change to THIS, make sure the mainmenu is first." |
| 156 | (let ((mm (oref this mainmenu)) | 156 | (let ((mm (oref this mainmenu)) |
| 157 | (s (oref this source)) | 157 | (s (oref this source)) |
| @@ -161,9 +161,9 @@ Argument THIS is the target which needs to insert an info file." | |||
| 161 | ;; Make sure that MM is first in the list of items. | 161 | ;; Make sure that MM is first in the list of items. |
| 162 | (setq nl (cons mm (delq mm s))) | 162 | (setq nl (cons mm (delq mm s))) |
| 163 | (oset this source nl))) | 163 | (oset this source nl))) |
| 164 | (call-next-method)) | 164 | (cl-call-next-method)) |
| 165 | 165 | ||
| 166 | (defmethod ede-documentation ((this ede-proj-target-makefile-info)) | 166 | (cl-defmethod ede-documentation ((this ede-proj-target-makefile-info)) |
| 167 | "Return a list of files that provides documentation. | 167 | "Return a list of files that provides documentation. |
| 168 | Documentation is not for object THIS, but is provided by THIS for other | 168 | Documentation is not for object THIS, but is provided by THIS for other |
| 169 | files in the project." | 169 | files in the project." |
diff --git a/lisp/cedet/ede/proj-misc.el b/lisp/cedet/ede/proj-misc.el index 3514189f4d5..c04c9bd78cc 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.") | |||
| 65 | ) | 65 | ) |
| 66 | "Compile code via a sub-makefile.") | 66 | "Compile code via a sub-makefile.") |
| 67 | 67 | ||
| 68 | (defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-makefile-miscelaneous)) | 68 | (cl-defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-makefile-miscelaneous)) |
| 69 | "Return the variable name for THIS's sources." | 69 | "Return the variable name for THIS's sources." |
| 70 | (concat (ede-pmake-varname this) "_MISC")) | 70 | (concat (ede-pmake-varname this) "_MISC")) |
| 71 | 71 | ||
| 72 | (defmethod ede-proj-makefile-dependency-files | 72 | (cl-defmethod ede-proj-makefile-dependency-files |
| 73 | ((this ede-proj-target-makefile-miscelaneous)) | 73 | ((this ede-proj-target-makefile-miscelaneous)) |
| 74 | "Return a list of files which THIS target depends on." | 74 | "Return a list of files which THIS target depends on." |
| 75 | (with-slots (submakefile) this | 75 | (with-slots (submakefile) this |
| @@ -79,7 +79,7 @@ All listed sources are included in the distribution.") | |||
| 79 | nil) | 79 | nil) |
| 80 | (t (list submakefile))))) | 80 | (t (list submakefile))))) |
| 81 | 81 | ||
| 82 | (defmethod ede-proj-makefile-insert-rules ((this ede-proj-target-makefile-miscelaneous)) | 82 | (cl-defmethod ede-proj-makefile-insert-rules ((this ede-proj-target-makefile-miscelaneous)) |
| 83 | "Create the make rule needed to create an archive for THIS." | 83 | "Create the make rule needed to create an archive for THIS." |
| 84 | ;; DO NOT call the next method. We will never have any compilers, | 84 | ;; DO NOT call the next method. We will never have any compilers, |
| 85 | ;; or any dependencies, or stuff like this. This rule will let us | 85 | ;; 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 b137aee836f..de06910f75e 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.") | |||
| 275 | 275 | ||
| 276 | ;;; The EDE object compiler | 276 | ;;; The EDE object compiler |
| 277 | ;; | 277 | ;; |
| 278 | (defmethod ede-proj-makefile-insert-variables ((this ede-object-compiler)) | 278 | (cl-defmethod ede-proj-makefile-insert-variables ((this ede-object-compiler)) |
| 279 | "Insert variables needed by the compiler THIS." | 279 | "Insert variables needed by the compiler THIS." |
| 280 | (call-next-method) | 280 | (cl-call-next-method) |
| 281 | (if (eieio-instance-inheritor-slot-boundp this 'dependencyvar) | 281 | (if (eieio-instance-inheritor-slot-boundp this 'dependencyvar) |
| 282 | (with-slots (dependencyvar) this | 282 | (with-slots (dependencyvar) this |
| 283 | (insert (car dependencyvar) "=") | 283 | (insert (car dependencyvar) "=") |
| @@ -289,30 +289,30 @@ No garbage pattern since it creates C or C++ code.") | |||
| 289 | 289 | ||
| 290 | ;;; EDE Object target type methods | 290 | ;;; EDE Object target type methods |
| 291 | ;; | 291 | ;; |
| 292 | (defmethod ede-proj-makefile-sourcevar | 292 | (cl-defmethod ede-proj-makefile-sourcevar |
| 293 | ((this ede-proj-target-makefile-objectcode)) | 293 | ((this ede-proj-target-makefile-objectcode)) |
| 294 | "Return the variable name for THIS's sources." | 294 | "Return the variable name for THIS's sources." |
| 295 | (require 'ede/pmake) | 295 | (require 'ede/pmake) |
| 296 | (concat (ede-pmake-varname this) "_SOURCES")) | 296 | (concat (ede-pmake-varname this) "_SOURCES")) |
| 297 | 297 | ||
| 298 | (defmethod ede-proj-makefile-dependency-files | 298 | (cl-defmethod ede-proj-makefile-dependency-files |
| 299 | ((this ede-proj-target-makefile-objectcode)) | 299 | ((this ede-proj-target-makefile-objectcode)) |
| 300 | "Return a list of source files to convert to dependencies. | 300 | "Return a list of source files to convert to dependencies. |
| 301 | Argument THIS is the target to get sources from." | 301 | Argument THIS is the target to get sources from." |
| 302 | (append (oref this source) (oref this auxsource))) | 302 | (append (oref this source) (oref this auxsource))) |
| 303 | 303 | ||
| 304 | (defmethod ede-proj-makefile-insert-variables ((this ede-proj-target-makefile-objectcode) | 304 | (cl-defmethod ede-proj-makefile-insert-variables ((this ede-proj-target-makefile-objectcode) |
| 305 | &optional moresource) | 305 | &optional moresource) |
| 306 | "Insert variables needed by target THIS. | 306 | "Insert variables needed by target THIS. |
| 307 | Optional argument MORESOURCE is not used." | 307 | Optional argument MORESOURCE is not used." |
| 308 | (let ((ede-proj-objectcode-dodependencies | 308 | (let ((ede-proj-objectcode-dodependencies |
| 309 | (oref (ede-target-parent this) automatic-dependencies))) | 309 | (oref (ede-target-parent this) automatic-dependencies))) |
| 310 | (call-next-method))) | 310 | (cl-call-next-method))) |
| 311 | 311 | ||
| 312 | (defmethod ede-buffer-header-file((this ede-proj-target-makefile-objectcode) | 312 | (cl-defmethod ede-buffer-header-file((this ede-proj-target-makefile-objectcode) |
| 313 | buffer) | 313 | buffer) |
| 314 | "There are no default header files." | 314 | "There are no default header files." |
| 315 | (or (call-next-method) | 315 | (or (cl-call-next-method) |
| 316 | ;; Ok, nothing obvious. Try looking in ourselves. | 316 | ;; Ok, nothing obvious. Try looking in ourselves. |
| 317 | (let ((h (oref this auxsource))) | 317 | (let ((h (oref this auxsource))) |
| 318 | ;; Add more logic here when the problem is better understood. | 318 | ;; 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 6a5c3c0730c..b1b26d4d1f4 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." | |||
| 69 | ) | 69 | ) |
| 70 | "This target is an executable program.") | 70 | "This target is an executable program.") |
| 71 | 71 | ||
| 72 | (defmethod ede-proj-makefile-insert-automake-pre-variables | 72 | (cl-defmethod ede-proj-makefile-insert-automake-pre-variables |
| 73 | ((this ede-proj-target-makefile-program)) | 73 | ((this ede-proj-target-makefile-program)) |
| 74 | "Insert bin_PROGRAMS variables needed by target THIS." | 74 | "Insert bin_PROGRAMS variables needed by target THIS." |
| 75 | (ede-pmake-insert-variable-shared "bin_PROGRAMS" | 75 | (ede-pmake-insert-variable-shared "bin_PROGRAMS" |
| 76 | (insert (ede-name this))) | 76 | (insert (ede-name this))) |
| 77 | (call-next-method)) | 77 | (cl-call-next-method)) |
| 78 | 78 | ||
| 79 | (defmethod ede-proj-makefile-insert-automake-post-variables | 79 | (cl-defmethod ede-proj-makefile-insert-automake-post-variables |
| 80 | ((this ede-proj-target-makefile-program)) | 80 | ((this ede-proj-target-makefile-program)) |
| 81 | "Insert bin_PROGRAMS variables needed by target THIS." | 81 | "Insert bin_PROGRAMS variables needed by target THIS." |
| 82 | (ede-pmake-insert-variable-shared | 82 | (ede-pmake-insert-variable-shared |
| @@ -86,11 +86,11 @@ Note: Currently only used for Automake projects." | |||
| 86 | (when (oref this ldlibs) | 86 | (when (oref this ldlibs) |
| 87 | (mapc (lambda (d) (insert " -l" d)) (oref this ldlibs))) | 87 | (mapc (lambda (d) (insert " -l" d)) (oref this ldlibs))) |
| 88 | ) | 88 | ) |
| 89 | (call-next-method)) | 89 | (cl-call-next-method)) |
| 90 | 90 | ||
| 91 | (defmethod ede-proj-makefile-insert-variables ((this ede-proj-target-makefile-program)) | 91 | (cl-defmethod ede-proj-makefile-insert-variables ((this ede-proj-target-makefile-program)) |
| 92 | "Insert variables needed by the compiler THIS." | 92 | "Insert variables needed by the compiler THIS." |
| 93 | (call-next-method) | 93 | (cl-call-next-method) |
| 94 | (let ((lf (mapconcat 'identity (oref this ldflags) " "))) | 94 | (let ((lf (mapconcat 'identity (oref this ldflags) " "))) |
| 95 | (with-slots (ldlibs) this | 95 | (with-slots (ldlibs) this |
| 96 | (if ldlibs | 96 | (if ldlibs |
| @@ -100,7 +100,7 @@ Note: Currently only used for Automake projects." | |||
| 100 | (when (and lf (not (string= "" lf))) | 100 | (when (and lf (not (string= "" lf))) |
| 101 | (ede-pmake-insert-variable-once "LDDEPS" (insert lf))))) | 101 | (ede-pmake-insert-variable-once "LDDEPS" (insert lf))))) |
| 102 | 102 | ||
| 103 | (defmethod project-debug-target ((obj ede-proj-target-makefile-program)) | 103 | (cl-defmethod project-debug-target ((obj ede-proj-target-makefile-program)) |
| 104 | "Debug a program target OBJ." | 104 | "Debug a program target OBJ." |
| 105 | (let ((tb (get-buffer-create " *padt*")) | 105 | (let ((tb (get-buffer-create " *padt*")) |
| 106 | (dd (if (not (string= (oref obj path) "")) | 106 | (dd (if (not (string= (oref obj path) "")) |
| @@ -118,7 +118,7 @@ Note: Currently only used for Automake projects." | |||
| 118 | (funcall ede-debug-program-function cmd)) | 118 | (funcall ede-debug-program-function cmd)) |
| 119 | (kill-buffer tb)))) | 119 | (kill-buffer tb)))) |
| 120 | 120 | ||
| 121 | (defmethod project-run-target ((obj ede-proj-target-makefile-program) &optional command) | 121 | (cl-defmethod project-run-target ((obj ede-proj-target-makefile-program) &optional command) |
| 122 | "Run a program target OBJ. | 122 | "Run a program target OBJ. |
| 123 | Optional COMMAND is the command to run in place of asking the user." | 123 | Optional COMMAND is the command to run in place of asking the user." |
| 124 | (require 'ede/shell) | 124 | (require 'ede/shell) |
diff --git a/lisp/cedet/ede/proj-scheme.el b/lisp/cedet/ede/proj-scheme.el index b7ba1cfd209..5877bb98e6d 100644 --- a/lisp/cedet/ede/proj-scheme.el +++ b/lisp/cedet/ede/proj-scheme.el | |||
| @@ -40,7 +40,7 @@ | |||
| 40 | ) | 40 | ) |
| 41 | "This target consists of scheme files.") | 41 | "This target consists of scheme files.") |
| 42 | 42 | ||
| 43 | (defmethod ede-proj-tweak-autoconf ((this ede-proj-target-scheme)) | 43 | (cl-defmethod ede-proj-tweak-autoconf ((this ede-proj-target-scheme)) |
| 44 | "Tweak the configure file (current buffer) to accommodate THIS." | 44 | "Tweak the configure file (current buffer) to accommodate THIS." |
| 45 | (autoconf-insert-new-macro "AM_INIT_GUILE_MODULE")) | 45 | (autoconf-insert-new-macro "AM_INIT_GUILE_MODULE")) |
| 46 | 46 | ||
diff --git a/lisp/cedet/ede/proj-shared.el b/lisp/cedet/ede/proj-shared.el index 37999a37593..dfd44ac07c6 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.") | |||
| 171 | "\t@-rm -f .deps/$(*F).p\n\n")) | 171 | "\t@-rm -f .deps/$(*F).p\n\n")) |
| 172 | ) | 172 | ) |
| 173 | 173 | ||
| 174 | (defmethod ede-proj-configure-add-missing | 174 | (cl-defmethod ede-proj-configure-add-missing |
| 175 | ((this ede-proj-target-makefile-shared-object)) | 175 | ((this ede-proj-target-makefile-shared-object)) |
| 176 | "Query if any files needed by THIS provided by automake are missing. | 176 | "Query if any files needed by THIS provided by automake are missing. |
| 177 | Results in --add-missing being passed to automake." | 177 | Results in --add-missing being passed to automake." |
| 178 | (not (and (ede-expand-filename (ede-toplevel) "ltconfig") | 178 | (not (and (ede-expand-filename (ede-toplevel) "ltconfig") |
| 179 | (ede-expand-filename (ede-toplevel) "ltmain.sh")))) | 179 | (ede-expand-filename (ede-toplevel) "ltmain.sh")))) |
| 180 | 180 | ||
| 181 | (defmethod ede-proj-makefile-insert-automake-pre-variables | 181 | (cl-defmethod ede-proj-makefile-insert-automake-pre-variables |
| 182 | ((this ede-proj-target-makefile-shared-object)) | 182 | ((this ede-proj-target-makefile-shared-object)) |
| 183 | "Insert bin_PROGRAMS variables needed by target THIS. | 183 | "Insert bin_PROGRAMS variables needed by target THIS. |
| 184 | We aren't actually inserting SOURCE details, but this is used by the | 184 | 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." | |||
| 186 | (ede-pmake-insert-variable-shared "lib_LTLIBRARIES" | 186 | (ede-pmake-insert-variable-shared "lib_LTLIBRARIES" |
| 187 | (insert (concat "lib" (ede-name this) ".la")))) | 187 | (insert (concat "lib" (ede-name this) ".la")))) |
| 188 | 188 | ||
| 189 | (defmethod ede-proj-makefile-insert-automake-post-variables | 189 | (cl-defmethod ede-proj-makefile-insert-automake-post-variables |
| 190 | ((this ede-proj-target-makefile-shared-object)) | 190 | ((this ede-proj-target-makefile-shared-object)) |
| 191 | "Insert bin_PROGRAMS variables needed by target THIS. | 191 | "Insert bin_PROGRAMS variables needed by target THIS. |
| 192 | We need to override -program which has an LDADD element." | 192 | We need to override -program which has an LDADD element." |
| 193 | nil) | 193 | nil) |
| 194 | 194 | ||
| 195 | (defmethod ede-proj-makefile-target-name ((this ede-proj-target-makefile-shared-object)) | 195 | (cl-defmethod ede-proj-makefile-target-name ((this ede-proj-target-makefile-shared-object)) |
| 196 | "Return the name of the main target for THIS target." | 196 | "Return the name of the main target for THIS target." |
| 197 | ;; We need some platform gunk to make the .so change to .sl, or .a, | 197 | ;; We need some platform gunk to make the .so change to .sl, or .a, |
| 198 | ;; depending on the platform we are going to compile against. | 198 | ;; depending on the platform we are going to compile against. |
| 199 | (concat "lib" (ede-name this) ".la")) | 199 | (concat "lib" (ede-name this) ".la")) |
| 200 | 200 | ||
| 201 | (defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-makefile-shared-object)) | 201 | (cl-defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-makefile-shared-object)) |
| 202 | "Return the variable name for THIS's sources." | 202 | "Return the variable name for THIS's sources." |
| 203 | (if (eq (oref (ede-target-parent this) makefile-type) 'Makefile.am) | 203 | (if (eq (oref (ede-target-parent this) makefile-type) 'Makefile.am) |
| 204 | (concat "lib" (oref this name) "_la_SOURCES") | 204 | (concat "lib" (oref this name) "_la_SOURCES") |
| 205 | (call-next-method))) | 205 | (cl-call-next-method))) |
| 206 | 206 | ||
| 207 | 207 | ||
| 208 | (provide 'ede/proj-shared) | 208 | (provide 'ede/proj-shared) |
diff --git a/lisp/cedet/ede/proj.el b/lisp/cedet/ede/proj.el index fd789b3857d..7caee08893a 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." | |||
| 329 | ;; Restore the directory slot | 329 | ;; Restore the directory slot |
| 330 | (oset project directory cdir))) )) | 330 | (oset project directory cdir))) )) |
| 331 | 331 | ||
| 332 | (defmethod ede-commit-local-variables ((proj ede-proj-project)) | 332 | (cl-defmethod ede-commit-local-variables ((proj ede-proj-project)) |
| 333 | "Commit change to local variables in PROJ." | 333 | "Commit change to local variables in PROJ." |
| 334 | (ede-proj-save proj)) | 334 | (ede-proj-save proj)) |
| 335 | 335 | ||
| 336 | (defmethod eieio-done-customizing ((proj ede-proj-project)) | 336 | (cl-defmethod eieio-done-customizing ((proj ede-proj-project)) |
| 337 | "Call this when a user finishes customizing this object. | 337 | "Call this when a user finishes customizing this object. |
| 338 | Argument PROJ is the project to save." | 338 | Argument PROJ is the project to save." |
| 339 | (call-next-method) | 339 | (cl-call-next-method) |
| 340 | (ede-proj-save proj)) | 340 | (ede-proj-save proj)) |
| 341 | 341 | ||
| 342 | (defmethod eieio-done-customizing ((target ede-proj-target)) | 342 | (cl-defmethod eieio-done-customizing ((target ede-proj-target)) |
| 343 | "Call this when a user finishes customizing this object. | 343 | "Call this when a user finishes customizing this object. |
| 344 | Argument TARGET is the project we are completing customization on." | 344 | Argument TARGET is the project we are completing customization on." |
| 345 | (call-next-method) | 345 | (cl-call-next-method) |
| 346 | (ede-proj-save (ede-current-project))) | 346 | (ede-proj-save (ede-current-project))) |
| 347 | 347 | ||
| 348 | (defmethod ede-commit-project ((proj ede-proj-project)) | 348 | (cl-defmethod ede-commit-project ((proj ede-proj-project)) |
| 349 | "Commit any change to PROJ to its file." | 349 | "Commit any change to PROJ to its file." |
| 350 | (ede-proj-save proj)) | 350 | (ede-proj-save proj)) |
| 351 | 351 | ||
| 352 | (defmethod ede-buffer-mine ((this ede-proj-project) buffer) | 352 | (cl-defmethod ede-buffer-mine ((this ede-proj-project) buffer) |
| 353 | "Return t if object THIS lays claim to the file in BUFFER." | 353 | "Return t if object THIS lays claim to the file in BUFFER." |
| 354 | (let ((f (ede-convert-path this (buffer-file-name buffer)))) | 354 | (let ((f (ede-convert-path this (buffer-file-name buffer)))) |
| 355 | (or (string= (file-name-nondirectory (oref this file)) f) | 355 | (or (string= (file-name-nondirectory (oref this file)) f) |
| @@ -360,9 +360,9 @@ Argument TARGET is the project we are completing customization on." | |||
| 360 | (member f '("AUTHORS" "NEWS" "COPYING" "INSTALL" "README")) | 360 | (member f '("AUTHORS" "NEWS" "COPYING" "INSTALL" "README")) |
| 361 | ))) | 361 | ))) |
| 362 | 362 | ||
| 363 | (defmethod ede-buffer-mine ((this ede-proj-target) buffer) | 363 | (cl-defmethod ede-buffer-mine ((this ede-proj-target) buffer) |
| 364 | "Return t if object THIS lays claim to the file in BUFFER." | 364 | "Return t if object THIS lays claim to the file in BUFFER." |
| 365 | (or (call-next-method) | 365 | (or (cl-call-next-method) |
| 366 | (ede-target-buffer-in-sourcelist this buffer (oref this auxsource)))) | 366 | (ede-target-buffer-in-sourcelist this buffer (oref this auxsource)))) |
| 367 | 367 | ||
| 368 | 368 | ||
| @@ -371,7 +371,7 @@ Argument TARGET is the project we are completing customization on." | |||
| 371 | (defvar ede-proj-target-history nil | 371 | (defvar ede-proj-target-history nil |
| 372 | "History when querying for a target type.") | 372 | "History when querying for a target type.") |
| 373 | 373 | ||
| 374 | (defmethod project-new-target ((this ede-proj-project) | 374 | (cl-defmethod project-new-target ((this ede-proj-project) |
| 375 | &optional name type autoadd) | 375 | &optional name type autoadd) |
| 376 | "Create a new target in THIS based on the current buffer." | 376 | "Create a new target in THIS based on the current buffer." |
| 377 | (let* ((name (or name (read-string "Name: " ""))) | 377 | (let* ((name (or name (read-string "Name: " ""))) |
| @@ -409,7 +409,7 @@ Argument TARGET is the project we are completing customization on." | |||
| 409 | ;; And save | 409 | ;; And save |
| 410 | (ede-proj-save this))) | 410 | (ede-proj-save this))) |
| 411 | 411 | ||
| 412 | (defmethod project-new-target-custom ((this ede-proj-project)) | 412 | (cl-defmethod project-new-target-custom ((this ede-proj-project)) |
| 413 | "Create a new target in THIS for custom." | 413 | "Create a new target in THIS for custom." |
| 414 | (let* ((name (read-string "Name: " "")) | 414 | (let* ((name (read-string "Name: " "")) |
| 415 | (type (completing-read "Type: " ede-proj-target-alist | 415 | (type (completing-read "Type: " ede-proj-target-alist |
| @@ -418,7 +418,7 @@ Argument TARGET is the project we are completing customization on." | |||
| 418 | :path (ede-convert-path this default-directory) | 418 | :path (ede-convert-path this default-directory) |
| 419 | :source nil))) | 419 | :source nil))) |
| 420 | 420 | ||
| 421 | (defmethod project-delete-target ((this ede-proj-target)) | 421 | (cl-defmethod project-delete-target ((this ede-proj-target)) |
| 422 | "Delete the current target THIS from its parent project." | 422 | "Delete the current target THIS from its parent project." |
| 423 | (let ((p (ede-current-project)) | 423 | (let ((p (ede-current-project)) |
| 424 | (ts (oref this source))) | 424 | (ts (oref this source))) |
| @@ -439,7 +439,7 @@ Argument TARGET is the project we are completing customization on." | |||
| 439 | (oset p targets (delq this (oref p targets))) | 439 | (oset p targets (delq this (oref p targets))) |
| 440 | (ede-proj-save (ede-current-project)))) | 440 | (ede-proj-save (ede-current-project)))) |
| 441 | 441 | ||
| 442 | (defmethod project-add-file ((this ede-proj-target) file) | 442 | (cl-defmethod project-add-file ((this ede-proj-target) file) |
| 443 | "Add to target THIS the current buffer represented as FILE." | 443 | "Add to target THIS the current buffer represented as FILE." |
| 444 | (let ((file (ede-convert-path this file)) | 444 | (let ((file (ede-convert-path this file)) |
| 445 | (src (ede-target-sourcecode this))) | 445 | (src (ede-target-sourcecode this))) |
| @@ -454,7 +454,7 @@ Argument TARGET is the project we are completing customization on." | |||
| 454 | (t (error "`project-add-file(ede-target)' source mismatch error"))) | 454 | (t (error "`project-add-file(ede-target)' source mismatch error"))) |
| 455 | (ede-proj-save)))) | 455 | (ede-proj-save)))) |
| 456 | 456 | ||
| 457 | (defmethod project-remove-file ((target ede-proj-target) file) | 457 | (cl-defmethod project-remove-file ((target ede-proj-target) file) |
| 458 | "For TARGET, remove FILE. | 458 | "For TARGET, remove FILE. |
| 459 | FILE must be massaged by `ede-convert-path'." | 459 | FILE must be massaged by `ede-convert-path'." |
| 460 | ;; Speedy delete should be safe. | 460 | ;; Speedy delete should be safe. |
| @@ -462,11 +462,11 @@ FILE must be massaged by `ede-convert-path'." | |||
| 462 | (object-remove-from-list target 'auxsource (ede-convert-path target file)) | 462 | (object-remove-from-list target 'auxsource (ede-convert-path target file)) |
| 463 | (ede-proj-save)) | 463 | (ede-proj-save)) |
| 464 | 464 | ||
| 465 | (defmethod project-update-version ((this ede-proj-project)) | 465 | (cl-defmethod project-update-version ((this ede-proj-project)) |
| 466 | "The :version of project THIS has changed." | 466 | "The :version of project THIS has changed." |
| 467 | (ede-proj-save)) | 467 | (ede-proj-save)) |
| 468 | 468 | ||
| 469 | (defmethod project-make-dist ((this ede-proj-project)) | 469 | (cl-defmethod project-make-dist ((this ede-proj-project)) |
| 470 | "Build a distribution for the project based on THIS target." | 470 | "Build a distribution for the project based on THIS target." |
| 471 | (let ((pm (ede-proj-dist-makefile this)) | 471 | (let ((pm (ede-proj-dist-makefile this)) |
| 472 | (df (project-dist-files this))) | 472 | (df (project-dist-files this))) |
| @@ -479,14 +479,14 @@ FILE must be massaged by `ede-convert-path'." | |||
| 479 | (file-name-directory pm)))) | 479 | (file-name-directory pm)))) |
| 480 | (compile (concat ede-make-command " -f " pm " dist")))) | 480 | (compile (concat ede-make-command " -f " pm " dist")))) |
| 481 | 481 | ||
| 482 | (defmethod project-dist-files ((this ede-proj-project)) | 482 | (cl-defmethod project-dist-files ((this ede-proj-project)) |
| 483 | "Return a list of files that constitutes a distribution of THIS project." | 483 | "Return a list of files that constitutes a distribution of THIS project." |
| 484 | (list | 484 | (list |
| 485 | ;; Note to self, keep this first for the above fn to check against. | 485 | ;; Note to self, keep this first for the above fn to check against. |
| 486 | (concat (oref this name) "-" (oref this version) ".tar.gz") | 486 | (concat (oref this name) "-" (oref this version) ".tar.gz") |
| 487 | )) | 487 | )) |
| 488 | 488 | ||
| 489 | (defmethod project-compile-project ((proj ede-proj-project) &optional command) | 489 | (cl-defmethod project-compile-project ((proj ede-proj-project) &optional command) |
| 490 | "Compile the entire current project PROJ. | 490 | "Compile the entire current project PROJ. |
| 491 | Argument COMMAND is the command to use when compiling." | 491 | Argument COMMAND is the command to use when compiling." |
| 492 | (let ((pm (ede-proj-dist-makefile proj)) | 492 | (let ((pm (ede-proj-dist-makefile proj)) |
| @@ -499,12 +499,12 @@ Argument COMMAND is the command to use when compiling." | |||
| 499 | 499 | ||
| 500 | ;;; Target type specific compilations/debug | 500 | ;;; Target type specific compilations/debug |
| 501 | ;; | 501 | ;; |
| 502 | (defmethod project-compile-target ((obj ede-proj-target) &optional command) | 502 | (cl-defmethod project-compile-target ((obj ede-proj-target) &optional command) |
| 503 | "Compile the current target OBJ. | 503 | "Compile the current target OBJ. |
| 504 | Argument COMMAND is the command to use for compiling the target." | 504 | Argument COMMAND is the command to use for compiling the target." |
| 505 | (project-compile-project (ede-current-project) command)) | 505 | (project-compile-project (ede-current-project) command)) |
| 506 | 506 | ||
| 507 | (defmethod project-compile-target ((obj ede-proj-target-makefile) | 507 | (cl-defmethod project-compile-target ((obj ede-proj-target-makefile) |
| 508 | &optional command) | 508 | &optional command) |
| 509 | "Compile the current target program OBJ. | 509 | "Compile the current target program OBJ. |
| 510 | Optional argument COMMAND is the s the alternate command to use." | 510 | 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." | |||
| 512 | (compile (concat ede-make-command " -f " (oref obj makefile) " " | 512 | (compile (concat ede-make-command " -f " (oref obj makefile) " " |
| 513 | (ede-proj-makefile-target-name obj)))) | 513 | (ede-proj-makefile-target-name obj)))) |
| 514 | 514 | ||
| 515 | (defmethod project-debug-target ((obj ede-proj-target)) | 515 | (cl-defmethod project-debug-target ((obj ede-proj-target)) |
| 516 | "Run the current project target OBJ in a debugger." | 516 | "Run the current project target OBJ in a debugger." |
| 517 | (error "Debug-target not supported by %s" (eieio-object-name obj))) | 517 | (error "Debug-target not supported by %s" (eieio-object-name obj))) |
| 518 | 518 | ||
| 519 | (defmethod project-run-target ((obj ede-proj-target)) | 519 | (cl-defmethod project-run-target ((obj ede-proj-target)) |
| 520 | "Run the current project target OBJ." | 520 | "Run the current project target OBJ." |
| 521 | (error "Run-target not supported by %s" (eieio-object-name obj))) | 521 | (error "Run-target not supported by %s" (eieio-object-name obj))) |
| 522 | 522 | ||
| 523 | (defmethod ede-proj-makefile-target-name ((this ede-proj-target)) | 523 | (cl-defmethod ede-proj-makefile-target-name ((this ede-proj-target)) |
| 524 | "Return the name of the main target for THIS target." | 524 | "Return the name of the main target for THIS target." |
| 525 | (ede-name this)) | 525 | (ede-name this)) |
| 526 | 526 | ||
| 527 | ;;; Compiler and source code generators | 527 | ;;; Compiler and source code generators |
| 528 | ;; | 528 | ;; |
| 529 | (defmethod ede-want-file-auxiliary-p ((this ede-target) file) | 529 | (cl-defmethod ede-want-file-auxiliary-p ((this ede-target) file) |
| 530 | "Return non-nil if THIS target wants FILE." | 530 | "Return non-nil if THIS target wants FILE." |
| 531 | ;; By default, all targets reference the source object, and let it decide. | 531 | ;; By default, all targets reference the source object, and let it decide. |
| 532 | (let ((src (ede-target-sourcecode this))) | 532 | (let ((src (ede-target-sourcecode this))) |
| @@ -534,7 +534,7 @@ Optional argument COMMAND is the s the alternate command to use." | |||
| 534 | (setq src (cdr src))) | 534 | (setq src (cdr src))) |
| 535 | src)) | 535 | src)) |
| 536 | 536 | ||
| 537 | (defmethod ede-proj-compilers ((obj ede-proj-target)) | 537 | (cl-defmethod ede-proj-compilers ((obj ede-proj-target)) |
| 538 | "List of compilers being used by OBJ. | 538 | "List of compilers being used by OBJ. |
| 539 | If the `compiler' slot is empty, concoct one on a first match found | 539 | If the `compiler' slot is empty, concoct one on a first match found |
| 540 | basis for any given type from the `availablecompilers' slot. | 540 | basis for any given type from the `availablecompilers' slot. |
| @@ -570,7 +570,7 @@ You may need to add support for this type of file." | |||
| 570 | ;; Return the discovered compilers. | 570 | ;; Return the discovered compilers. |
| 571 | comp))) | 571 | comp))) |
| 572 | 572 | ||
| 573 | (defmethod ede-proj-linkers ((obj ede-proj-target)) | 573 | (cl-defmethod ede-proj-linkers ((obj ede-proj-target)) |
| 574 | "List of linkers being used by OBJ. | 574 | "List of linkers being used by OBJ. |
| 575 | If the `linker' slot is empty, concoct one on a first match found | 575 | If the `linker' slot is empty, concoct one on a first match found |
| 576 | basis for any given type from the `availablelinkers' slot. | 576 | basis for any given type from the `availablelinkers' slot. |
| @@ -624,7 +624,7 @@ Converts all symbols into the objects to be used." | |||
| 624 | "Return non-nil if the current project PROJ is automake mode." | 624 | "Return non-nil if the current project PROJ is automake mode." |
| 625 | (eq (ede-proj-makefile-type proj) 'Makefile)) | 625 | (eq (ede-proj-makefile-type proj) 'Makefile)) |
| 626 | 626 | ||
| 627 | (defmethod ede-proj-dist-makefile ((this ede-proj-project)) | 627 | (cl-defmethod ede-proj-dist-makefile ((this ede-proj-project)) |
| 628 | "Return the name of the Makefile with the DIST target in it for THIS." | 628 | "Return the name of the Makefile with the DIST target in it for THIS." |
| 629 | (cond ((eq (oref this makefile-type) 'Makefile.am) | 629 | (cond ((eq (oref this makefile-type) 'Makefile.am) |
| 630 | (concat (file-name-directory (oref this file)) | 630 | (concat (file-name-directory (oref this file)) |
| @@ -651,7 +651,7 @@ Converts all symbols into the objects to be used." | |||
| 651 | (interactive) | 651 | (interactive) |
| 652 | (ede-proj-setup-buildenvironment (ede-current-project) t)) | 652 | (ede-proj-setup-buildenvironment (ede-current-project) t)) |
| 653 | 653 | ||
| 654 | (defmethod ede-proj-makefile-create-maybe ((this ede-proj-project) mfilename) | 654 | (cl-defmethod ede-proj-makefile-create-maybe ((this ede-proj-project) mfilename) |
| 655 | "Create a Makefile for all Makefile targets in THIS if needed. | 655 | "Create a Makefile for all Makefile targets in THIS if needed. |
| 656 | MFILENAME is the makefile to generate." | 656 | MFILENAME is the makefile to generate." |
| 657 | ;; For now, pass through until dirty is implemented. | 657 | ;; For now, pass through until dirty is implemented. |
| @@ -660,7 +660,7 @@ MFILENAME is the makefile to generate." | |||
| 660 | (file-newer-than-file-p (oref this file) mfilename)) | 660 | (file-newer-than-file-p (oref this file) mfilename)) |
| 661 | (ede-proj-makefile-create this mfilename))) | 661 | (ede-proj-makefile-create this mfilename))) |
| 662 | 662 | ||
| 663 | (defmethod ede-proj-setup-buildenvironment ((this ede-proj-project) | 663 | (cl-defmethod ede-proj-setup-buildenvironment ((this ede-proj-project) |
| 664 | &optional force) | 664 | &optional force) |
| 665 | "Setup the build environment for project THIS. | 665 | "Setup the build environment for project THIS. |
| 666 | Handles the Makefile, or a Makefile.am configure.ac combination. | 666 | Handles the Makefile, or a Makefile.am configure.ac combination. |
| @@ -686,7 +686,7 @@ Optional argument FORCE will force items to be regenerated." | |||
| 686 | 686 | ||
| 687 | ;;; Lower level overloads | 687 | ;;; Lower level overloads |
| 688 | ;; | 688 | ;; |
| 689 | (defmethod project-rescan ((this ede-proj-project)) | 689 | (cl-defmethod project-rescan ((this ede-proj-project)) |
| 690 | "Rescan the EDE proj project THIS." | 690 | "Rescan the EDE proj project THIS." |
| 691 | (let ((root (or (ede-project-root this) this)) | 691 | (let ((root (or (ede-project-root this) this)) |
| 692 | ) | 692 | ) |
diff --git a/lisp/cedet/ede/project-am.el b/lisp/cedet/ede/project-am.el index d0ca8091c90..462369621ec 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.") | |||
| 194 | "Encode one makefile.") | 194 | "Encode one makefile.") |
| 195 | 195 | ||
| 196 | ;;; Code: | 196 | ;;; Code: |
| 197 | (defmethod project-add-file ((ot project-am-target)) | 197 | (cl-defmethod project-add-file ((ot project-am-target)) |
| 198 | "Add the current buffer into a project. | 198 | "Add the current buffer into a project. |
| 199 | OT is the object target. DIR is the directory to start in." | 199 | OT is the object target. DIR is the directory to start in." |
| 200 | (let* ((target (if ede-object (error "Already associated w/ a target") | 200 | (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." | |||
| 221 | (save-buffer)) | 221 | (save-buffer)) |
| 222 | (setq ede-object ot))) | 222 | (setq ede-object ot))) |
| 223 | 223 | ||
| 224 | (defmethod project-remove-file ((ot project-am-target) fnnd) | 224 | (cl-defmethod project-remove-file ((ot project-am-target) fnnd) |
| 225 | "Remove the current buffer from any project targets." | 225 | "Remove the current buffer from any project targets." |
| 226 | (ede-with-projectfile ot | 226 | (ede-with-projectfile ot |
| 227 | (makefile-move-to-macro (project-am-macro ot)) | 227 | (makefile-move-to-macro (project-am-macro ot)) |
| @@ -232,7 +232,7 @@ OT is the object target. DIR is the directory to start in." | |||
| 232 | (save-buffer)) | 232 | (save-buffer)) |
| 233 | (setq ede-object nil)) | 233 | (setq ede-object nil)) |
| 234 | 234 | ||
| 235 | (defmethod project-edit-file-target ((obj project-am-target)) | 235 | (cl-defmethod project-edit-file-target ((obj project-am-target)) |
| 236 | "Edit the target associated w/ this file." | 236 | "Edit the target associated w/ this file." |
| 237 | (find-file (concat (oref obj path) "Makefile.am")) | 237 | (find-file (concat (oref obj path) "Makefile.am")) |
| 238 | (goto-char (point-min)) | 238 | (goto-char (point-min)) |
| @@ -240,7 +240,7 @@ OT is the object target. DIR is the directory to start in." | |||
| 240 | (if (= (point-min) (point)) | 240 | (if (= (point-min) (point)) |
| 241 | (re-search-forward (ede-target-name obj)))) | 241 | (re-search-forward (ede-target-name obj)))) |
| 242 | 242 | ||
| 243 | (defmethod project-new-target ((proj project-am-makefile) | 243 | (cl-defmethod project-new-target ((proj project-am-makefile) |
| 244 | &optional name type) | 244 | &optional name type) |
| 245 | "Create a new target named NAME. | 245 | "Create a new target named NAME. |
| 246 | Argument TYPE is the type of target to insert. This is a string | 246 | 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." | |||
| 300 | ;; This should be handled at the EDE level, calling a method of the | 300 | ;; This should be handled at the EDE level, calling a method of the |
| 301 | ;; top most project. | 301 | ;; top most project. |
| 302 | ;; | 302 | ;; |
| 303 | (defmethod project-compile-project ((obj project-am-target) &optional command) | 303 | (cl-defmethod project-compile-project ((obj project-am-target) &optional command) |
| 304 | "Compile the entire current project. | 304 | "Compile the entire current project. |
| 305 | Argument COMMAND is the command to use when compiling." | 305 | Argument COMMAND is the command to use when compiling." |
| 306 | (require 'compile) | 306 | (require 'compile) |
| @@ -324,7 +324,7 @@ Argument COMMAND is the command to use when compiling." | |||
| 324 | (let* ((default-directory (project-am-find-topmost-level default-directory))) | 324 | (let* ((default-directory (project-am-find-topmost-level default-directory))) |
| 325 | (compile command))) | 325 | (compile command))) |
| 326 | 326 | ||
| 327 | (defmethod project-compile-project ((obj project-am-makefile) | 327 | (cl-defmethod project-compile-project ((obj project-am-makefile) |
| 328 | &optional command) | 328 | &optional command) |
| 329 | "Compile the entire current project. | 329 | "Compile the entire current project. |
| 330 | Argument COMMAND is the command to use when compiling." | 330 | Argument COMMAND is the command to use when compiling." |
| @@ -349,7 +349,7 @@ Argument COMMAND is the command to use when compiling." | |||
| 349 | (let* ((default-directory (project-am-find-topmost-level default-directory))) | 349 | (let* ((default-directory (project-am-find-topmost-level default-directory))) |
| 350 | (compile command))) | 350 | (compile command))) |
| 351 | 351 | ||
| 352 | (defmethod project-compile-target ((obj project-am-target) &optional command) | 352 | (cl-defmethod project-compile-target ((obj project-am-target) &optional command) |
| 353 | "Compile the current target. | 353 | "Compile the current target. |
| 354 | Argument COMMAND is the command to use for compiling the target." | 354 | Argument COMMAND is the command to use for compiling the target." |
| 355 | (require 'compile) | 355 | (require 'compile) |
| @@ -378,7 +378,7 @@ Argument COMMAND is the command to use for compiling the target." | |||
| 378 | ;; We better be in the right place when compiling a specific target. | 378 | ;; We better be in the right place when compiling a specific target. |
| 379 | (compile command)) | 379 | (compile command)) |
| 380 | 380 | ||
| 381 | (defmethod project-debug-target ((obj project-am-objectcode)) | 381 | (cl-defmethod project-debug-target ((obj project-am-objectcode)) |
| 382 | "Run the current project target in a debugger." | 382 | "Run the current project target in a debugger." |
| 383 | (let ((tb (get-buffer-create " *padt*")) | 383 | (let ((tb (get-buffer-create " *padt*")) |
| 384 | (dd (oref obj path)) | 384 | (dd (oref obj path)) |
| @@ -397,7 +397,7 @@ Argument COMMAND is the command to use for compiling the target." | |||
| 397 | 397 | ||
| 398 | (declare-function ede-shell-run-something "ede/shell") | 398 | (declare-function ede-shell-run-something "ede/shell") |
| 399 | 399 | ||
| 400 | (defmethod project-run-target ((obj project-am-objectcode)) | 400 | (cl-defmethod project-run-target ((obj project-am-objectcode)) |
| 401 | "Run the current project target in comint buffer." | 401 | "Run the current project target in comint buffer." |
| 402 | (require 'ede/shell) | 402 | (require 'ede/shell) |
| 403 | (let ((tb (get-buffer-create " *padt*")) | 403 | (let ((tb (get-buffer-create " *padt*")) |
| @@ -413,7 +413,7 @@ Argument COMMAND is the command to use for compiling the target." | |||
| 413 | (ede-shell-run-something obj cmd)) | 413 | (ede-shell-run-something obj cmd)) |
| 414 | (kill-buffer tb)))) | 414 | (kill-buffer tb)))) |
| 415 | 415 | ||
| 416 | (defmethod project-make-dist ((this project-am-target)) | 416 | (cl-defmethod project-make-dist ((this project-am-target)) |
| 417 | "Run the current project in the debugger." | 417 | "Run the current project in the debugger." |
| 418 | (require 'compile) | 418 | (require 'compile) |
| 419 | (if (not project-am-compile-project-command) | 419 | (if (not project-am-compile-project-command) |
| @@ -500,7 +500,7 @@ This is used when subprojects are made in named subdirectories." | |||
| 500 | ampf)))) | 500 | ampf)))) |
| 501 | 501 | ||
| 502 | ;;; Methods: | 502 | ;;; Methods: |
| 503 | (defmethod project-targets-for-file ((proj project-am-makefile)) | 503 | (cl-defmethod project-targets-for-file ((proj project-am-makefile)) |
| 504 | "Return a list of targets the project PROJ." | 504 | "Return a list of targets the project PROJ." |
| 505 | (oref proj targets)) | 505 | (oref proj targets)) |
| 506 | 506 | ||
| @@ -612,7 +612,7 @@ Strip out duplicates, and recurse on variables." | |||
| 612 | subdirs) | 612 | subdirs) |
| 613 | ) | 613 | ) |
| 614 | 614 | ||
| 615 | (defmethod project-rescan ((this project-am-makefile) &optional suggestedname) | 615 | (cl-defmethod project-rescan ((this project-am-makefile) &optional suggestedname) |
| 616 | "Rescan the makefile for all targets and sub targets." | 616 | "Rescan the makefile for all targets and sub targets." |
| 617 | (project-am-with-makefile-current (file-name-directory (oref this file)) | 617 | (project-am-with-makefile-current (file-name-directory (oref this file)) |
| 618 | ;;(message "Scanning %s..." (oref this file)) | 618 | ;;(message "Scanning %s..." (oref this file)) |
| @@ -692,7 +692,7 @@ Strip out duplicates, and recurse on variables." | |||
| 692 | ))) | 692 | ))) |
| 693 | 693 | ||
| 694 | 694 | ||
| 695 | (defmethod project-rescan ((this project-am-program)) | 695 | (cl-defmethod project-rescan ((this project-am-program)) |
| 696 | "Rescan object THIS." | 696 | "Rescan object THIS." |
| 697 | (oset this :source (makefile-macro-file-list (project-am-macro this))) | 697 | (oset this :source (makefile-macro-file-list (project-am-macro this))) |
| 698 | (unless (oref this :source) | 698 | (unless (oref this :source) |
| @@ -700,65 +700,65 @@ Strip out duplicates, and recurse on variables." | |||
| 700 | (oset this :ldadd (makefile-macro-file-list | 700 | (oset this :ldadd (makefile-macro-file-list |
| 701 | (concat (oref this :name) "_LDADD")))) | 701 | (concat (oref this :name) "_LDADD")))) |
| 702 | 702 | ||
| 703 | (defmethod project-rescan ((this project-am-lib)) | 703 | (cl-defmethod project-rescan ((this project-am-lib)) |
| 704 | "Rescan object THIS." | 704 | "Rescan object THIS." |
| 705 | (oset this :source (makefile-macro-file-list (project-am-macro this))) | 705 | (oset this :source (makefile-macro-file-list (project-am-macro this))) |
| 706 | (unless (oref this :source) | 706 | (unless (oref this :source) |
| 707 | (oset this :source (list (concat (file-name-sans-extension (oref this :name)) ".c"))))) | 707 | (oset this :source (list (concat (file-name-sans-extension (oref this :name)) ".c"))))) |
| 708 | 708 | ||
| 709 | (defmethod project-rescan ((this project-am-texinfo)) | 709 | (cl-defmethod project-rescan ((this project-am-texinfo)) |
| 710 | "Rescan object THIS." | 710 | "Rescan object THIS." |
| 711 | (oset this :include (makefile-macro-file-list (project-am-macro this)))) | 711 | (oset this :include (makefile-macro-file-list (project-am-macro this)))) |
| 712 | 712 | ||
| 713 | (defmethod project-rescan ((this project-am-man)) | 713 | (cl-defmethod project-rescan ((this project-am-man)) |
| 714 | "Rescan object THIS." | 714 | "Rescan object THIS." |
| 715 | (oset this :source (makefile-macro-file-list (project-am-macro this)))) | 715 | (oset this :source (makefile-macro-file-list (project-am-macro this)))) |
| 716 | 716 | ||
| 717 | (defmethod project-rescan ((this project-am-lisp)) | 717 | (cl-defmethod project-rescan ((this project-am-lisp)) |
| 718 | "Rescan the lisp sources." | 718 | "Rescan the lisp sources." |
| 719 | (oset this :source (makefile-macro-file-list (project-am-macro this)))) | 719 | (oset this :source (makefile-macro-file-list (project-am-macro this)))) |
| 720 | 720 | ||
| 721 | (defmethod project-rescan ((this project-am-header)) | 721 | (cl-defmethod project-rescan ((this project-am-header)) |
| 722 | "Rescan the Header sources for object THIS." | 722 | "Rescan the Header sources for object THIS." |
| 723 | (oset this :source (makefile-macro-file-list (project-am-macro this)))) | 723 | (oset this :source (makefile-macro-file-list (project-am-macro this)))) |
| 724 | 724 | ||
| 725 | (defmethod project-rescan ((this project-am-built-src)) | 725 | (cl-defmethod project-rescan ((this project-am-built-src)) |
| 726 | "Rescan built sources for object THIS." | 726 | "Rescan built sources for object THIS." |
| 727 | (oset this :source (makefile-macro-file-list "BUILT_SOURCES"))) | 727 | (oset this :source (makefile-macro-file-list "BUILT_SOURCES"))) |
| 728 | 728 | ||
| 729 | (defmethod project-rescan ((this project-am-extra-dist)) | 729 | (cl-defmethod project-rescan ((this project-am-extra-dist)) |
| 730 | "Rescan object THIS." | 730 | "Rescan object THIS." |
| 731 | (oset this :source (makefile-macro-file-list "EXTRA_DIST"))) | 731 | (oset this :source (makefile-macro-file-list "EXTRA_DIST"))) |
| 732 | 732 | ||
| 733 | (defmethod project-am-macro ((this project-am-objectcode)) | 733 | (cl-defmethod project-am-macro ((this project-am-objectcode)) |
| 734 | "Return the default macro to 'edit' for this object type." | 734 | "Return the default macro to 'edit' for this object type." |
| 735 | (concat (subst-char-in-string ?- ?_ (oref this :name)) "_SOURCES")) | 735 | (concat (subst-char-in-string ?- ?_ (oref this :name)) "_SOURCES")) |
| 736 | 736 | ||
| 737 | (defmethod project-am-macro ((this project-am-header-noinst)) | 737 | (cl-defmethod project-am-macro ((this project-am-header-noinst)) |
| 738 | "Return the default macro to 'edit' for this object." | 738 | "Return the default macro to 'edit' for this object." |
| 739 | "noinst_HEADERS") | 739 | "noinst_HEADERS") |
| 740 | 740 | ||
| 741 | (defmethod project-am-macro ((this project-am-header-inst)) | 741 | (cl-defmethod project-am-macro ((this project-am-header-inst)) |
| 742 | "Return the default macro to 'edit' for this object." | 742 | "Return the default macro to 'edit' for this object." |
| 743 | "include_HEADERS") | 743 | "include_HEADERS") |
| 744 | 744 | ||
| 745 | (defmethod project-am-macro ((this project-am-header-pkg)) | 745 | (cl-defmethod project-am-macro ((this project-am-header-pkg)) |
| 746 | "Return the default macro to 'edit' for this object." | 746 | "Return the default macro to 'edit' for this object." |
| 747 | "pkginclude_HEADERS") | 747 | "pkginclude_HEADERS") |
| 748 | 748 | ||
| 749 | (defmethod project-am-macro ((this project-am-header-chk)) | 749 | (cl-defmethod project-am-macro ((this project-am-header-chk)) |
| 750 | "Return the default macro to 'edit' for this object." | 750 | "Return the default macro to 'edit' for this object." |
| 751 | "check_HEADERS") | 751 | "check_HEADERS") |
| 752 | 752 | ||
| 753 | (defmethod project-am-macro ((this project-am-texinfo)) | 753 | (cl-defmethod project-am-macro ((this project-am-texinfo)) |
| 754 | "Return the default macro to 'edit' for this object type." | 754 | "Return the default macro to 'edit' for this object type." |
| 755 | (concat (file-name-sans-extension (oref this :name)) "_TEXINFOS")) | 755 | (concat (file-name-sans-extension (oref this :name)) "_TEXINFOS")) |
| 756 | 756 | ||
| 757 | (defmethod project-am-macro ((this project-am-man)) | 757 | (cl-defmethod project-am-macro ((this project-am-man)) |
| 758 | "Return the default macro to 'edit' for this object type." | 758 | "Return the default macro to 'edit' for this object type." |
| 759 | (oref this :name)) | 759 | (oref this :name)) |
| 760 | 760 | ||
| 761 | (defmethod project-am-macro ((this project-am-lisp)) | 761 | (cl-defmethod project-am-macro ((this project-am-lisp)) |
| 762 | "Return the default macro to 'edit' for this object." | 762 | "Return the default macro to 'edit' for this object." |
| 763 | "lisp_LISP") | 763 | "lisp_LISP") |
| 764 | 764 | ||
| @@ -781,7 +781,7 @@ nil means that this buffer belongs to no-one." | |||
| 781 | sobj (cdr sobj))) | 781 | sobj (cdr sobj))) |
| 782 | obj)))) | 782 | obj)))) |
| 783 | 783 | ||
| 784 | (defmethod ede-buffer-mine ((this project-am-makefile) buffer) | 784 | (cl-defmethod ede-buffer-mine ((this project-am-makefile) buffer) |
| 785 | "Return t if object THIS lays claim to the file in BUFFER." | 785 | "Return t if object THIS lays claim to the file in BUFFER." |
| 786 | (let ((efn (expand-file-name (buffer-file-name buffer)))) | 786 | (let ((efn (expand-file-name (buffer-file-name buffer)))) |
| 787 | (or (string= (oref this :file) efn) | 787 | (or (string= (oref this :file) efn) |
| @@ -796,42 +796,42 @@ nil means that this buffer belongs to no-one." | |||
| 796 | ans) | 796 | ans) |
| 797 | ))) | 797 | ))) |
| 798 | 798 | ||
| 799 | (defmethod ede-buffer-mine ((this project-am-objectcode) buffer) | 799 | (cl-defmethod ede-buffer-mine ((this project-am-objectcode) buffer) |
| 800 | "Return t if object THIS lays claim to the file in BUFFER." | 800 | "Return t if object THIS lays claim to the file in BUFFER." |
| 801 | (member (file-relative-name (buffer-file-name buffer) (oref this :path)) | 801 | (member (file-relative-name (buffer-file-name buffer) (oref this :path)) |
| 802 | (oref this :source))) | 802 | (oref this :source))) |
| 803 | 803 | ||
| 804 | (defmethod ede-buffer-mine ((this project-am-texinfo) buffer) | 804 | (cl-defmethod ede-buffer-mine ((this project-am-texinfo) buffer) |
| 805 | "Return t if object THIS lays claim to the file in BUFFER." | 805 | "Return t if object THIS lays claim to the file in BUFFER." |
| 806 | (let ((bfn (file-relative-name (buffer-file-name buffer) | 806 | (let ((bfn (file-relative-name (buffer-file-name buffer) |
| 807 | (oref this :path)))) | 807 | (oref this :path)))) |
| 808 | (or (string= (oref this :name) bfn) | 808 | (or (string= (oref this :name) bfn) |
| 809 | (member bfn (oref this :include))))) | 809 | (member bfn (oref this :include))))) |
| 810 | 810 | ||
| 811 | (defmethod ede-buffer-mine ((this project-am-man) buffer) | 811 | (cl-defmethod ede-buffer-mine ((this project-am-man) buffer) |
| 812 | "Return t if object THIS lays claim to the file in BUFFER." | 812 | "Return t if object THIS lays claim to the file in BUFFER." |
| 813 | (string= (oref this :name) | 813 | (string= (oref this :name) |
| 814 | (file-relative-name (buffer-file-name buffer) (oref this :path)))) | 814 | (file-relative-name (buffer-file-name buffer) (oref this :path)))) |
| 815 | 815 | ||
| 816 | (defmethod ede-buffer-mine ((this project-am-lisp) buffer) | 816 | (cl-defmethod ede-buffer-mine ((this project-am-lisp) buffer) |
| 817 | "Return t if object THIS lays claim to the file in BUFFER." | 817 | "Return t if object THIS lays claim to the file in BUFFER." |
| 818 | (member (file-relative-name (buffer-file-name buffer) (oref this :path)) | 818 | (member (file-relative-name (buffer-file-name buffer) (oref this :path)) |
| 819 | (oref this :source))) | 819 | (oref this :source))) |
| 820 | 820 | ||
| 821 | (defmethod project-am-subtree ((ampf project-am-makefile) subdir) | 821 | (cl-defmethod project-am-subtree ((ampf project-am-makefile) subdir) |
| 822 | "Return the sub project in AMPF specified by SUBDIR." | 822 | "Return the sub project in AMPF specified by SUBDIR." |
| 823 | (object-assoc (expand-file-name subdir) 'file (oref ampf subproj))) | 823 | (object-assoc (expand-file-name subdir) 'file (oref ampf subproj))) |
| 824 | 824 | ||
| 825 | (defmethod project-compile-target-command ((this project-am-target)) | 825 | (cl-defmethod project-compile-target-command ((this project-am-target)) |
| 826 | "Default target to use when compiling a given target." | 826 | "Default target to use when compiling a given target." |
| 827 | ;; This is a pretty good default for most. | 827 | ;; This is a pretty good default for most. |
| 828 | "") | 828 | "") |
| 829 | 829 | ||
| 830 | (defmethod project-compile-target-command ((this project-am-objectcode)) | 830 | (cl-defmethod project-compile-target-command ((this project-am-objectcode)) |
| 831 | "Default target to use when compiling an object code target." | 831 | "Default target to use when compiling an object code target." |
| 832 | (oref this :name)) | 832 | (oref this :name)) |
| 833 | 833 | ||
| 834 | (defmethod project-compile-target-command ((this project-am-texinfo)) | 834 | (cl-defmethod project-compile-target-command ((this project-am-texinfo)) |
| 835 | "Default target t- use when compiling a texinfo file." | 835 | "Default target t- use when compiling a texinfo file." |
| 836 | (let ((n (oref this :name))) | 836 | (let ((n (oref this :name))) |
| 837 | (if (string-match "\\.texi?\\(nfo\\)?" n) | 837 | (if (string-match "\\.texi?\\(nfo\\)?" n) |
| @@ -861,9 +861,9 @@ Argument FILE is the file to extract the end directory name from." | |||
| 861 | (t | 861 | (t |
| 862 | 'project-am-program))) | 862 | 'project-am-program))) |
| 863 | 863 | ||
| 864 | (defmethod ede-buffer-header-file((this project-am-objectcode) buffer) | 864 | (cl-defmethod ede-buffer-header-file((this project-am-objectcode) buffer) |
| 865 | "There are no default header files." | 865 | "There are no default header files." |
| 866 | (or (call-next-method) | 866 | (or (cl-call-next-method) |
| 867 | (let ((s (oref this source)) | 867 | (let ((s (oref this source)) |
| 868 | (found nil)) | 868 | (found nil)) |
| 869 | (while (and s (not found)) | 869 | (while (and s (not found)) |
| @@ -873,7 +873,7 @@ Argument FILE is the file to extract the end directory name from." | |||
| 873 | (setq s (cdr s))) | 873 | (setq s (cdr s))) |
| 874 | found))) | 874 | found))) |
| 875 | 875 | ||
| 876 | (defmethod ede-documentation ((this project-am-texinfo)) | 876 | (cl-defmethod ede-documentation ((this project-am-texinfo)) |
| 877 | "Return a list of files that provides documentation. | 877 | "Return a list of files that provides documentation. |
| 878 | Documentation is not for object THIS, but is provided by THIS for other | 878 | Documentation is not for object THIS, but is provided by THIS for other |
| 879 | files in the project." | 879 | files in the project." |
| @@ -997,12 +997,12 @@ Calculates the info with `project-am-extract-package-info'." | |||
| 997 | (project-am-extract-package-info dir))) | 997 | (project-am-extract-package-info dir))) |
| 998 | 998 | ||
| 999 | ;; for simple per project include path extension | 999 | ;; for simple per project include path extension |
| 1000 | (defmethod ede-system-include-path ((this project-am-makefile)) | 1000 | (cl-defmethod ede-system-include-path ((this project-am-makefile)) |
| 1001 | "Return `project-am-localvars-include-path', usually local variable | 1001 | "Return `project-am-localvars-include-path', usually local variable |
| 1002 | per file or in .dir-locals.el or similar." | 1002 | per file or in .dir-locals.el or similar." |
| 1003 | (bound-and-true-p project-am-localvars-include-path)) | 1003 | (bound-and-true-p project-am-localvars-include-path)) |
| 1004 | 1004 | ||
| 1005 | (defmethod ede-system-include-path ((this project-am-target)) | 1005 | (cl-defmethod ede-system-include-path ((this project-am-target)) |
| 1006 | "Return `project-am-localvars-include-path', usually local variable | 1006 | "Return `project-am-localvars-include-path', usually local variable |
| 1007 | per file or in .dir-locals.el or similar." | 1007 | per file or in .dir-locals.el or similar." |
| 1008 | (bound-and-true-p project-am-localvars-include-path)) | 1008 | (bound-and-true-p project-am-localvars-include-path)) |
diff --git a/lisp/cedet/ede/shell.el b/lisp/cedet/ede/shell.el index e15ca19ac54..bdb5d302287 100644 --- a/lisp/cedet/ede/shell.el +++ b/lisp/cedet/ede/shell.el | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | 33 | ||
| 34 | (declare-function comint-send-input "comint") | 34 | (declare-function comint-send-input "comint") |
| 35 | 35 | ||
| 36 | (defmethod ede-shell-run-something ((target ede-target) command) | 36 | (cl-defmethod ede-shell-run-something ((target ede-target) command) |
| 37 | "Create a shell to run stuff for TARGET. | 37 | "Create a shell to run stuff for TARGET. |
| 38 | COMMAND is a text string representing the thing to be run." | 38 | COMMAND is a text string representing the thing to be run." |
| 39 | (let* ((buff (ede-shell-buffer target)) | 39 | (let* ((buff (ede-shell-buffer target)) |
| @@ -72,7 +72,7 @@ COMMAND is a text string representing the thing to be run." | |||
| 72 | (comint-send-input) | 72 | (comint-send-input) |
| 73 | ) | 73 | ) |
| 74 | 74 | ||
| 75 | (defmethod ede-shell-buffer ((target ede-target)) | 75 | (cl-defmethod ede-shell-buffer ((target ede-target)) |
| 76 | "Get the buffer for running shell commands for TARGET." | 76 | "Get the buffer for running shell commands for TARGET." |
| 77 | (let ((name (ede-name target))) | 77 | (let ((name (ede-name target))) |
| 78 | (get-buffer-create (format "*EDE Shell %s*" name)))) | 78 | (get-buffer-create (format "*EDE Shell %s*" name)))) |
diff --git a/lisp/cedet/ede/simple.el b/lisp/cedet/ede/simple.el index f9582877ef3..3c6cb0c2c28 100644 --- a/lisp/cedet/ede/simple.el +++ b/lisp/cedet/ede/simple.el | |||
| @@ -102,7 +102,7 @@ All directories need at least one target.") | |||
| 102 | "EDE Simple project class. | 102 | "EDE Simple project class. |
| 103 | Each directory needs a project file to control it.") | 103 | Each directory needs a project file to control it.") |
| 104 | 104 | ||
| 105 | (defmethod ede-commit-project ((proj ede-simple-project)) | 105 | (cl-defmethod ede-commit-project ((proj ede-simple-project)) |
| 106 | "Commit any change to PROJ to its file." | 106 | "Commit any change to PROJ to its file." |
| 107 | (when (not (file-exists-p ede-simple-save-directory)) | 107 | (when (not (file-exists-p ede-simple-save-directory)) |
| 108 | (if (y-or-n-p (concat ede-simple-save-directory | 108 | (if (y-or-n-p (concat ede-simple-save-directory |
| @@ -111,7 +111,7 @@ Each directory needs a project file to control it.") | |||
| 111 | (error "No save directory for new project"))) | 111 | (error "No save directory for new project"))) |
| 112 | (eieio-persistent-save proj)) | 112 | (eieio-persistent-save proj)) |
| 113 | 113 | ||
| 114 | (defmethod ede-find-subproject-for-directory ((proj ede-simple-project) | 114 | (cl-defmethod ede-find-subproject-for-directory ((proj ede-simple-project) |
| 115 | dir) | 115 | dir) |
| 116 | "Return PROJ, for handling all subdirs below DIR." | 116 | "Return PROJ, for handling all subdirs below DIR." |
| 117 | proj) | 117 | proj) |
diff --git a/lisp/cedet/ede/source.el b/lisp/cedet/ede/source.el index 978315a4231..d7d27679623 100644 --- a/lisp/cedet/ede/source.el +++ b/lisp/cedet/ede/source.el | |||
| @@ -72,7 +72,7 @@ that they are willing to use.") | |||
| 72 | 72 | ||
| 73 | ;;; Methods | 73 | ;;; Methods |
| 74 | ;; | 74 | ;; |
| 75 | (defmethod initialize-instance :AFTER ((this ede-sourcecode) &rest fields) | 75 | (cl-defmethod initialize-instance :after ((this ede-sourcecode) &rest fields) |
| 76 | "Make sure that all ede compiler objects are cached in | 76 | "Make sure that all ede compiler objects are cached in |
| 77 | `ede-compiler-list'." | 77 | `ede-compiler-list'." |
| 78 | (let ((lst ede-sourcecode-list)) | 78 | (let ((lst ede-sourcecode-list)) |
| @@ -85,45 +85,45 @@ that they are willing to use.") | |||
| 85 | ;; Add to the beginning of the list. | 85 | ;; Add to the beginning of the list. |
| 86 | (setq ede-sourcecode-list (cons this ede-sourcecode-list))))) | 86 | (setq ede-sourcecode-list (cons this ede-sourcecode-list))))) |
| 87 | 87 | ||
| 88 | (defmethod ede-want-file-p ((this ede-sourcecode) filename) | 88 | (cl-defmethod ede-want-file-p ((this ede-sourcecode) filename) |
| 89 | "Return non-nil if sourcecode definition THIS will take FILENAME." | 89 | "Return non-nil if sourcecode definition THIS will take FILENAME." |
| 90 | (or (ede-want-file-source-p this filename) | 90 | (or (ede-want-file-source-p this filename) |
| 91 | (ede-want-file-auxiliary-p this filename))) | 91 | (ede-want-file-auxiliary-p this filename))) |
| 92 | 92 | ||
| 93 | (defmethod ede-want-file-source-p ((this ede-sourcecode) filename) | 93 | (cl-defmethod ede-want-file-source-p ((this ede-sourcecode) filename) |
| 94 | "Return non-nil if THIS will take FILENAME as an auxiliary ." | 94 | "Return non-nil if THIS will take FILENAME as an auxiliary ." |
| 95 | (let ((case-fold-search nil)) | 95 | (let ((case-fold-search nil)) |
| 96 | (string-match (oref this sourcepattern) filename))) | 96 | (string-match (oref this sourcepattern) filename))) |
| 97 | 97 | ||
| 98 | (defmethod ede-want-file-auxiliary-p ((this ede-sourcecode) filename) | 98 | (cl-defmethod ede-want-file-auxiliary-p ((this ede-sourcecode) filename) |
| 99 | "Return non-nil if THIS will take FILENAME as an auxiliary ." | 99 | "Return non-nil if THIS will take FILENAME as an auxiliary ." |
| 100 | (let ((case-fold-search nil)) | 100 | (let ((case-fold-search nil)) |
| 101 | (and (slot-boundp this 'auxsourcepattern) | 101 | (and (slot-boundp this 'auxsourcepattern) |
| 102 | (oref this auxsourcepattern) | 102 | (oref this auxsourcepattern) |
| 103 | (string-match (oref this auxsourcepattern) filename)))) | 103 | (string-match (oref this auxsourcepattern) filename)))) |
| 104 | 104 | ||
| 105 | (defmethod ede-want-any-source-files-p ((this ede-sourcecode) filenames) | 105 | (cl-defmethod ede-want-any-source-files-p ((this ede-sourcecode) filenames) |
| 106 | "Return non-nil if THIS will accept any source files in FILENAMES." | 106 | "Return non-nil if THIS will accept any source files in FILENAMES." |
| 107 | (let (found) | 107 | (let (found) |
| 108 | (while (and (not found) filenames) | 108 | (while (and (not found) filenames) |
| 109 | (setq found (ede-want-file-source-p this (pop filenames)))) | 109 | (setq found (ede-want-file-source-p this (pop filenames)))) |
| 110 | found)) | 110 | found)) |
| 111 | 111 | ||
| 112 | (defmethod ede-want-any-auxiliary-files-p ((this ede-sourcecode) filenames) | 112 | (cl-defmethod ede-want-any-auxiliary-files-p ((this ede-sourcecode) filenames) |
| 113 | "Return non-nil if THIS will accept any aux files in FILENAMES." | 113 | "Return non-nil if THIS will accept any aux files in FILENAMES." |
| 114 | (let (found) | 114 | (let (found) |
| 115 | (while (and (not found) filenames) | 115 | (while (and (not found) filenames) |
| 116 | (setq found (ede-want-file-auxiliary-p this (pop filenames)))) | 116 | (setq found (ede-want-file-auxiliary-p this (pop filenames)))) |
| 117 | found)) | 117 | found)) |
| 118 | 118 | ||
| 119 | (defmethod ede-want-any-files-p ((this ede-sourcecode) filenames) | 119 | (cl-defmethod ede-want-any-files-p ((this ede-sourcecode) filenames) |
| 120 | "Return non-nil if THIS will accept any files in FILENAMES." | 120 | "Return non-nil if THIS will accept any files in FILENAMES." |
| 121 | (let (found) | 121 | (let (found) |
| 122 | (while (and (not found) filenames) | 122 | (while (and (not found) filenames) |
| 123 | (setq found (ede-want-file-p this (pop filenames)))) | 123 | (setq found (ede-want-file-p this (pop filenames)))) |
| 124 | found)) | 124 | found)) |
| 125 | 125 | ||
| 126 | (defmethod ede-buffer-header-file ((this ede-sourcecode) filename) | 126 | (cl-defmethod ede-buffer-header-file ((this ede-sourcecode) filename) |
| 127 | "Return a list of file names of header files for THIS with FILENAME. | 127 | "Return a list of file names of header files for THIS with FILENAME. |
| 128 | Used to guess header files, but uses the auxsource regular expression." | 128 | Used to guess header files, but uses the auxsource regular expression." |
| 129 | (let ((dn (file-name-directory filename)) | 129 | (let ((dn (file-name-directory filename)) |
diff --git a/lisp/cedet/ede/speedbar.el b/lisp/cedet/ede/speedbar.el index e08562a3738..46c097ab725 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." | |||
| 181 | (setq depth (1- depth))) | 181 | (setq depth (1- depth))) |
| 182 | (speedbar-line-token)))) | 182 | (speedbar-line-token)))) |
| 183 | 183 | ||
| 184 | (defmethod eieio-speedbar-derive-line-path ((obj ede-project) &optional depth) | 184 | (cl-defmethod eieio-speedbar-derive-line-path ((obj ede-project) &optional depth) |
| 185 | "Return the path to OBJ. | 185 | "Return the path to OBJ. |
| 186 | Optional DEPTH is the depth we start at." | 186 | Optional DEPTH is the depth we start at." |
| 187 | (file-name-directory (oref obj file)) | 187 | (file-name-directory (oref obj file)) |
| 188 | ) | 188 | ) |
| 189 | 189 | ||
| 190 | (defmethod eieio-speedbar-derive-line-path ((obj ede-target) &optional depth) | 190 | (cl-defmethod eieio-speedbar-derive-line-path ((obj ede-target) &optional depth) |
| 191 | "Return the path to OBJ. | 191 | "Return the path to OBJ. |
| 192 | Optional DEPTH is the depth we start at." | 192 | Optional DEPTH is the depth we start at." |
| 193 | (let ((proj (ede-target-parent obj))) | 193 | (let ((proj (ede-target-parent obj))) |
| @@ -201,42 +201,42 @@ Optional DEPTH is the depth we start at." | |||
| 201 | (concat (eieio-speedbar-derive-line-path proj) | 201 | (concat (eieio-speedbar-derive-line-path proj) |
| 202 | (ede-find-nearest-file-line))))))) | 202 | (ede-find-nearest-file-line))))))) |
| 203 | 203 | ||
| 204 | (defmethod eieio-speedbar-description ((obj ede-project)) | 204 | (cl-defmethod eieio-speedbar-description ((obj ede-project)) |
| 205 | "Provide a speedbar description for OBJ." | 205 | "Provide a speedbar description for OBJ." |
| 206 | (ede-description obj)) | 206 | (ede-description obj)) |
| 207 | 207 | ||
| 208 | (defmethod eieio-speedbar-description ((obj ede-target)) | 208 | (cl-defmethod eieio-speedbar-description ((obj ede-target)) |
| 209 | "Provide a speedbar description for OBJ." | 209 | "Provide a speedbar description for OBJ." |
| 210 | (ede-description obj)) | 210 | (ede-description obj)) |
| 211 | 211 | ||
| 212 | (defmethod eieio-speedbar-child-description ((obj ede-target)) | 212 | (cl-defmethod eieio-speedbar-child-description ((obj ede-target)) |
| 213 | "Provide a speedbar description for a plain-child of OBJ. | 213 | "Provide a speedbar description for a plain-child of OBJ. |
| 214 | A plain child is a child element which is not an EIEIO object." | 214 | A plain child is a child element which is not an EIEIO object." |
| 215 | (or (speedbar-item-info-file-helper) | 215 | (or (speedbar-item-info-file-helper) |
| 216 | (speedbar-item-info-tag-helper))) | 216 | (speedbar-item-info-tag-helper))) |
| 217 | 217 | ||
| 218 | (defmethod eieio-speedbar-object-buttonname ((object ede-project)) | 218 | (cl-defmethod eieio-speedbar-object-buttonname ((object ede-project)) |
| 219 | "Return a string to use as a speedbar button for OBJECT." | 219 | "Return a string to use as a speedbar button for OBJECT." |
| 220 | (if (ede-parent-project object) | 220 | (if (ede-parent-project object) |
| 221 | (ede-name object) | 221 | (ede-name object) |
| 222 | (concat (ede-name object) " " (oref object version)))) | 222 | (concat (ede-name object) " " (oref object version)))) |
| 223 | 223 | ||
| 224 | (defmethod eieio-speedbar-object-buttonname ((object ede-target)) | 224 | (cl-defmethod eieio-speedbar-object-buttonname ((object ede-target)) |
| 225 | "Return a string to use as a speedbar button for OBJECT." | 225 | "Return a string to use as a speedbar button for OBJECT." |
| 226 | (ede-name object)) | 226 | (ede-name object)) |
| 227 | 227 | ||
| 228 | (defmethod eieio-speedbar-object-children ((this ede-project)) | 228 | (cl-defmethod eieio-speedbar-object-children ((this ede-project)) |
| 229 | "Return the list of speedbar display children for THIS." | 229 | "Return the list of speedbar display children for THIS." |
| 230 | (condition-case nil | 230 | (condition-case nil |
| 231 | (with-slots (subproj targets) this | 231 | (with-slots (subproj targets) this |
| 232 | (append subproj targets)) | 232 | (append subproj targets)) |
| 233 | (error nil))) | 233 | (error nil))) |
| 234 | 234 | ||
| 235 | (defmethod eieio-speedbar-object-children ((this ede-target)) | 235 | (cl-defmethod eieio-speedbar-object-children ((this ede-target)) |
| 236 | "Return the list of speedbar display children for THIS." | 236 | "Return the list of speedbar display children for THIS." |
| 237 | (oref this source)) | 237 | (oref this source)) |
| 238 | 238 | ||
| 239 | (defmethod eieio-speedbar-child-make-tag-lines ((this ede-target) depth) | 239 | (cl-defmethod eieio-speedbar-child-make-tag-lines ((this ede-target) depth) |
| 240 | "Create a speedbar tag line for a child of THIS. | 240 | "Create a speedbar tag line for a child of THIS. |
| 241 | It has depth DEPTH." | 241 | It has depth DEPTH." |
| 242 | (with-slots (source) this | 242 | (with-slots (source) this |
diff --git a/lisp/cedet/ede/util.el b/lisp/cedet/ede/util.el index bfde858c956..dbbf46fd01c 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." | |||
| 46 | (project-update-version ede-object) | 46 | (project-update-version ede-object) |
| 47 | (ede-update-version-in-source ede-object newversion)))) | 47 | (ede-update-version-in-source ede-object newversion)))) |
| 48 | 48 | ||
| 49 | (defmethod project-update-version ((ot ede-project)) | 49 | (cl-defmethod project-update-version ((ot ede-project)) |
| 50 | "The :version of the project OT has been updated. | 50 | "The :version of the project OT has been updated. |
| 51 | Handle saving, or other detail." | 51 | Handle saving, or other detail." |
| 52 | (error "project-update-version not supported by %s" (eieio-object-name ot))) | 52 | (error "project-update-version not supported by %s" (eieio-object-name ot))) |
| 53 | 53 | ||
| 54 | (defmethod ede-update-version-in-source ((this ede-project) version) | 54 | (cl-defmethod ede-update-version-in-source ((this ede-project) version) |
| 55 | "Change occurrences of a version string in sources. | 55 | "Change occurrences of a version string in sources. |
| 56 | In project THIS, cycle over all targets to give them a chance to set | 56 | In project THIS, cycle over all targets to give them a chance to set |
| 57 | their sources to VERSION." | 57 | their sources to VERSION." |
| 58 | (ede-map-targets this (lambda (targ) | 58 | (ede-map-targets this (lambda (targ) |
| 59 | (ede-update-version-in-source targ version)))) | 59 | (ede-update-version-in-source targ version)))) |
| 60 | 60 | ||
| 61 | (defmethod ede-update-version-in-source ((this ede-target) version) | 61 | (cl-defmethod ede-update-version-in-source ((this ede-target) version) |
| 62 | "In sources for THIS, change version numbers to VERSION." | 62 | "In sources for THIS, change version numbers to VERSION." |
| 63 | (if (and (slot-boundp this 'versionsource) | 63 | (if (and (slot-boundp this 'versionsource) |
| 64 | (oref this versionsource)) | 64 | (oref this versionsource)) |
diff --git a/lisp/cedet/semantic/analyze.el b/lisp/cedet/semantic/analyze.el index 846501e13cc..7ff69771023 100644 --- a/lisp/cedet/semantic/analyze.el +++ b/lisp/cedet/semantic/analyze.el | |||
| @@ -168,7 +168,7 @@ of the parent function.") | |||
| 168 | ;; | 168 | ;; |
| 169 | ;; Simple methods against the context classes. | 169 | ;; Simple methods against the context classes. |
| 170 | ;; | 170 | ;; |
| 171 | (defmethod semantic-analyze-type-constraint | 171 | (cl-defmethod semantic-analyze-type-constraint |
| 172 | ((context semantic-analyze-context) &optional desired-type) | 172 | ((context semantic-analyze-context) &optional desired-type) |
| 173 | "Return a type constraint for completing :prefix in CONTEXT. | 173 | "Return a type constraint for completing :prefix in CONTEXT. |
| 174 | Optional argument DESIRED-TYPE may be a non-type tag to analyze." | 174 | Optional argument DESIRED-TYPE may be a non-type tag to analyze." |
| @@ -189,17 +189,17 @@ Optional argument DESIRED-TYPE may be a non-type tag to analyze." | |||
| 189 | ) | 189 | ) |
| 190 | desired-type)) | 190 | desired-type)) |
| 191 | 191 | ||
| 192 | (defmethod semantic-analyze-type-constraint | 192 | (cl-defmethod semantic-analyze-type-constraint |
| 193 | ((context semantic-analyze-context-functionarg)) | 193 | ((context semantic-analyze-context-functionarg)) |
| 194 | "Return a type constraint for completing :prefix in CONTEXT." | 194 | "Return a type constraint for completing :prefix in CONTEXT." |
| 195 | (call-next-method context (car (oref context argument)))) | 195 | (cl-call-next-method context (car (oref context argument)))) |
| 196 | 196 | ||
| 197 | (defmethod semantic-analyze-type-constraint | 197 | (cl-defmethod semantic-analyze-type-constraint |
| 198 | ((context semantic-analyze-context-assignment)) | 198 | ((context semantic-analyze-context-assignment)) |
| 199 | "Return a type constraint for completing :prefix in CONTEXT." | 199 | "Return a type constraint for completing :prefix in CONTEXT." |
| 200 | (call-next-method context (car (reverse (oref context assignee))))) | 200 | (cl-call-next-method context (car (reverse (oref context assignee))))) |
| 201 | 201 | ||
| 202 | (defmethod semantic-analyze-interesting-tag | 202 | (cl-defmethod semantic-analyze-interesting-tag |
| 203 | ((context semantic-analyze-context)) | 203 | ((context semantic-analyze-context)) |
| 204 | "Return a tag from CONTEXT that would be most interesting to a user." | 204 | "Return a tag from CONTEXT that would be most interesting to a user." |
| 205 | (let ((prefix (reverse (oref context :prefix)))) | 205 | (let ((prefix (reverse (oref context :prefix)))) |
| @@ -209,15 +209,15 @@ Optional argument DESIRED-TYPE may be a non-type tag to analyze." | |||
| 209 | ;; Return the found tag, or nil. | 209 | ;; Return the found tag, or nil. |
| 210 | (car prefix))) | 210 | (car prefix))) |
| 211 | 211 | ||
| 212 | (defmethod semantic-analyze-interesting-tag | 212 | (cl-defmethod semantic-analyze-interesting-tag |
| 213 | ((context semantic-analyze-context-functionarg)) | 213 | ((context semantic-analyze-context-functionarg)) |
| 214 | "Try the base, and if that fails, return what we are assigning into." | 214 | "Try the base, and if that fails, return what we are assigning into." |
| 215 | (or (call-next-method) (car-safe (oref context :function)))) | 215 | (or (cl-call-next-method) (car-safe (oref context :function)))) |
| 216 | 216 | ||
| 217 | (defmethod semantic-analyze-interesting-tag | 217 | (cl-defmethod semantic-analyze-interesting-tag |
| 218 | ((context semantic-analyze-context-assignment)) | 218 | ((context semantic-analyze-context-assignment)) |
| 219 | "Try the base, and if that fails, return what we are assigning into." | 219 | "Try the base, and if that fails, return what we are assigning into." |
| 220 | (or (call-next-method) (car-safe (oref context :assignee)))) | 220 | (or (cl-call-next-method) (car-safe (oref context :assignee)))) |
| 221 | 221 | ||
| 222 | ;;; ANALYSIS | 222 | ;;; ANALYSIS |
| 223 | ;; | 223 | ;; |
| @@ -743,7 +743,7 @@ Optional argument CTXT is the context to show." | |||
| 743 | ;; | 743 | ;; |
| 744 | (declare-function pulse-momentary-highlight-region "pulse") | 744 | (declare-function pulse-momentary-highlight-region "pulse") |
| 745 | 745 | ||
| 746 | (defmethod semantic-analyze-pulse ((context semantic-analyze-context)) | 746 | (cl-defmethod semantic-analyze-pulse ((context semantic-analyze-context)) |
| 747 | "Pulse the region that CONTEXT affects." | 747 | "Pulse the region that CONTEXT affects." |
| 748 | (require 'pulse) | 748 | (require 'pulse) |
| 749 | (with-current-buffer (oref context :buffer) | 749 | (with-current-buffer (oref context :buffer) |
| @@ -782,7 +782,7 @@ Use BUFF as a source of override methods." | |||
| 782 | (setq prefix (make-string (length prefix) ? )) | 782 | (setq prefix (make-string (length prefix) ? )) |
| 783 | )) | 783 | )) |
| 784 | 784 | ||
| 785 | (defmethod semantic-analyze-show ((context semantic-analyze-context)) | 785 | (cl-defmethod semantic-analyze-show ((context semantic-analyze-context)) |
| 786 | "Insert CONTEXT into the current buffer in a nice way." | 786 | "Insert CONTEXT into the current buffer in a nice way." |
| 787 | (semantic-analyze-princ-sequence (oref context prefix) "Prefix: " ) | 787 | (semantic-analyze-princ-sequence (oref context prefix) "Prefix: " ) |
| 788 | (semantic-analyze-princ-sequence (oref context prefixclass) "Prefix Classes: ") | 788 | (semantic-analyze-princ-sequence (oref context prefixclass) "Prefix Classes: ") |
| @@ -796,19 +796,19 @@ Use BUFF as a source of override methods." | |||
| 796 | (semantic-analyze-show (oref context scope))) | 796 | (semantic-analyze-show (oref context scope))) |
| 797 | ) | 797 | ) |
| 798 | 798 | ||
| 799 | (defmethod semantic-analyze-show ((context semantic-analyze-context-assignment)) | 799 | (cl-defmethod semantic-analyze-show ((context semantic-analyze-context-assignment)) |
| 800 | "Insert CONTEXT into the current buffer in a nice way." | 800 | "Insert CONTEXT into the current buffer in a nice way." |
| 801 | (semantic-analyze-princ-sequence (oref context assignee) "Assignee: ") | 801 | (semantic-analyze-princ-sequence (oref context assignee) "Assignee: ") |
| 802 | (call-next-method)) | 802 | (cl-call-next-method)) |
| 803 | 803 | ||
| 804 | (defmethod semantic-analyze-show ((context semantic-analyze-context-functionarg)) | 804 | (cl-defmethod semantic-analyze-show ((context semantic-analyze-context-functionarg)) |
| 805 | "Insert CONTEXT into the current buffer in a nice way." | 805 | "Insert CONTEXT into the current buffer in a nice way." |
| 806 | (semantic-analyze-princ-sequence (oref context function) "Function: ") | 806 | (semantic-analyze-princ-sequence (oref context function) "Function: ") |
| 807 | (princ "Argument Index: ") | 807 | (princ "Argument Index: ") |
| 808 | (princ (oref context index)) | 808 | (princ (oref context index)) |
| 809 | (princ "\n") | 809 | (princ "\n") |
| 810 | (semantic-analyze-princ-sequence (oref context argument) "Argument: ") | 810 | (semantic-analyze-princ-sequence (oref context argument) "Argument: ") |
| 811 | (call-next-method)) | 811 | (cl-call-next-method)) |
| 812 | 812 | ||
| 813 | (defun semantic-analyze-pop-to-context (context) | 813 | (defun semantic-analyze-pop-to-context (context) |
| 814 | "Display CONTEXT in a temporary buffer. | 814 | "Display CONTEXT in a temporary buffer. |
diff --git a/lisp/cedet/semantic/analyze/refs.el b/lisp/cedet/semantic/analyze/refs.el index 923163cee1c..3047dab5280 100644 --- a/lisp/cedet/semantic/analyze/refs.el +++ b/lisp/cedet/semantic/analyze/refs.el | |||
| @@ -100,7 +100,7 @@ Use `semantic-analyze-current-tag' to debug this fcn." | |||
| 100 | ;; | 100 | ;; |
| 101 | ;; These accessor methods will calculate the useful bits from the context, and cache values | 101 | ;; These accessor methods will calculate the useful bits from the context, and cache values |
| 102 | ;; into the context. | 102 | ;; into the context. |
| 103 | (defmethod semantic-analyze-refs-impl ((refs semantic-analyze-references) &optional in-buffer) | 103 | (cl-defmethod semantic-analyze-refs-impl ((refs semantic-analyze-references) &optional in-buffer) |
| 104 | "Return the implementations derived in the reference analyzer REFS. | 104 | "Return the implementations derived in the reference analyzer REFS. |
| 105 | Optional argument IN-BUFFER indicates that the returned tag should be in an active buffer." | 105 | Optional argument IN-BUFFER indicates that the returned tag should be in an active buffer." |
| 106 | (let ((allhits (oref refs rawsearchdata)) | 106 | (let ((allhits (oref refs rawsearchdata)) |
| @@ -125,7 +125,7 @@ Optional argument IN-BUFFER indicates that the returned tag should be in an acti | |||
| 125 | allhits) | 125 | allhits) |
| 126 | impl)) | 126 | impl)) |
| 127 | 127 | ||
| 128 | (defmethod semantic-analyze-refs-proto ((refs semantic-analyze-references) &optional in-buffer) | 128 | (cl-defmethod semantic-analyze-refs-proto ((refs semantic-analyze-references) &optional in-buffer) |
| 129 | "Return the prototypes derived in the reference analyzer REFS. | 129 | "Return the prototypes derived in the reference analyzer REFS. |
| 130 | Optional argument IN-BUFFER indicates that the returned tag should be in an active buffer." | 130 | Optional argument IN-BUFFER indicates that the returned tag should be in an active buffer." |
| 131 | (let ((allhits (oref refs rawsearchdata)) | 131 | (let ((allhits (oref refs rawsearchdata)) |
diff --git a/lisp/cedet/semantic/bovine/debug.el b/lisp/cedet/semantic/bovine/debug.el index 465a69a7341..8aebcd64eb2 100644 --- a/lisp/cedet/semantic/bovine/debug.el +++ b/lisp/cedet/semantic/bovine/debug.el | |||
| @@ -83,7 +83,7 @@ LEXTOKEN, is a token returned by the lexer which is being matched." | |||
| 83 | frame) | 83 | frame) |
| 84 | frame)) | 84 | frame)) |
| 85 | 85 | ||
| 86 | (defmethod semantic-debug-frame-highlight ((frame semantic-debug-frame)) | 86 | (cl-defmethod semantic-debug-frame-highlight ((frame semantic-debug-frame)) |
| 87 | "Highlight one parser frame." | 87 | "Highlight one parser frame." |
| 88 | (let* ((nonterm (oref frame nonterm)) | 88 | (let* ((nonterm (oref frame nonterm)) |
| 89 | (pb (oref semantic-debug-current-interface parser-buffer)) | 89 | (pb (oref semantic-debug-current-interface parser-buffer)) |
| @@ -102,7 +102,7 @@ LEXTOKEN, is a token returned by the lexer which is being matched." | |||
| 102 | (oref frame lextoken)) | 102 | (oref frame lextoken)) |
| 103 | )) | 103 | )) |
| 104 | 104 | ||
| 105 | (defmethod semantic-debug-frame-info ((frame semantic-debug-frame)) | 105 | (cl-defmethod semantic-debug-frame-info ((frame semantic-debug-frame)) |
| 106 | "Display info about this one parser frame." | 106 | "Display info about this one parser frame." |
| 107 | (message "%S" (oref frame collection)) | 107 | (message "%S" (oref frame collection)) |
| 108 | ) | 108 | ) |
| @@ -125,12 +125,12 @@ Argument CONDITION is the thrown error condition." | |||
| 125 | frame) | 125 | frame) |
| 126 | frame)) | 126 | frame)) |
| 127 | 127 | ||
| 128 | (defmethod semantic-debug-frame-highlight ((frame semantic-bovine-debug-error-frame)) | 128 | (cl-defmethod semantic-debug-frame-highlight ((frame semantic-bovine-debug-error-frame)) |
| 129 | "Highlight a frame from an action." | 129 | "Highlight a frame from an action." |
| 130 | ;; How do I get the location of the action in the source buffer? | 130 | ;; How do I get the location of the action in the source buffer? |
| 131 | ) | 131 | ) |
| 132 | 132 | ||
| 133 | (defmethod semantic-debug-frame-info ((frame semantic-bovine-debug-error-frame)) | 133 | (cl-defmethod semantic-debug-frame-info ((frame semantic-bovine-debug-error-frame)) |
| 134 | "Display info about the error thrown." | 134 | "Display info about the error thrown." |
| 135 | (message "Error: %S" (oref frame condition))) | 135 | (message "Error: %S" (oref frame condition))) |
| 136 | 136 | ||
diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el index 3f726ee56fd..ad931785aff 100644 --- a/lisp/cedet/semantic/complete.el +++ b/lisp/cedet/semantic/complete.el | |||
| @@ -930,7 +930,7 @@ derive from this list.") | |||
| 930 | The only options available for completion are those which can be logically | 930 | The only options available for completion are those which can be logically |
| 931 | inserted into the current context.") | 931 | inserted into the current context.") |
| 932 | 932 | ||
| 933 | (defmethod semantic-collector-calculate-completions-raw | 933 | (cl-defmethod semantic-collector-calculate-completions-raw |
| 934 | ((obj semantic-collector-analyze-completions) prefix completionlist) | 934 | ((obj semantic-collector-analyze-completions) prefix completionlist) |
| 935 | "calculate the completions for prefix from completionlist." | 935 | "calculate the completions for prefix from completionlist." |
| 936 | ;; if there are no completions yet, calculate them. | 936 | ;; if there are no completions yet, calculate them. |
| @@ -945,11 +945,11 @@ inserted into the current context.") | |||
| 945 | prefix | 945 | prefix |
| 946 | (oref obj first-pass-completions))))) | 946 | (oref obj first-pass-completions))))) |
| 947 | 947 | ||
| 948 | (defmethod semantic-collector-cleanup ((obj semantic-collector-abstract)) | 948 | (cl-defmethod semantic-collector-cleanup ((obj semantic-collector-abstract)) |
| 949 | "Clean up any mess this collector may have." | 949 | "Clean up any mess this collector may have." |
| 950 | nil) | 950 | nil) |
| 951 | 951 | ||
| 952 | (defmethod semantic-collector-next-action | 952 | (cl-defmethod semantic-collector-next-action |
| 953 | ((obj semantic-collector-abstract) partial) | 953 | ((obj semantic-collector-abstract) partial) |
| 954 | "What should we do next? OBJ can be used to determine the next action. | 954 | "What should we do next? OBJ can be used to determine the next action. |
| 955 | PARTIAL indicates if we are doing a partial completion." | 955 | PARTIAL indicates if we are doing a partial completion." |
| @@ -974,19 +974,19 @@ PARTIAL indicates if we are doing a partial completion." | |||
| 974 | 'complete-whitespace))) | 974 | 'complete-whitespace))) |
| 975 | 'complete)) | 975 | 'complete)) |
| 976 | 976 | ||
| 977 | (defmethod semantic-collector-last-prefix= ((obj semantic-collector-abstract) | 977 | (cl-defmethod semantic-collector-last-prefix= ((obj semantic-collector-abstract) |
| 978 | last-prefix) | 978 | last-prefix) |
| 979 | "Return non-nil if OBJ's prefix matches PREFIX." | 979 | "Return non-nil if OBJ's prefix matches PREFIX." |
| 980 | (and (slot-boundp obj 'last-prefix) | 980 | (and (slot-boundp obj 'last-prefix) |
| 981 | (string= (oref obj last-prefix) last-prefix))) | 981 | (string= (oref obj last-prefix) last-prefix))) |
| 982 | 982 | ||
| 983 | (defmethod semantic-collector-get-cache ((obj semantic-collector-abstract)) | 983 | (cl-defmethod semantic-collector-get-cache ((obj semantic-collector-abstract)) |
| 984 | "Get the raw cache of tags for completion. | 984 | "Get the raw cache of tags for completion. |
| 985 | Calculate the cache if there isn't one." | 985 | Calculate the cache if there isn't one." |
| 986 | (or (oref obj cache) | 986 | (or (oref obj cache) |
| 987 | (semantic-collector-calculate-cache obj))) | 987 | (semantic-collector-calculate-cache obj))) |
| 988 | 988 | ||
| 989 | (defmethod semantic-collector-calculate-completions-raw | 989 | (cl-defmethod semantic-collector-calculate-completions-raw |
| 990 | ((obj semantic-collector-abstract) prefix completionlist) | 990 | ((obj semantic-collector-abstract) prefix completionlist) |
| 991 | "Calculate the completions for prefix from completionlist. | 991 | "Calculate the completions for prefix from completionlist. |
| 992 | Output must be in semanticdb Find result format." | 992 | Output must be in semanticdb Find result format." |
| @@ -1005,7 +1005,7 @@ Output must be in semanticdb Find result format." | |||
| 1005 | (if result | 1005 | (if result |
| 1006 | (list (cons table result))))) | 1006 | (list (cons table result))))) |
| 1007 | 1007 | ||
| 1008 | (defmethod semantic-collector-calculate-completions | 1008 | (cl-defmethod semantic-collector-calculate-completions |
| 1009 | ((obj semantic-collector-abstract) prefix partial) | 1009 | ((obj semantic-collector-abstract) prefix partial) |
| 1010 | "Calculate completions for prefix as setup for other queries." | 1010 | "Calculate completions for prefix as setup for other queries." |
| 1011 | (let* ((case-fold-search semantic-case-fold) | 1011 | (let* ((case-fold-search semantic-case-fold) |
| @@ -1082,7 +1082,7 @@ Output must be in semanticdb Find result format." | |||
| 1082 | ))) | 1082 | ))) |
| 1083 | )) | 1083 | )) |
| 1084 | 1084 | ||
| 1085 | (defmethod semantic-collector-try-completion-whitespace | 1085 | (cl-defmethod semantic-collector-try-completion-whitespace |
| 1086 | ((obj semantic-collector-abstract) prefix) | 1086 | ((obj semantic-collector-abstract) prefix) |
| 1087 | "For OBJ, do whitespace completion based on PREFIX. | 1087 | "For OBJ, do whitespace completion based on PREFIX. |
| 1088 | This implies that if there are two completions, one matching | 1088 | This implies that if there are two completions, one matching |
| @@ -1114,7 +1114,7 @@ has been run first." | |||
| 1114 | ))) | 1114 | ))) |
| 1115 | 1115 | ||
| 1116 | 1116 | ||
| 1117 | (defmethod semantic-collector-current-exact-match ((obj semantic-collector-abstract)) | 1117 | (cl-defmethod semantic-collector-current-exact-match ((obj semantic-collector-abstract)) |
| 1118 | "Return the active valid MATCH from the semantic collector. | 1118 | "Return the active valid MATCH from the semantic collector. |
| 1119 | For now, just return the first element from our list of available | 1119 | For now, just return the first element from our list of available |
| 1120 | matches. For semanticdb based results, make sure the file is loaded | 1120 | matches. For semanticdb based results, make sure the file is loaded |
| @@ -1122,12 +1122,12 @@ into a buffer." | |||
| 1122 | (when (slot-boundp obj 'current-exact-match) | 1122 | (when (slot-boundp obj 'current-exact-match) |
| 1123 | (oref obj current-exact-match))) | 1123 | (oref obj current-exact-match))) |
| 1124 | 1124 | ||
| 1125 | (defmethod semantic-collector-current-whitespace-completion ((obj semantic-collector-abstract)) | 1125 | (cl-defmethod semantic-collector-current-whitespace-completion ((obj semantic-collector-abstract)) |
| 1126 | "Return the active whitespace completion value." | 1126 | "Return the active whitespace completion value." |
| 1127 | (when (slot-boundp obj 'last-whitespace-completion) | 1127 | (when (slot-boundp obj 'last-whitespace-completion) |
| 1128 | (oref obj last-whitespace-completion))) | 1128 | (oref obj last-whitespace-completion))) |
| 1129 | 1129 | ||
| 1130 | (defmethod semantic-collector-get-match ((obj semantic-collector-abstract)) | 1130 | (cl-defmethod semantic-collector-get-match ((obj semantic-collector-abstract)) |
| 1131 | "Return the active valid MATCH from the semantic collector. | 1131 | "Return the active valid MATCH from the semantic collector. |
| 1132 | For now, just return the first element from our list of available | 1132 | For now, just return the first element from our list of available |
| 1133 | matches. For semanticdb based results, make sure the file is loaded | 1133 | matches. For semanticdb based results, make sure the file is loaded |
| @@ -1135,7 +1135,7 @@ into a buffer." | |||
| 1135 | (when (slot-boundp obj 'current-exact-match) | 1135 | (when (slot-boundp obj 'current-exact-match) |
| 1136 | (semanticdb-find-result-nth-in-buffer (oref obj current-exact-match) 0))) | 1136 | (semanticdb-find-result-nth-in-buffer (oref obj current-exact-match) 0))) |
| 1137 | 1137 | ||
| 1138 | (defmethod semantic-collector-all-completions | 1138 | (cl-defmethod semantic-collector-all-completions |
| 1139 | ((obj semantic-collector-abstract) prefix) | 1139 | ((obj semantic-collector-abstract) prefix) |
| 1140 | "For OBJ, retrieve all completions matching PREFIX. | 1140 | "For OBJ, retrieve all completions matching PREFIX. |
| 1141 | The returned list consists of all the tags currently | 1141 | The returned list consists of all the tags currently |
| @@ -1143,7 +1143,7 @@ matching PREFIX." | |||
| 1143 | (when (slot-boundp obj 'last-all-completions) | 1143 | (when (slot-boundp obj 'last-all-completions) |
| 1144 | (oref obj last-all-completions))) | 1144 | (oref obj last-all-completions))) |
| 1145 | 1145 | ||
| 1146 | (defmethod semantic-collector-try-completion | 1146 | (cl-defmethod semantic-collector-try-completion |
| 1147 | ((obj semantic-collector-abstract) prefix) | 1147 | ((obj semantic-collector-abstract) prefix) |
| 1148 | "For OBJ, attempt to match PREFIX. | 1148 | "For OBJ, attempt to match PREFIX. |
| 1149 | See `try-completion' for details on how this works. | 1149 | See `try-completion' for details on how this works. |
| @@ -1154,13 +1154,13 @@ with that name." | |||
| 1154 | (if (slot-boundp obj 'last-completion) | 1154 | (if (slot-boundp obj 'last-completion) |
| 1155 | (oref obj last-completion))) | 1155 | (oref obj last-completion))) |
| 1156 | 1156 | ||
| 1157 | (defmethod semantic-collector-calculate-cache | 1157 | (cl-defmethod semantic-collector-calculate-cache |
| 1158 | ((obj semantic-collector-abstract)) | 1158 | ((obj semantic-collector-abstract)) |
| 1159 | "Calculate the completion cache for OBJ." | 1159 | "Calculate the completion cache for OBJ." |
| 1160 | nil | 1160 | nil |
| 1161 | ) | 1161 | ) |
| 1162 | 1162 | ||
| 1163 | (defmethod semantic-collector-flush ((this semantic-collector-abstract)) | 1163 | (cl-defmethod semantic-collector-flush ((this semantic-collector-abstract)) |
| 1164 | "Flush THIS collector object, clearing any caches and prefix." | 1164 | "Flush THIS collector object, clearing any caches and prefix." |
| 1165 | (oset this cache nil) | 1165 | (oset this cache nil) |
| 1166 | (slot-makeunbound this 'last-prefix) | 1166 | (slot-makeunbound this 'last-prefix) |
| @@ -1177,7 +1177,7 @@ with that name." | |||
| 1177 | These collectors track themselves on a per-buffer basis." | 1177 | These collectors track themselves on a per-buffer basis." |
| 1178 | :abstract t) | 1178 | :abstract t) |
| 1179 | 1179 | ||
| 1180 | (defmethod constructor :STATIC ((this semantic-collector-buffer-abstract) | 1180 | (cl-defmethod constructor ((this (subclass semantic-collector-buffer-abstract)) |
| 1181 | newname &rest fields) | 1181 | newname &rest fields) |
| 1182 | "Reuse previously created objects of this type in buffer." | 1182 | "Reuse previously created objects of this type in buffer." |
| 1183 | (let ((old nil) | 1183 | (let ((old nil) |
| @@ -1186,7 +1186,7 @@ These collectors track themselves on a per-buffer basis." | |||
| 1186 | (if (eq (eieio-object-class (car bl)) this) | 1186 | (if (eq (eieio-object-class (car bl)) this) |
| 1187 | (setq old (car bl)))) | 1187 | (setq old (car bl)))) |
| 1188 | (unless old | 1188 | (unless old |
| 1189 | (let ((new (call-next-method))) | 1189 | (let ((new (cl-call-next-method))) |
| 1190 | (add-to-list 'semantic-collector-per-buffer-list new) | 1190 | (add-to-list 'semantic-collector-per-buffer-list new) |
| 1191 | (setq old new))) | 1191 | (setq old new))) |
| 1192 | (slot-makeunbound old 'last-completion) | 1192 | (slot-makeunbound old 'last-completion) |
| @@ -1217,7 +1217,7 @@ NEWCACHE is the new tag table, but we ignore it." | |||
| 1217 | When searching for a tag, uses semantic deep search functions. | 1217 | When searching for a tag, uses semantic deep search functions. |
| 1218 | Basics search only in the current buffer.") | 1218 | Basics search only in the current buffer.") |
| 1219 | 1219 | ||
| 1220 | (defmethod semantic-collector-calculate-cache | 1220 | (cl-defmethod semantic-collector-calculate-cache |
| 1221 | ((obj semantic-collector-buffer-deep)) | 1221 | ((obj semantic-collector-buffer-deep)) |
| 1222 | "Calculate the completion cache for OBJ. | 1222 | "Calculate the completion cache for OBJ. |
| 1223 | Uses `semantic-flatten-tags-table'" | 1223 | Uses `semantic-flatten-tags-table'" |
| @@ -1247,7 +1247,7 @@ Uses semanticdb for searching all tags in the current project." | |||
| 1247 | "Completion engine for tags in a project.") | 1247 | "Completion engine for tags in a project.") |
| 1248 | 1248 | ||
| 1249 | 1249 | ||
| 1250 | (defmethod semantic-collector-calculate-completions-raw | 1250 | (cl-defmethod semantic-collector-calculate-completions-raw |
| 1251 | ((obj semantic-collector-project) prefix completionlist) | 1251 | ((obj semantic-collector-project) prefix completionlist) |
| 1252 | "Calculate the completions for prefix from completionlist." | 1252 | "Calculate the completions for prefix from completionlist." |
| 1253 | (semanticdb-find-tags-for-completion prefix (oref obj path))) | 1253 | (semanticdb-find-tags-for-completion prefix (oref obj path))) |
| @@ -1260,7 +1260,7 @@ Uses semanticdb for searching all tags in the current project." | |||
| 1260 | (declare-function semanticdb-brute-deep-find-tags-for-completion | 1260 | (declare-function semanticdb-brute-deep-find-tags-for-completion |
| 1261 | "semantic/db-find") | 1261 | "semantic/db-find") |
| 1262 | 1262 | ||
| 1263 | (defmethod semantic-collector-calculate-completions-raw | 1263 | (cl-defmethod semantic-collector-calculate-completions-raw |
| 1264 | ((obj semantic-collector-project-brutish) prefix completionlist) | 1264 | ((obj semantic-collector-project-brutish) prefix completionlist) |
| 1265 | "Calculate the completions for prefix from completionlist." | 1265 | "Calculate the completions for prefix from completionlist." |
| 1266 | (require 'semantic/db-find) | 1266 | (require 'semantic/db-find) |
| @@ -1274,7 +1274,7 @@ Uses semanticdb for searching all tags in the current project." | |||
| 1274 | "The scope the local members are being completed from.")) | 1274 | "The scope the local members are being completed from.")) |
| 1275 | "Completion engine for tags in a project.") | 1275 | "Completion engine for tags in a project.") |
| 1276 | 1276 | ||
| 1277 | (defmethod semantic-collector-calculate-completions-raw | 1277 | (cl-defmethod semantic-collector-calculate-completions-raw |
| 1278 | ((obj semantic-collector-local-members) prefix completionlist) | 1278 | ((obj semantic-collector-local-members) prefix completionlist) |
| 1279 | "Calculate the completions for prefix from completionlist." | 1279 | "Calculate the completions for prefix from completionlist." |
| 1280 | (let* ((scope (or (oref obj scope) | 1280 | (let* ((scope (or (oref obj scope) |
| @@ -1323,11 +1323,11 @@ Provides the basics for a displayor, including interacting with | |||
| 1323 | a collector, and tracking tables of completion to display." | 1323 | a collector, and tracking tables of completion to display." |
| 1324 | :abstract t) | 1324 | :abstract t) |
| 1325 | 1325 | ||
| 1326 | (defmethod semantic-displayor-cleanup ((obj semantic-displayor-abstract)) | 1326 | (cl-defmethod semantic-displayor-cleanup ((obj semantic-displayor-abstract)) |
| 1327 | "Clean up any mess this displayor may have." | 1327 | "Clean up any mess this displayor may have." |
| 1328 | nil) | 1328 | nil) |
| 1329 | 1329 | ||
| 1330 | (defmethod semantic-displayor-next-action ((obj semantic-displayor-abstract)) | 1330 | (cl-defmethod semantic-displayor-next-action ((obj semantic-displayor-abstract)) |
| 1331 | "The next action to take on the minibuffer related to display." | 1331 | "The next action to take on the minibuffer related to display." |
| 1332 | (if (and (slot-boundp obj 'last-prefix) | 1332 | (if (and (slot-boundp obj 'last-prefix) |
| 1333 | (or (eq this-command 'semantic-complete-inline-TAB) | 1333 | (or (eq this-command 'semantic-complete-inline-TAB) |
| @@ -1336,33 +1336,33 @@ a collector, and tracking tables of completion to display." | |||
| 1336 | 'scroll | 1336 | 'scroll |
| 1337 | 'display)) | 1337 | 'display)) |
| 1338 | 1338 | ||
| 1339 | (defmethod semantic-displayor-set-completions ((obj semantic-displayor-abstract) | 1339 | (cl-defmethod semantic-displayor-set-completions ((obj semantic-displayor-abstract) |
| 1340 | table prefix) | 1340 | table prefix) |
| 1341 | "Set the list of tags to be completed over to TABLE." | 1341 | "Set the list of tags to be completed over to TABLE." |
| 1342 | (oset obj table table) | 1342 | (oset obj table table) |
| 1343 | (oset obj last-prefix prefix)) | 1343 | (oset obj last-prefix prefix)) |
| 1344 | 1344 | ||
| 1345 | (defmethod semantic-displayor-show-request ((obj semantic-displayor-abstract)) | 1345 | (cl-defmethod semantic-displayor-show-request ((obj semantic-displayor-abstract)) |
| 1346 | "A request to show the current tags table." | 1346 | "A request to show the current tags table." |
| 1347 | (ding)) | 1347 | (ding)) |
| 1348 | 1348 | ||
| 1349 | (defmethod semantic-displayor-focus-request ((obj semantic-displayor-abstract)) | 1349 | (cl-defmethod semantic-displayor-focus-request ((obj semantic-displayor-abstract)) |
| 1350 | "A request to for the displayor to focus on some tag option." | 1350 | "A request to for the displayor to focus on some tag option." |
| 1351 | (ding)) | 1351 | (ding)) |
| 1352 | 1352 | ||
| 1353 | (defmethod semantic-displayor-scroll-request ((obj semantic-displayor-abstract)) | 1353 | (cl-defmethod semantic-displayor-scroll-request ((obj semantic-displayor-abstract)) |
| 1354 | "A request to for the displayor to scroll the completion list (if needed)." | 1354 | "A request to for the displayor to scroll the completion list (if needed)." |
| 1355 | (scroll-other-window)) | 1355 | (scroll-other-window)) |
| 1356 | 1356 | ||
| 1357 | (defmethod semantic-displayor-focus-previous ((obj semantic-displayor-abstract)) | 1357 | (cl-defmethod semantic-displayor-focus-previous ((obj semantic-displayor-abstract)) |
| 1358 | "Set the current focus to the previous item." | 1358 | "Set the current focus to the previous item." |
| 1359 | nil) | 1359 | nil) |
| 1360 | 1360 | ||
| 1361 | (defmethod semantic-displayor-focus-next ((obj semantic-displayor-abstract)) | 1361 | (cl-defmethod semantic-displayor-focus-next ((obj semantic-displayor-abstract)) |
| 1362 | "Set the current focus to the next item." | 1362 | "Set the current focus to the next item." |
| 1363 | nil) | 1363 | nil) |
| 1364 | 1364 | ||
| 1365 | (defmethod semantic-displayor-current-focus ((obj semantic-displayor-abstract)) | 1365 | (cl-defmethod semantic-displayor-current-focus ((obj semantic-displayor-abstract)) |
| 1366 | "Return a single tag currently in focus. | 1366 | "Return a single tag currently in focus. |
| 1367 | This object type doesn't do focus, so will never have a focus object." | 1367 | This object type doesn't do focus, so will never have a focus object." |
| 1368 | nil) | 1368 | nil) |
| @@ -1381,7 +1381,7 @@ Traditional display mechanism for a list of possible completions. | |||
| 1381 | Completions are showin in a new buffer and listed with the ability | 1381 | Completions are showin in a new buffer and listed with the ability |
| 1382 | to click on the items to aid in completion.") | 1382 | to click on the items to aid in completion.") |
| 1383 | 1383 | ||
| 1384 | (defmethod semantic-displayor-show-request ((obj semantic-displayor-traditional)) | 1384 | (cl-defmethod semantic-displayor-show-request ((obj semantic-displayor-traditional)) |
| 1385 | "A request to show the current tags table." | 1385 | "A request to show the current tags table." |
| 1386 | 1386 | ||
| 1387 | ;; NOTE TO SELF. Find the character to type next, and emphasize it. | 1387 | ;; NOTE TO SELF. Find the character to type next, and emphasize it. |
| @@ -1412,7 +1412,7 @@ Focusing is a way of differentiating among multiple tags | |||
| 1412 | which have the same name." | 1412 | which have the same name." |
| 1413 | :abstract t) | 1413 | :abstract t) |
| 1414 | 1414 | ||
| 1415 | (defmethod semantic-displayor-next-action ((obj semantic-displayor-focus-abstract)) | 1415 | (cl-defmethod semantic-displayor-next-action ((obj semantic-displayor-focus-abstract)) |
| 1416 | "The next action to take on the minibuffer related to display." | 1416 | "The next action to take on the minibuffer related to display." |
| 1417 | (if (and (slot-boundp obj 'last-prefix) | 1417 | (if (and (slot-boundp obj 'last-prefix) |
| 1418 | (string= (oref obj last-prefix) (semantic-completion-text)) | 1418 | (string= (oref obj last-prefix) (semantic-completion-text)) |
| @@ -1428,13 +1428,13 @@ which have the same name." | |||
| 1428 | 'focus) | 1428 | 'focus) |
| 1429 | 'display)) | 1429 | 'display)) |
| 1430 | 1430 | ||
| 1431 | (defmethod semantic-displayor-set-completions ((obj semantic-displayor-focus-abstract) | 1431 | (cl-defmethod semantic-displayor-set-completions ((obj semantic-displayor-focus-abstract) |
| 1432 | table prefix) | 1432 | table prefix) |
| 1433 | "Set the list of tags to be completed over to TABLE." | 1433 | "Set the list of tags to be completed over to TABLE." |
| 1434 | (call-next-method) | 1434 | (cl-call-next-method) |
| 1435 | (slot-makeunbound obj 'focus)) | 1435 | (slot-makeunbound obj 'focus)) |
| 1436 | 1436 | ||
| 1437 | (defmethod semantic-displayor-focus-previous ((obj semantic-displayor-focus-abstract)) | 1437 | (cl-defmethod semantic-displayor-focus-previous ((obj semantic-displayor-focus-abstract)) |
| 1438 | "Set the current focus to the previous item. | 1438 | "Set the current focus to the previous item. |
| 1439 | Not meaningful return value." | 1439 | Not meaningful return value." |
| 1440 | (when (and (slot-boundp obj 'table) (oref obj table)) | 1440 | (when (and (slot-boundp obj 'table) (oref obj table)) |
| @@ -1446,7 +1446,7 @@ Not meaningful return value." | |||
| 1446 | ) | 1446 | ) |
| 1447 | ))) | 1447 | ))) |
| 1448 | 1448 | ||
| 1449 | (defmethod semantic-displayor-focus-next ((obj semantic-displayor-focus-abstract)) | 1449 | (cl-defmethod semantic-displayor-focus-next ((obj semantic-displayor-focus-abstract)) |
| 1450 | "Set the current focus to the next item. | 1450 | "Set the current focus to the next item. |
| 1451 | Not meaningful return value." | 1451 | Not meaningful return value." |
| 1452 | (when (and (slot-boundp obj 'table) (oref obj table)) | 1452 | (when (and (slot-boundp obj 'table) (oref obj table)) |
| @@ -1459,13 +1459,13 @@ Not meaningful return value." | |||
| 1459 | (oset obj focus 0)) | 1459 | (oset obj focus 0)) |
| 1460 | ))) | 1460 | ))) |
| 1461 | 1461 | ||
| 1462 | (defmethod semantic-displayor-focus-tag ((obj semantic-displayor-focus-abstract)) | 1462 | (cl-defmethod semantic-displayor-focus-tag ((obj semantic-displayor-focus-abstract)) |
| 1463 | "Return the next tag OBJ should focus on." | 1463 | "Return the next tag OBJ should focus on." |
| 1464 | (when (and (slot-boundp obj 'table) (oref obj table)) | 1464 | (when (and (slot-boundp obj 'table) (oref obj table)) |
| 1465 | (with-slots (table) obj | 1465 | (with-slots (table) obj |
| 1466 | (semanticdb-find-result-nth table (oref obj focus))))) | 1466 | (semanticdb-find-result-nth table (oref obj focus))))) |
| 1467 | 1467 | ||
| 1468 | (defmethod semantic-displayor-current-focus ((obj semantic-displayor-focus-abstract)) | 1468 | (cl-defmethod semantic-displayor-current-focus ((obj semantic-displayor-focus-abstract)) |
| 1469 | "Return the tag currently in focus, or call parent method." | 1469 | "Return the tag currently in focus, or call parent method." |
| 1470 | (if (and (slot-boundp obj 'focus) | 1470 | (if (and (slot-boundp obj 'focus) |
| 1471 | (slot-boundp obj 'table) | 1471 | (slot-boundp obj 'table) |
| @@ -1481,7 +1481,7 @@ Not meaningful return value." | |||
| 1481 | ;; database. | 1481 | ;; database. |
| 1482 | (car (semanticdb-find-result-nth (oref obj table) (oref obj focus)))) | 1482 | (car (semanticdb-find-result-nth (oref obj table) (oref obj focus)))) |
| 1483 | ;; Do whatever | 1483 | ;; Do whatever |
| 1484 | (call-next-method))) | 1484 | (cl-call-next-method))) |
| 1485 | 1485 | ||
| 1486 | ;;; Simple displayor which performs traditional display completion, | 1486 | ;;; Simple displayor which performs traditional display completion, |
| 1487 | ;; and also focuses with highlighting. | 1487 | ;; and also focuses with highlighting. |
| @@ -1494,7 +1494,7 @@ Same as `semantic-displayor-traditional', but with selection between | |||
| 1494 | multiple tags with the same name done by 'focusing' on the source | 1494 | multiple tags with the same name done by 'focusing' on the source |
| 1495 | location of the different tags to differentiate them.") | 1495 | location of the different tags to differentiate them.") |
| 1496 | 1496 | ||
| 1497 | (defmethod semantic-displayor-focus-request | 1497 | (cl-defmethod semantic-displayor-focus-request |
| 1498 | ((obj semantic-displayor-traditional-with-focus-highlight)) | 1498 | ((obj semantic-displayor-traditional-with-focus-highlight)) |
| 1499 | "Focus in on possible tag completions. | 1499 | "Focus in on possible tag completions. |
| 1500 | Focus is performed by cycling through the tags and highlighting | 1500 | Focus is performed by cycling through the tags and highlighting |
| @@ -1630,7 +1630,7 @@ This will not happen if you directly set this variable via `setq'." | |||
| 1630 | "Display completions options in a tooltip. | 1630 | "Display completions options in a tooltip. |
| 1631 | Display mechanism using tooltip for a list of possible completions.") | 1631 | Display mechanism using tooltip for a list of possible completions.") |
| 1632 | 1632 | ||
| 1633 | (defmethod initialize-instance :AFTER ((obj semantic-displayor-tooltip) &rest args) | 1633 | (cl-defmethod initialize-instance :after ((obj semantic-displayor-tooltip) &rest args) |
| 1634 | "Make sure we have tooltips required." | 1634 | "Make sure we have tooltips required." |
| 1635 | (condition-case nil | 1635 | (condition-case nil |
| 1636 | (require 'tooltip) | 1636 | (require 'tooltip) |
| @@ -1639,12 +1639,12 @@ Display mechanism using tooltip for a list of possible completions.") | |||
| 1639 | 1639 | ||
| 1640 | (defvar tooltip-mode) | 1640 | (defvar tooltip-mode) |
| 1641 | 1641 | ||
| 1642 | (defmethod semantic-displayor-show-request ((obj semantic-displayor-tooltip)) | 1642 | (cl-defmethod semantic-displayor-show-request ((obj semantic-displayor-tooltip)) |
| 1643 | "A request to show the current tags table." | 1643 | "A request to show the current tags table." |
| 1644 | (if (or (not (featurep 'tooltip)) (not tooltip-mode)) | 1644 | (if (or (not (featurep 'tooltip)) (not tooltip-mode)) |
| 1645 | ;; If we cannot use tooltips, then go to the normal mode with | 1645 | ;; If we cannot use tooltips, then go to the normal mode with |
| 1646 | ;; a traditional completion buffer. | 1646 | ;; a traditional completion buffer. |
| 1647 | (call-next-method) | 1647 | (cl-call-next-method) |
| 1648 | (let* ((tablelong (semanticdb-strip-find-results (oref obj table))) | 1648 | (let* ((tablelong (semanticdb-strip-find-results (oref obj table))) |
| 1649 | (table (semantic-unique-tag-table-by-name tablelong)) | 1649 | (table (semantic-unique-tag-table-by-name tablelong)) |
| 1650 | (completions (mapcar semantic-completion-displayor-format-tag-function table)) | 1650 | (completions (mapcar semantic-completion-displayor-format-tag-function table)) |
| @@ -1752,7 +1752,7 @@ Return a cons cell (X . Y)" | |||
| 1752 | tooltip-frame-parameters) | 1752 | tooltip-frame-parameters) |
| 1753 | (tooltip-show text))) | 1753 | (tooltip-show text))) |
| 1754 | 1754 | ||
| 1755 | (defmethod semantic-displayor-scroll-request ((obj semantic-displayor-tooltip)) | 1755 | (cl-defmethod semantic-displayor-scroll-request ((obj semantic-displayor-tooltip)) |
| 1756 | "A request to for the displayor to scroll the completion list (if needed)." | 1756 | "A request to for the displayor to scroll the completion list (if needed)." |
| 1757 | ;; Do scrolling in the tooltip. | 1757 | ;; Do scrolling in the tooltip. |
| 1758 | (oset obj max-tags-initial 30) | 1758 | (oset obj max-tags-initial 30) |
| @@ -1778,9 +1778,9 @@ Completion displayor using ghost chars after point for focus options. | |||
| 1778 | Whichever completion is currently in focus will be displayed as ghost | 1778 | Whichever completion is currently in focus will be displayed as ghost |
| 1779 | text using overlay options.") | 1779 | text using overlay options.") |
| 1780 | 1780 | ||
| 1781 | (defmethod semantic-displayor-next-action ((obj semantic-displayor-ghost)) | 1781 | (cl-defmethod semantic-displayor-next-action ((obj semantic-displayor-ghost)) |
| 1782 | "The next action to take on the inline completion related to display." | 1782 | "The next action to take on the inline completion related to display." |
| 1783 | (let ((ans (call-next-method)) | 1783 | (let ((ans (cl-call-next-method)) |
| 1784 | (table (when (slot-boundp obj 'table) | 1784 | (table (when (slot-boundp obj 'table) |
| 1785 | (oref obj table)))) | 1785 | (oref obj table)))) |
| 1786 | (if (and (eq ans 'displayend) | 1786 | (if (and (eq ans 'displayend) |
| @@ -1790,22 +1790,22 @@ text using overlay options.") | |||
| 1790 | nil | 1790 | nil |
| 1791 | ans))) | 1791 | ans))) |
| 1792 | 1792 | ||
| 1793 | (defmethod semantic-displayor-cleanup ((obj semantic-displayor-ghost)) | 1793 | (cl-defmethod semantic-displayor-cleanup ((obj semantic-displayor-ghost)) |
| 1794 | "Clean up any mess this displayor may have." | 1794 | "Clean up any mess this displayor may have." |
| 1795 | (when (slot-boundp obj 'ghostoverlay) | 1795 | (when (slot-boundp obj 'ghostoverlay) |
| 1796 | (semantic-overlay-delete (oref obj ghostoverlay))) | 1796 | (semantic-overlay-delete (oref obj ghostoverlay))) |
| 1797 | ) | 1797 | ) |
| 1798 | 1798 | ||
| 1799 | (defmethod semantic-displayor-set-completions ((obj semantic-displayor-ghost) | 1799 | (cl-defmethod semantic-displayor-set-completions ((obj semantic-displayor-ghost) |
| 1800 | table prefix) | 1800 | table prefix) |
| 1801 | "Set the list of tags to be completed over to TABLE." | 1801 | "Set the list of tags to be completed over to TABLE." |
| 1802 | (call-next-method) | 1802 | (cl-call-next-method) |
| 1803 | 1803 | ||
| 1804 | (semantic-displayor-cleanup obj) | 1804 | (semantic-displayor-cleanup obj) |
| 1805 | ) | 1805 | ) |
| 1806 | 1806 | ||
| 1807 | 1807 | ||
| 1808 | (defmethod semantic-displayor-show-request ((obj semantic-displayor-ghost)) | 1808 | (cl-defmethod semantic-displayor-show-request ((obj semantic-displayor-ghost)) |
| 1809 | "A request to show the current tags table." | 1809 | "A request to show the current tags table." |
| 1810 | ; (if (oref obj first-show) | 1810 | ; (if (oref obj first-show) |
| 1811 | ; (progn | 1811 | ; (progn |
| @@ -1816,11 +1816,11 @@ text using overlay options.") | |||
| 1816 | ;; Only do the traditional thing if the first show request | 1816 | ;; Only do the traditional thing if the first show request |
| 1817 | ;; has been seen. Use the first one to start doing the ghost | 1817 | ;; has been seen. Use the first one to start doing the ghost |
| 1818 | ;; text display. | 1818 | ;; text display. |
| 1819 | ; (call-next-method) | 1819 | ; (cl-call-next-method) |
| 1820 | ; ) | 1820 | ; ) |
| 1821 | ) | 1821 | ) |
| 1822 | 1822 | ||
| 1823 | (defmethod semantic-displayor-focus-request | 1823 | (cl-defmethod semantic-displayor-focus-request |
| 1824 | ((obj semantic-displayor-ghost)) | 1824 | ((obj semantic-displayor-ghost)) |
| 1825 | "Focus in on possible tag completions. | 1825 | "Focus in on possible tag completions. |
| 1826 | Focus is performed by cycling through the tags and showing a possible | 1826 | Focus is performed by cycling through the tags and showing a possible |
diff --git a/lisp/cedet/semantic/db-ebrowse.el b/lisp/cedet/semantic/db-ebrowse.el index 2590dd1208d..2199a7d9862 100644 --- a/lisp/cedet/semantic/db-ebrowse.el +++ b/lisp/cedet/semantic/db-ebrowse.el | |||
| @@ -224,7 +224,7 @@ warn instead." | |||
| 224 | () | 224 | () |
| 225 | "Search Ebrowse for symbols.") | 225 | "Search Ebrowse for symbols.") |
| 226 | 226 | ||
| 227 | (defmethod semanticdb-needs-refresh-p ((table semanticdb-table-ebrowse)) | 227 | (cl-defmethod semanticdb-needs-refresh-p ((table semanticdb-table-ebrowse)) |
| 228 | "EBROWSE database do not need to be refreshed. | 228 | "EBROWSE database do not need to be refreshed. |
| 229 | 229 | ||
| 230 | JAVE: stub for needs-refresh, because, how do we know if BROWSE files | 230 | JAVE: stub for needs-refresh, because, how do we know if BROWSE files |
| @@ -282,7 +282,7 @@ For instance: /home/<username>/.semanticdb/!usr!include!BROWSE" | |||
| 282 | 282 | ||
| 283 | ;;; Methods for creating a database or tables | 283 | ;;; Methods for creating a database or tables |
| 284 | ;; | 284 | ;; |
| 285 | (defmethod semanticdb-create-database :STATIC ((dbeC semanticdb-project-database-ebrowse) | 285 | (cl-defmethod semanticdb-create-database ((dbeC (subclass semanticdb-project-database-ebrowse)) |
| 286 | directory) | 286 | directory) |
| 287 | "Create a new semantic database for DIRECTORY based on ebrowse. | 287 | "Create a new semantic database for DIRECTORY based on ebrowse. |
| 288 | If there is no database for DIRECTORY available, then | 288 | If there is no database for DIRECTORY available, then |
| @@ -325,7 +325,7 @@ If there is no database for DIRECTORY available, then | |||
| 325 | 325 | ||
| 326 | db))) | 326 | db))) |
| 327 | 327 | ||
| 328 | (defmethod semanticdb-ebrowse-strip-trees ((dbe semanticdb-project-database-ebrowse) | 328 | (cl-defmethod semanticdb-ebrowse-strip-trees ((dbe semanticdb-project-database-ebrowse) |
| 329 | data) | 329 | data) |
| 330 | "For the ebrowse database DBE, strip all tables from DATA." | 330 | "For the ebrowse database DBE, strip all tables from DATA." |
| 331 | ;JAVE what it actually seems to do is split the original tree in "tables" associated with files | 331 | ;JAVE what it actually seems to do is split the original tree in "tables" associated with files |
| @@ -479,7 +479,7 @@ Optional argument BASECLASSES specifies a baseclass to the tree being provided." | |||
| 479 | ;;; | 479 | ;;; |
| 480 | ;; Overload for converting the simple faux tag into something better. | 480 | ;; Overload for converting the simple faux tag into something better. |
| 481 | ;; | 481 | ;; |
| 482 | (defmethod semanticdb-normalize-tags ((obj semanticdb-table-ebrowse) tags) | 482 | (cl-defmethod semanticdb-normalize-tags ((obj semanticdb-table-ebrowse) tags) |
| 483 | "Convert in Ebrowse database OBJ a list of TAGS into a complete tag. | 483 | "Convert in Ebrowse database OBJ a list of TAGS into a complete tag. |
| 484 | The default tag provided by searches exclude many features of a | 484 | The default tag provided by searches exclude many features of a |
| 485 | semantic parsed tag. Look up the file for OBJ, and match TAGS | 485 | semantic parsed tag. Look up the file for OBJ, and match TAGS |
| @@ -521,7 +521,7 @@ return that." | |||
| 521 | (setq tags (cdr tags)))) | 521 | (setq tags (cdr tags)))) |
| 522 | tagret)) | 522 | tagret)) |
| 523 | 523 | ||
| 524 | (defmethod semanticdb-normalize-one-tag ((obj semanticdb-table-ebrowse) tag) | 524 | (cl-defmethod semanticdb-normalize-one-tag ((obj semanticdb-table-ebrowse) tag) |
| 525 | "Convert in Ebrowse database OBJ one TAG into a complete tag. | 525 | "Convert in Ebrowse database OBJ one TAG into a complete tag. |
| 526 | The default tag provided by searches exclude many features of a | 526 | The default tag provided by searches exclude many features of a |
| 527 | semantic parsed tag. Look up the file for OBJ, and match TAG | 527 | semantic parsed tag. Look up the file for OBJ, and match TAG |
| @@ -569,48 +569,48 @@ return that." | |||
| 569 | ;; NOTE WHEN IMPLEMENTING: Be sure to add doc-string updates explaining | 569 | ;; NOTE WHEN IMPLEMENTING: Be sure to add doc-string updates explaining |
| 570 | ;; how your new search routines are implemented. | 570 | ;; how your new search routines are implemented. |
| 571 | ;; | 571 | ;; |
| 572 | (defmethod semanticdb-find-tags-by-name-method | 572 | (cl-defmethod semanticdb-find-tags-by-name-method |
| 573 | ((table semanticdb-table-ebrowse) name &optional tags) | 573 | ((table semanticdb-table-ebrowse) name &optional tags) |
| 574 | "Find all tags named NAME in TABLE. | 574 | "Find all tags named NAME in TABLE. |
| 575 | Return a list of tags." | 575 | Return a list of tags." |
| 576 | ;;(message "semanticdb-find-tags-by-name-method name -- %s" name) | 576 | ;;(message "semanticdb-find-tags-by-name-method name -- %s" name) |
| 577 | (if tags | 577 | (if tags |
| 578 | ;; If TAGS are passed in, then we don't need to do work here. | 578 | ;; If TAGS are passed in, then we don't need to do work here. |
| 579 | (call-next-method) | 579 | (cl-call-next-method) |
| 580 | ;; If we ever need to do something special, add here. | 580 | ;; If we ever need to do something special, add here. |
| 581 | ;; Since ebrowse tags are converted into semantic tags, we can | 581 | ;; Since ebrowse tags are converted into semantic tags, we can |
| 582 | ;; get away with this sort of thing. | 582 | ;; get away with this sort of thing. |
| 583 | (call-next-method) | 583 | (cl-call-next-method) |
| 584 | ) | 584 | ) |
| 585 | ) | 585 | ) |
| 586 | 586 | ||
| 587 | (defmethod semanticdb-find-tags-by-name-regexp-method | 587 | (cl-defmethod semanticdb-find-tags-by-name-regexp-method |
| 588 | ((table semanticdb-table-ebrowse) regex &optional tags) | 588 | ((table semanticdb-table-ebrowse) regex &optional tags) |
| 589 | "Find all tags with name matching REGEX in TABLE. | 589 | "Find all tags with name matching REGEX in TABLE. |
| 590 | Optional argument TAGS is a list of tags to search. | 590 | Optional argument TAGS is a list of tags to search. |
| 591 | Return a list of tags." | 591 | Return a list of tags." |
| 592 | (if tags (call-next-method) | 592 | (if tags (cl-call-next-method) |
| 593 | ;; YOUR IMPLEMENTATION HERE | 593 | ;; YOUR IMPLEMENTATION HERE |
| 594 | (call-next-method) | 594 | (cl-call-next-method) |
| 595 | )) | 595 | )) |
| 596 | 596 | ||
| 597 | (defmethod semanticdb-find-tags-for-completion-method | 597 | (cl-defmethod semanticdb-find-tags-for-completion-method |
| 598 | ((table semanticdb-table-ebrowse) prefix &optional tags) | 598 | ((table semanticdb-table-ebrowse) prefix &optional tags) |
| 599 | "In TABLE, find all occurrences of tags matching PREFIX. | 599 | "In TABLE, find all occurrences of tags matching PREFIX. |
| 600 | Optional argument TAGS is a list of tags to search. | 600 | Optional argument TAGS is a list of tags to search. |
| 601 | Returns a table of all matching tags." | 601 | Returns a table of all matching tags." |
| 602 | (if tags (call-next-method) | 602 | (if tags (cl-call-next-method) |
| 603 | ;; YOUR IMPLEMENTATION HERE | 603 | ;; YOUR IMPLEMENTATION HERE |
| 604 | (call-next-method) | 604 | (cl-call-next-method) |
| 605 | )) | 605 | )) |
| 606 | 606 | ||
| 607 | (defmethod semanticdb-find-tags-by-class-method | 607 | (cl-defmethod semanticdb-find-tags-by-class-method |
| 608 | ((table semanticdb-table-ebrowse) class &optional tags) | 608 | ((table semanticdb-table-ebrowse) class &optional tags) |
| 609 | "In TABLE, find all occurrences of tags of CLASS. | 609 | "In TABLE, find all occurrences of tags of CLASS. |
| 610 | Optional argument TAGS is a list of tags to search. | 610 | Optional argument TAGS is a list of tags to search. |
| 611 | Returns a table of all matching tags." | 611 | Returns a table of all matching tags." |
| 612 | (if tags (call-next-method) | 612 | (if tags (cl-call-next-method) |
| 613 | (call-next-method))) | 613 | (cl-call-next-method))) |
| 614 | 614 | ||
| 615 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 615 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 616 | 616 | ||
| @@ -621,38 +621,38 @@ Returns a table of all matching tags." | |||
| 621 | ;; above. | 621 | ;; above. |
| 622 | ;; | 622 | ;; |
| 623 | 623 | ||
| 624 | (defmethod semanticdb-deep-find-tags-by-name-method | 624 | (cl-defmethod semanticdb-deep-find-tags-by-name-method |
| 625 | ((table semanticdb-table-ebrowse) name &optional tags) | 625 | ((table semanticdb-table-ebrowse) name &optional tags) |
| 626 | "Find all tags name NAME in TABLE. | 626 | "Find all tags name NAME in TABLE. |
| 627 | Optional argument TAGS is a list of tags to search. | 627 | Optional argument TAGS is a list of tags to search. |
| 628 | Like `semanticdb-find-tags-by-name-method' for ebrowse." | 628 | Like `semanticdb-find-tags-by-name-method' for ebrowse." |
| 629 | ;;(semanticdb-find-tags-by-name-method table name tags) | 629 | ;;(semanticdb-find-tags-by-name-method table name tags) |
| 630 | (call-next-method)) | 630 | (cl-call-next-method)) |
| 631 | 631 | ||
| 632 | (defmethod semanticdb-deep-find-tags-by-name-regexp-method | 632 | (cl-defmethod semanticdb-deep-find-tags-by-name-regexp-method |
| 633 | ((table semanticdb-table-ebrowse) regex &optional tags) | 633 | ((table semanticdb-table-ebrowse) regex &optional tags) |
| 634 | "Find all tags with name matching REGEX in TABLE. | 634 | "Find all tags with name matching REGEX in TABLE. |
| 635 | Optional argument TAGS is a list of tags to search. | 635 | Optional argument TAGS is a list of tags to search. |
| 636 | Like `semanticdb-find-tags-by-name-method' for ebrowse." | 636 | Like `semanticdb-find-tags-by-name-method' for ebrowse." |
| 637 | ;;(semanticdb-find-tags-by-name-regexp-method table regex tags) | 637 | ;;(semanticdb-find-tags-by-name-regexp-method table regex tags) |
| 638 | (call-next-method)) | 638 | (cl-call-next-method)) |
| 639 | 639 | ||
| 640 | (defmethod semanticdb-deep-find-tags-for-completion-method | 640 | (cl-defmethod semanticdb-deep-find-tags-for-completion-method |
| 641 | ((table semanticdb-table-ebrowse) prefix &optional tags) | 641 | ((table semanticdb-table-ebrowse) prefix &optional tags) |
| 642 | "In TABLE, find all occurrences of tags matching PREFIX. | 642 | "In TABLE, find all occurrences of tags matching PREFIX. |
| 643 | Optional argument TAGS is a list of tags to search. | 643 | Optional argument TAGS is a list of tags to search. |
| 644 | Like `semanticdb-find-tags-for-completion-method' for ebrowse." | 644 | Like `semanticdb-find-tags-for-completion-method' for ebrowse." |
| 645 | ;;(semanticdb-find-tags-for-completion-method table prefix tags) | 645 | ;;(semanticdb-find-tags-for-completion-method table prefix tags) |
| 646 | (call-next-method)) | 646 | (cl-call-next-method)) |
| 647 | 647 | ||
| 648 | ;;; Advanced Searches | 648 | ;;; Advanced Searches |
| 649 | ;; | 649 | ;; |
| 650 | (defmethod semanticdb-find-tags-external-children-of-type-method | 650 | (cl-defmethod semanticdb-find-tags-external-children-of-type-method |
| 651 | ((table semanticdb-table-ebrowse) type &optional tags) | 651 | ((table semanticdb-table-ebrowse) type &optional tags) |
| 652 | "Find all nonterminals which are child elements of TYPE | 652 | "Find all nonterminals which are child elements of TYPE |
| 653 | Optional argument TAGS is a list of tags to search. | 653 | Optional argument TAGS is a list of tags to search. |
| 654 | Return a list of tags." | 654 | Return a list of tags." |
| 655 | (if tags (call-next-method) | 655 | (if tags (cl-call-next-method) |
| 656 | ;; Ebrowse collects all this type of stuff together for us. | 656 | ;; Ebrowse collects all this type of stuff together for us. |
| 657 | ;; but we can't use it.... yet. | 657 | ;; but we can't use it.... yet. |
| 658 | nil | 658 | nil |
diff --git a/lisp/cedet/semantic/db-el.el b/lisp/cedet/semantic/db-el.el index be9ffe31b87..e37b65a461e 100644 --- a/lisp/cedet/semantic/db-el.el +++ b/lisp/cedet/semantic/db-el.el | |||
| @@ -44,16 +44,16 @@ | |||
| 44 | ) | 44 | ) |
| 45 | "A table for returning search results from Emacs.") | 45 | "A table for returning search results from Emacs.") |
| 46 | 46 | ||
| 47 | (defmethod semanticdb-refresh-table ((obj semanticdb-table-emacs-lisp) &optional force) | 47 | (cl-defmethod semanticdb-refresh-table ((obj semanticdb-table-emacs-lisp) &optional force) |
| 48 | "Do not refresh Emacs Lisp table. | 48 | "Do not refresh Emacs Lisp table. |
| 49 | It does not need refreshing." | 49 | It does not need refreshing." |
| 50 | nil) | 50 | nil) |
| 51 | 51 | ||
| 52 | (defmethod semanticdb-needs-refresh-p ((obj semanticdb-table-emacs-lisp)) | 52 | (cl-defmethod semanticdb-needs-refresh-p ((obj semanticdb-table-emacs-lisp)) |
| 53 | "Return nil, we never need a refresh." | 53 | "Return nil, we never need a refresh." |
| 54 | nil) | 54 | nil) |
| 55 | 55 | ||
| 56 | (defmethod object-print ((obj semanticdb-table-emacs-lisp) &rest strings) | 56 | (cl-defmethod object-print ((obj semanticdb-table-emacs-lisp) &rest strings) |
| 57 | "Pretty printer extension for `semanticdb-table-emacs-lisp'. | 57 | "Pretty printer extension for `semanticdb-table-emacs-lisp'. |
| 58 | Adds the number of tags in this file to the object print name." | 58 | Adds the number of tags in this file to the object print name." |
| 59 | (apply 'call-next-method obj (cons " (proxy)" strings))) | 59 | (apply 'call-next-method obj (cons " (proxy)" strings))) |
| @@ -67,7 +67,7 @@ Adds the number of tags in this file to the object print name." | |||
| 67 | ) | 67 | ) |
| 68 | "Database representing Emacs core.") | 68 | "Database representing Emacs core.") |
| 69 | 69 | ||
| 70 | (defmethod object-print ((obj semanticdb-project-database-emacs-lisp) &rest strings) | 70 | (cl-defmethod object-print ((obj semanticdb-project-database-emacs-lisp) &rest strings) |
| 71 | "Pretty printer extension for `semanticdb-table-emacs-lisp'. | 71 | "Pretty printer extension for `semanticdb-table-emacs-lisp'. |
| 72 | Adds the number of tags in this file to the object print name." | 72 | Adds the number of tags in this file to the object print name." |
| 73 | (let ((count 0)) | 73 | (let ((count 0)) |
| @@ -90,7 +90,7 @@ the omniscience database.") | |||
| 90 | 90 | ||
| 91 | ;;; Filename based methods | 91 | ;;; Filename based methods |
| 92 | ;; | 92 | ;; |
| 93 | (defmethod semanticdb-get-database-tables ((obj semanticdb-project-database-emacs-lisp)) | 93 | (cl-defmethod semanticdb-get-database-tables ((obj semanticdb-project-database-emacs-lisp)) |
| 94 | "For an Emacs Lisp database, there are no explicit tables. | 94 | "For an Emacs Lisp database, there are no explicit tables. |
| 95 | Create one of our special tables that can act as an intermediary." | 95 | Create one of our special tables that can act as an intermediary." |
| 96 | ;; We need to return something since there is always the "master table" | 96 | ;; We need to return something since there is always the "master table" |
| @@ -101,34 +101,34 @@ Create one of our special tables that can act as an intermediary." | |||
| 101 | (oset newtable parent-db obj) | 101 | (oset newtable parent-db obj) |
| 102 | (oset newtable tags nil) | 102 | (oset newtable tags nil) |
| 103 | )) | 103 | )) |
| 104 | (call-next-method)) | 104 | (cl-call-next-method)) |
| 105 | 105 | ||
| 106 | (defmethod semanticdb-file-table ((obj semanticdb-project-database-emacs-lisp) filename) | 106 | (cl-defmethod semanticdb-file-table ((obj semanticdb-project-database-emacs-lisp) filename) |
| 107 | "From OBJ, return FILENAME's associated table object. | 107 | "From OBJ, return FILENAME's associated table object. |
| 108 | For Emacs Lisp, creates a specialized table." | 108 | For Emacs Lisp, creates a specialized table." |
| 109 | (car (semanticdb-get-database-tables obj)) | 109 | (car (semanticdb-get-database-tables obj)) |
| 110 | ) | 110 | ) |
| 111 | 111 | ||
| 112 | (defmethod semanticdb-get-tags ((table semanticdb-table-emacs-lisp )) | 112 | (cl-defmethod semanticdb-get-tags ((table semanticdb-table-emacs-lisp )) |
| 113 | "Return the list of tags belonging to TABLE." | 113 | "Return the list of tags belonging to TABLE." |
| 114 | ;; specialty table ? Probably derive tags at request time. | 114 | ;; specialty table ? Probably derive tags at request time. |
| 115 | nil) | 115 | nil) |
| 116 | 116 | ||
| 117 | (defmethod semanticdb-equivalent-mode ((table semanticdb-table-emacs-lisp) &optional buffer) | 117 | (cl-defmethod semanticdb-equivalent-mode ((table semanticdb-table-emacs-lisp) &optional buffer) |
| 118 | "Return non-nil if TABLE's mode is equivalent to BUFFER. | 118 | "Return non-nil if TABLE's mode is equivalent to BUFFER. |
| 119 | Equivalent modes are specified by the `semantic-equivalent-major-modes' | 119 | Equivalent modes are specified by the `semantic-equivalent-major-modes' |
| 120 | local variable." | 120 | local variable." |
| 121 | (with-current-buffer buffer | 121 | (with-current-buffer buffer |
| 122 | (eq (or mode-local-active-mode major-mode) 'emacs-lisp-mode))) | 122 | (eq (or mode-local-active-mode major-mode) 'emacs-lisp-mode))) |
| 123 | 123 | ||
| 124 | (defmethod semanticdb-full-filename ((obj semanticdb-table-emacs-lisp)) | 124 | (cl-defmethod semanticdb-full-filename ((obj semanticdb-table-emacs-lisp)) |
| 125 | "Fetch the full filename that OBJ refers to. | 125 | "Fetch the full filename that OBJ refers to. |
| 126 | For Emacs Lisp system DB, there isn't one." | 126 | For Emacs Lisp system DB, there isn't one." |
| 127 | nil) | 127 | nil) |
| 128 | 128 | ||
| 129 | ;;; Conversion | 129 | ;;; Conversion |
| 130 | ;; | 130 | ;; |
| 131 | (defmethod semanticdb-normalize-tags ((obj semanticdb-table-emacs-lisp) tags) | 131 | (cl-defmethod semanticdb-normalize-tags ((obj semanticdb-table-emacs-lisp) tags) |
| 132 | "Convert tags, originating from Emacs OBJ, into standardized form." | 132 | "Convert tags, originating from Emacs OBJ, into standardized form." |
| 133 | (let ((newtags nil)) | 133 | (let ((newtags nil)) |
| 134 | (dolist (T tags) | 134 | (dolist (T tags) |
| @@ -138,7 +138,7 @@ For Emacs Lisp system DB, there isn't one." | |||
| 138 | ;; There is no promise to have files associated. | 138 | ;; There is no promise to have files associated. |
| 139 | (nreverse newtags))) | 139 | (nreverse newtags))) |
| 140 | 140 | ||
| 141 | (defmethod semanticdb-normalize-one-tag ((obj semanticdb-table-emacs-lisp) tag) | 141 | (cl-defmethod semanticdb-normalize-one-tag ((obj semanticdb-table-emacs-lisp) tag) |
| 142 | "Convert one TAG, originating from Emacs OBJ, into standardized form. | 142 | "Convert one TAG, originating from Emacs OBJ, into standardized form. |
| 143 | If Emacs cannot resolve this symbol to a particular file, then return nil." | 143 | If Emacs cannot resolve this symbol to a particular file, then return nil." |
| 144 | ;; Here's the idea. For each tag, get the name, then use | 144 | ;; Here's the idea. For each tag, get the name, then use |
| @@ -245,12 +245,12 @@ TOKTYPE is a hint to the type of tag desired." | |||
| 245 | (defvar semanticdb-elisp-mapatom-collector nil | 245 | (defvar semanticdb-elisp-mapatom-collector nil |
| 246 | "Variable used to collect `mapatoms' output.") | 246 | "Variable used to collect `mapatoms' output.") |
| 247 | 247 | ||
| 248 | (defmethod semanticdb-find-tags-by-name-method | 248 | (cl-defmethod semanticdb-find-tags-by-name-method |
| 249 | ((table semanticdb-table-emacs-lisp) name &optional tags) | 249 | ((table semanticdb-table-emacs-lisp) name &optional tags) |
| 250 | "Find all tags named NAME in TABLE. | 250 | "Find all tags named NAME in TABLE. |
| 251 | Uses `intern-soft' to match NAME to Emacs symbols. | 251 | Uses `intern-soft' to match NAME to Emacs symbols. |
| 252 | Return a list of tags." | 252 | Return a list of tags." |
| 253 | (if tags (call-next-method) | 253 | (if tags (cl-call-next-method) |
| 254 | ;; No need to search. Use `intern-soft' which does the same thing for us. | 254 | ;; No need to search. Use `intern-soft' which does the same thing for us. |
| 255 | (let* ((sym (intern-soft name)) | 255 | (let* ((sym (intern-soft name)) |
| 256 | (fun (semanticdb-elisp-sym->tag sym 'function)) | 256 | (fun (semanticdb-elisp-sym->tag sym 'function)) |
| @@ -266,52 +266,52 @@ Return a list of tags." | |||
| 266 | taglst | 266 | taglst |
| 267 | )))) | 267 | )))) |
| 268 | 268 | ||
| 269 | (defmethod semanticdb-find-tags-by-name-regexp-method | 269 | (cl-defmethod semanticdb-find-tags-by-name-regexp-method |
| 270 | ((table semanticdb-table-emacs-lisp) regex &optional tags) | 270 | ((table semanticdb-table-emacs-lisp) regex &optional tags) |
| 271 | "Find all tags with name matching REGEX in TABLE. | 271 | "Find all tags with name matching REGEX in TABLE. |
| 272 | Optional argument TAGS is a list of tags to search. | 272 | Optional argument TAGS is a list of tags to search. |
| 273 | Uses `apropos-internal' to find matches. | 273 | Uses `apropos-internal' to find matches. |
| 274 | Return a list of tags." | 274 | Return a list of tags." |
| 275 | (if tags (call-next-method) | 275 | (if tags (cl-call-next-method) |
| 276 | (delq nil (mapcar 'semanticdb-elisp-sym->tag | 276 | (delq nil (mapcar 'semanticdb-elisp-sym->tag |
| 277 | (apropos-internal regex))))) | 277 | (apropos-internal regex))))) |
| 278 | 278 | ||
| 279 | (defmethod semanticdb-find-tags-for-completion-method | 279 | (cl-defmethod semanticdb-find-tags-for-completion-method |
| 280 | ((table semanticdb-table-emacs-lisp) prefix &optional tags) | 280 | ((table semanticdb-table-emacs-lisp) prefix &optional tags) |
| 281 | "In TABLE, find all occurrences of tags matching PREFIX. | 281 | "In TABLE, find all occurrences of tags matching PREFIX. |
| 282 | Optional argument TAGS is a list of tags to search. | 282 | Optional argument TAGS is a list of tags to search. |
| 283 | Returns a table of all matching tags." | 283 | Returns a table of all matching tags." |
| 284 | (if tags (call-next-method) | 284 | (if tags (cl-call-next-method) |
| 285 | (delq nil (mapcar 'semanticdb-elisp-sym->tag | 285 | (delq nil (mapcar 'semanticdb-elisp-sym->tag |
| 286 | (all-completions prefix obarray))))) | 286 | (all-completions prefix obarray))))) |
| 287 | 287 | ||
| 288 | (defmethod semanticdb-find-tags-by-class-method | 288 | (cl-defmethod semanticdb-find-tags-by-class-method |
| 289 | ((table semanticdb-table-emacs-lisp) class &optional tags) | 289 | ((table semanticdb-table-emacs-lisp) class &optional tags) |
| 290 | "In TABLE, find all occurrences of tags of CLASS. | 290 | "In TABLE, find all occurrences of tags of CLASS. |
| 291 | Optional argument TAGS is a list of tags to search. | 291 | Optional argument TAGS is a list of tags to search. |
| 292 | Returns a table of all matching tags." | 292 | Returns a table of all matching tags." |
| 293 | (if tags (call-next-method) | 293 | (if tags (cl-call-next-method) |
| 294 | ;; We could implement this, but it could be messy. | 294 | ;; We could implement this, but it could be messy. |
| 295 | nil)) | 295 | nil)) |
| 296 | 296 | ||
| 297 | ;;; Deep Searches | 297 | ;;; Deep Searches |
| 298 | ;; | 298 | ;; |
| 299 | ;; For Emacs Lisp deep searches are like top level searches. | 299 | ;; For Emacs Lisp deep searches are like top level searches. |
| 300 | (defmethod semanticdb-deep-find-tags-by-name-method | 300 | (cl-defmethod semanticdb-deep-find-tags-by-name-method |
| 301 | ((table semanticdb-table-emacs-lisp) name &optional tags) | 301 | ((table semanticdb-table-emacs-lisp) name &optional tags) |
| 302 | "Find all tags name NAME in TABLE. | 302 | "Find all tags name NAME in TABLE. |
| 303 | Optional argument TAGS is a list of tags to search. | 303 | Optional argument TAGS is a list of tags to search. |
| 304 | Like `semanticdb-find-tags-by-name-method' for Emacs Lisp." | 304 | Like `semanticdb-find-tags-by-name-method' for Emacs Lisp." |
| 305 | (semanticdb-find-tags-by-name-method table name tags)) | 305 | (semanticdb-find-tags-by-name-method table name tags)) |
| 306 | 306 | ||
| 307 | (defmethod semanticdb-deep-find-tags-by-name-regexp-method | 307 | (cl-defmethod semanticdb-deep-find-tags-by-name-regexp-method |
| 308 | ((table semanticdb-table-emacs-lisp) regex &optional tags) | 308 | ((table semanticdb-table-emacs-lisp) regex &optional tags) |
| 309 | "Find all tags with name matching REGEX in TABLE. | 309 | "Find all tags with name matching REGEX in TABLE. |
| 310 | Optional argument TAGS is a list of tags to search. | 310 | Optional argument TAGS is a list of tags to search. |
| 311 | Like `semanticdb-find-tags-by-name-method' for Emacs Lisp." | 311 | Like `semanticdb-find-tags-by-name-method' for Emacs Lisp." |
| 312 | (semanticdb-find-tags-by-name-regexp-method table regex tags)) | 312 | (semanticdb-find-tags-by-name-regexp-method table regex tags)) |
| 313 | 313 | ||
| 314 | (defmethod semanticdb-deep-find-tags-for-completion-method | 314 | (cl-defmethod semanticdb-deep-find-tags-for-completion-method |
| 315 | ((table semanticdb-table-emacs-lisp) prefix &optional tags) | 315 | ((table semanticdb-table-emacs-lisp) prefix &optional tags) |
| 316 | "In TABLE, find all occurrences of tags matching PREFIX. | 316 | "In TABLE, find all occurrences of tags matching PREFIX. |
| 317 | Optional argument TAGS is a list of tags to search. | 317 | Optional argument TAGS is a list of tags to search. |
| @@ -320,12 +320,12 @@ Like `semanticdb-find-tags-for-completion-method' for Emacs Lisp." | |||
| 320 | 320 | ||
| 321 | ;;; Advanced Searches | 321 | ;;; Advanced Searches |
| 322 | ;; | 322 | ;; |
| 323 | (defmethod semanticdb-find-tags-external-children-of-type-method | 323 | (cl-defmethod semanticdb-find-tags-external-children-of-type-method |
| 324 | ((table semanticdb-table-emacs-lisp) type &optional tags) | 324 | ((table semanticdb-table-emacs-lisp) type &optional tags) |
| 325 | "Find all nonterminals which are child elements of TYPE | 325 | "Find all nonterminals which are child elements of TYPE |
| 326 | Optional argument TAGS is a list of tags to search. | 326 | Optional argument TAGS is a list of tags to search. |
| 327 | Return a list of tags." | 327 | Return a list of tags." |
| 328 | (if tags (call-next-method) | 328 | (if tags (cl-call-next-method) |
| 329 | ;; EIEIO is the only time this matters | 329 | ;; EIEIO is the only time this matters |
| 330 | (when (featurep 'eieio) | 330 | (when (featurep 'eieio) |
| 331 | (let* ((class (intern-soft type)) | 331 | (let* ((class (intern-soft type)) |
diff --git a/lisp/cedet/semantic/db-file.el b/lisp/cedet/semantic/db-file.el index 0360e0680e7..f38153b18c1 100644 --- a/lisp/cedet/semantic/db-file.el +++ b/lisp/cedet/semantic/db-file.el | |||
| @@ -123,7 +123,7 @@ To save the version number, we must hand-set this version string.") | |||
| 123 | 123 | ||
| 124 | ;;; Code: | 124 | ;;; Code: |
| 125 | ;; | 125 | ;; |
| 126 | (defmethod semanticdb-create-database :STATIC ((dbc semanticdb-project-database-file) | 126 | (cl-defmethod semanticdb-create-database ((dbc (subclass semanticdb-project-database-file)) |
| 127 | directory) | 127 | directory) |
| 128 | "Create a new semantic database for DIRECTORY and return it. | 128 | "Create a new semantic database for DIRECTORY and return it. |
| 129 | If a database for DIRECTORY has already been loaded, return it. | 129 | If a database for DIRECTORY has already been loaded, return it. |
| @@ -197,7 +197,7 @@ If DIRECTORY doesn't exist, create a new one." | |||
| 197 | "Return the project belonging to FILENAME if it was already loaded." | 197 | "Return the project belonging to FILENAME if it was already loaded." |
| 198 | (eieio-instance-tracker-find filename 'file 'semanticdb-database-list)) | 198 | (eieio-instance-tracker-find filename 'file 'semanticdb-database-list)) |
| 199 | 199 | ||
| 200 | (defmethod semanticdb-file-directory-exists-p ((DB semanticdb-project-database-file) | 200 | (cl-defmethod semanticdb-file-directory-exists-p ((DB semanticdb-project-database-file) |
| 201 | &optional suppress-questions) | 201 | &optional suppress-questions) |
| 202 | "Does the directory the database DB needs to write to exist? | 202 | "Does the directory the database DB needs to write to exist? |
| 203 | If SUPPRESS-QUESTIONS, then do not ask to create the directory." | 203 | If SUPPRESS-QUESTIONS, then do not ask to create the directory." |
| @@ -219,7 +219,7 @@ If SUPPRESS-QUESTIONS, then do not ask to create the directory." | |||
| 219 | (setq semanticdb--inhibit-make-directory t)) | 219 | (setq semanticdb--inhibit-make-directory t)) |
| 220 | nil)))) | 220 | nil)))) |
| 221 | 221 | ||
| 222 | (defmethod semanticdb-save-db ((DB semanticdb-project-database-file) | 222 | (cl-defmethod semanticdb-save-db ((DB semanticdb-project-database-file) |
| 223 | &optional | 223 | &optional |
| 224 | suppress-questions) | 224 | suppress-questions) |
| 225 | "Write out the database DB to its file. | 225 | "Write out the database DB to its file. |
| @@ -259,13 +259,13 @@ If DB is not specified, then use the current database." | |||
| 259 | ) | 259 | ) |
| 260 | )) | 260 | )) |
| 261 | 261 | ||
| 262 | (defmethod semanticdb-live-p ((obj semanticdb-project-database)) | 262 | (cl-defmethod semanticdb-live-p ((obj semanticdb-project-database)) |
| 263 | "Return non-nil if the file associated with OBJ is live. | 263 | "Return non-nil if the file associated with OBJ is live. |
| 264 | Live databases are objects associated with existing directories." | 264 | Live databases are objects associated with existing directories." |
| 265 | (and (slot-boundp obj 'reference-directory) | 265 | (and (slot-boundp obj 'reference-directory) |
| 266 | (file-exists-p (oref obj reference-directory)))) | 266 | (file-exists-p (oref obj reference-directory)))) |
| 267 | 267 | ||
| 268 | (defmethod semanticdb-live-p ((obj semanticdb-table)) | 268 | (cl-defmethod semanticdb-live-p ((obj semanticdb-table)) |
| 269 | "Return non-nil if the file associated with OBJ is live. | 269 | "Return non-nil if the file associated with OBJ is live. |
| 270 | Live files are either buffers in Emacs, or files existing on the filesystem." | 270 | Live files are either buffers in Emacs, or files existing on the filesystem." |
| 271 | (let ((full-filename (semanticdb-full-filename obj))) | 271 | (let ((full-filename (semanticdb-full-filename obj))) |
| @@ -279,7 +279,7 @@ to prevent overload.") | |||
| 279 | 279 | ||
| 280 | (declare-function data-debug-insert-thing "data-debug") | 280 | (declare-function data-debug-insert-thing "data-debug") |
| 281 | 281 | ||
| 282 | (defmethod object-write ((obj semanticdb-table)) | 282 | (cl-defmethod object-write ((obj semanticdb-table)) |
| 283 | "When writing a table, we have to make sure we deoverlay it first. | 283 | "When writing a table, we have to make sure we deoverlay it first. |
| 284 | Restore the overlays after writing. | 284 | Restore the overlays after writing. |
| 285 | Argument OBJ is the object to write." | 285 | Argument OBJ is the object to write." |
| @@ -312,7 +312,7 @@ Argument OBJ is the object to write." | |||
| 312 | 312 | ||
| 313 | ;; Do it! | 313 | ;; Do it! |
| 314 | (condition-case tableerror | 314 | (condition-case tableerror |
| 315 | (call-next-method) | 315 | (cl-call-next-method) |
| 316 | (error | 316 | (error |
| 317 | (when semanticdb-data-debug-on-write-error | 317 | (when semanticdb-data-debug-on-write-error |
| 318 | (require 'data-debug) | 318 | (require 'data-debug) |
| @@ -328,7 +328,7 @@ Argument OBJ is the object to write." | |||
| 328 | 328 | ||
| 329 | ;;; State queries | 329 | ;;; State queries |
| 330 | ;; | 330 | ;; |
| 331 | (defmethod semanticdb-write-directory-p ((obj semanticdb-project-database-file)) | 331 | (cl-defmethod semanticdb-write-directory-p ((obj semanticdb-project-database-file)) |
| 332 | "Return non-nil if OBJ should be written to disk. | 332 | "Return non-nil if OBJ should be written to disk. |
| 333 | Uses `semanticdb-persistent-path' to determine the return value." | 333 | Uses `semanticdb-persistent-path' to determine the return value." |
| 334 | (let ((path semanticdb-persistent-path)) | 334 | (let ((path semanticdb-persistent-path)) |
| @@ -360,25 +360,25 @@ Uses `semanticdb-persistent-path' to determine the return value." | |||
| 360 | (throw 'found t)) | 360 | (throw 'found t)) |
| 361 | (t (error "Invalid path %S" (car path)))) | 361 | (t (error "Invalid path %S" (car path)))) |
| 362 | (setq path (cdr path))) | 362 | (setq path (cdr path))) |
| 363 | (call-next-method)) | 363 | (cl-call-next-method)) |
| 364 | )) | 364 | )) |
| 365 | 365 | ||
| 366 | ;;; Filename manipulation | 366 | ;;; Filename manipulation |
| 367 | ;; | 367 | ;; |
| 368 | (defmethod semanticdb-file-table ((obj semanticdb-project-database-file) filename) | 368 | (cl-defmethod semanticdb-file-table ((obj semanticdb-project-database-file) filename) |
| 369 | "From OBJ, return FILENAME's associated table object." | 369 | "From OBJ, return FILENAME's associated table object." |
| 370 | ;; Cheater option. In this case, we always have files directly | 370 | ;; Cheater option. In this case, we always have files directly |
| 371 | ;; under ourselves. The main project type may not. | 371 | ;; under ourselves. The main project type may not. |
| 372 | (object-assoc (file-name-nondirectory filename) 'file (oref obj tables))) | 372 | (object-assoc (file-name-nondirectory filename) 'file (oref obj tables))) |
| 373 | 373 | ||
| 374 | (defmethod semanticdb-file-name-non-directory :STATIC | 374 | (cl-defmethod semanticdb-file-name-non-directory |
| 375 | ((dbclass semanticdb-project-database-file)) | 375 | ((dbclass (subclass semanticdb-project-database-file))) |
| 376 | "Return the file name DBCLASS will use. | 376 | "Return the file name DBCLASS will use. |
| 377 | File name excludes any directory part." | 377 | File name excludes any directory part." |
| 378 | semanticdb-default-file-name) | 378 | semanticdb-default-file-name) |
| 379 | 379 | ||
| 380 | (defmethod semanticdb-file-name-directory :STATIC | 380 | (cl-defmethod semanticdb-file-name-directory |
| 381 | ((dbclass semanticdb-project-database-file) directory) | 381 | ((dbclass (subclass semanticdb-project-database-file)) directory) |
| 382 | "Return the relative directory to where DBCLASS will save its cache file. | 382 | "Return the relative directory to where DBCLASS will save its cache file. |
| 383 | The returned path is related to DIRECTORY." | 383 | The returned path is related to DIRECTORY." |
| 384 | (if semanticdb-default-save-directory | 384 | (if semanticdb-default-save-directory |
| @@ -389,8 +389,8 @@ The returned path is related to DIRECTORY." | |||
| 389 | file (file-name-as-directory semanticdb-default-save-directory))) | 389 | file (file-name-as-directory semanticdb-default-save-directory))) |
| 390 | directory)) | 390 | directory)) |
| 391 | 391 | ||
| 392 | (defmethod semanticdb-cache-filename :STATIC | 392 | (cl-defmethod semanticdb-cache-filename |
| 393 | ((dbclass semanticdb-project-database-file) path) | 393 | ((dbclass (subclass semanticdb-project-database-file)) path) |
| 394 | "For DBCLASS, return a file to a cache file belonging to PATH. | 394 | "For DBCLASS, return a file to a cache file belonging to PATH. |
| 395 | This could be a cache file in the current directory, or an encoded file | 395 | This could be a cache file in the current directory, or an encoded file |
| 396 | name in a secondary directory." | 396 | name in a secondary directory." |
| @@ -399,7 +399,7 @@ name in a secondary directory." | |||
| 399 | (concat (semanticdb-file-name-directory dbclass path) | 399 | (concat (semanticdb-file-name-directory dbclass path) |
| 400 | (semanticdb-file-name-non-directory dbclass))) | 400 | (semanticdb-file-name-non-directory dbclass))) |
| 401 | 401 | ||
| 402 | (defmethod semanticdb-full-filename ((obj semanticdb-project-database-file)) | 402 | (cl-defmethod semanticdb-full-filename ((obj semanticdb-project-database-file)) |
| 403 | "Fetch the full filename that OBJ refers to." | 403 | "Fetch the full filename that OBJ refers to." |
| 404 | (oref obj file)) | 404 | (oref obj file)) |
| 405 | 405 | ||
diff --git a/lisp/cedet/semantic/db-find.el b/lisp/cedet/semantic/db-find.el index dd36cc1a01e..ff3431a17cf 100644 --- a/lisp/cedet/semantic/db-find.el +++ b/lisp/cedet/semantic/db-find.el | |||
| @@ -196,7 +196,7 @@ expunge duplicates.") | |||
| 196 | "Concrete search index for `semanticdb-find'. | 196 | "Concrete search index for `semanticdb-find'. |
| 197 | This class will cache data derived during various searches.") | 197 | This class will cache data derived during various searches.") |
| 198 | 198 | ||
| 199 | (defmethod semantic-reset ((idx semanticdb-find-search-index)) | 199 | (cl-defmethod semantic-reset ((idx semanticdb-find-search-index)) |
| 200 | "Reset the object IDX." | 200 | "Reset the object IDX." |
| 201 | (require 'semantic/scope) | 201 | (require 'semantic/scope) |
| 202 | ;; Clear the include path. | 202 | ;; Clear the include path. |
| @@ -208,7 +208,7 @@ This class will cache data derived during various searches.") | |||
| 208 | (semantic-scope-reset-cache) | 208 | (semantic-scope-reset-cache) |
| 209 | ) | 209 | ) |
| 210 | 210 | ||
| 211 | (defmethod semanticdb-synchronize ((idx semanticdb-find-search-index) | 211 | (cl-defmethod semanticdb-synchronize ((idx semanticdb-find-search-index) |
| 212 | new-tags) | 212 | new-tags) |
| 213 | "Synchronize the search index IDX with some NEW-TAGS." | 213 | "Synchronize the search index IDX with some NEW-TAGS." |
| 214 | ;; Reset our parts. | 214 | ;; Reset our parts. |
| @@ -220,7 +220,7 @@ This class will cache data derived during various searches.") | |||
| 220 | (semantic-reset (semanticdb-get-table-index tab)))) | 220 | (semantic-reset (semanticdb-get-table-index tab)))) |
| 221 | ) | 221 | ) |
| 222 | 222 | ||
| 223 | (defmethod semanticdb-partial-synchronize ((idx semanticdb-find-search-index) | 223 | (cl-defmethod semanticdb-partial-synchronize ((idx semanticdb-find-search-index) |
| 224 | new-tags) | 224 | new-tags) |
| 225 | "Synchronize the search index IDX with some changed NEW-TAGS." | 225 | "Synchronize the search index IDX with some changed NEW-TAGS." |
| 226 | ;; Only reset if include statements changed. | 226 | ;; Only reset if include statements changed. |
| @@ -1304,25 +1304,25 @@ associated with that tag should be loaded into a buffer." | |||
| 1304 | ;; Override these with system databases to as new types of back ends. | 1304 | ;; Override these with system databases to as new types of back ends. |
| 1305 | 1305 | ||
| 1306 | ;;; Top level Searches | 1306 | ;;; Top level Searches |
| 1307 | (defmethod semanticdb-find-tags-by-name-method ((table semanticdb-abstract-table) name &optional tags) | 1307 | (cl-defmethod semanticdb-find-tags-by-name-method ((table semanticdb-abstract-table) name &optional tags) |
| 1308 | "In TABLE, find all occurrences of tags with NAME. | 1308 | "In TABLE, find all occurrences of tags with NAME. |
| 1309 | Optional argument TAGS is a list of tags to search. | 1309 | Optional argument TAGS is a list of tags to search. |
| 1310 | Returns a table of all matching tags." | 1310 | Returns a table of all matching tags." |
| 1311 | (semantic-find-tags-by-name name (or tags (semanticdb-get-tags table)))) | 1311 | (semantic-find-tags-by-name name (or tags (semanticdb-get-tags table)))) |
| 1312 | 1312 | ||
| 1313 | (defmethod semanticdb-find-tags-by-name-regexp-method ((table semanticdb-abstract-table) regexp &optional tags) | 1313 | (cl-defmethod semanticdb-find-tags-by-name-regexp-method ((table semanticdb-abstract-table) regexp &optional tags) |
| 1314 | "In TABLE, find all occurrences of tags matching REGEXP. | 1314 | "In TABLE, find all occurrences of tags matching REGEXP. |
| 1315 | Optional argument TAGS is a list of tags to search. | 1315 | Optional argument TAGS is a list of tags to search. |
| 1316 | Returns a table of all matching tags." | 1316 | Returns a table of all matching tags." |
| 1317 | (semantic-find-tags-by-name-regexp regexp (or tags (semanticdb-get-tags table)))) | 1317 | (semantic-find-tags-by-name-regexp regexp (or tags (semanticdb-get-tags table)))) |
| 1318 | 1318 | ||
| 1319 | (defmethod semanticdb-find-tags-for-completion-method ((table semanticdb-abstract-table) prefix &optional tags) | 1319 | (cl-defmethod semanticdb-find-tags-for-completion-method ((table semanticdb-abstract-table) prefix &optional tags) |
| 1320 | "In TABLE, find all occurrences of tags matching PREFIX. | 1320 | "In TABLE, find all occurrences of tags matching PREFIX. |
| 1321 | Optional argument TAGS is a list of tags to search. | 1321 | Optional argument TAGS is a list of tags to search. |
| 1322 | Returns a table of all matching tags." | 1322 | Returns a table of all matching tags." |
| 1323 | (semantic-find-tags-for-completion prefix (or tags (semanticdb-get-tags table)))) | 1323 | (semantic-find-tags-for-completion prefix (or tags (semanticdb-get-tags table)))) |
| 1324 | 1324 | ||
| 1325 | (defmethod semanticdb-find-tags-by-class-method ((table semanticdb-abstract-table) class &optional tags) | 1325 | (cl-defmethod semanticdb-find-tags-by-class-method ((table semanticdb-abstract-table) class &optional tags) |
| 1326 | "In TABLE, find all occurrences of tags of CLASS. | 1326 | "In TABLE, find all occurrences of tags of CLASS. |
| 1327 | Optional argument TAGS is a list of tags to search. | 1327 | Optional argument TAGS is a list of tags to search. |
| 1328 | Returns a table of all matching tags." | 1328 | Returns a table of all matching tags." |
| @@ -1333,14 +1333,14 @@ Returns a table of all matching tags." | |||
| 1333 | (semantic-find-tags-included (or tags (semanticdb-get-tags table))) | 1333 | (semantic-find-tags-included (or tags (semanticdb-get-tags table))) |
| 1334 | (semantic-find-tags-by-class class (or tags (semanticdb-get-tags table))))) | 1334 | (semantic-find-tags-by-class class (or tags (semanticdb-get-tags table))))) |
| 1335 | 1335 | ||
| 1336 | (defmethod semanticdb-find-tags-external-children-of-type-method ((table semanticdb-abstract-table) parent &optional tags) | 1336 | (cl-defmethod semanticdb-find-tags-external-children-of-type-method ((table semanticdb-abstract-table) parent &optional tags) |
| 1337 | "In TABLE, find all occurrences of tags whose parent is the PARENT type. | 1337 | "In TABLE, find all occurrences of tags whose parent is the PARENT type. |
| 1338 | Optional argument TAGS is a list of tags to search. | 1338 | Optional argument TAGS is a list of tags to search. |
| 1339 | Returns a table of all matching tags." | 1339 | Returns a table of all matching tags." |
| 1340 | (require 'semantic/find) | 1340 | (require 'semantic/find) |
| 1341 | (semantic-find-tags-external-children-of-type parent (or tags (semanticdb-get-tags table)))) | 1341 | (semantic-find-tags-external-children-of-type parent (or tags (semanticdb-get-tags table)))) |
| 1342 | 1342 | ||
| 1343 | (defmethod semanticdb-find-tags-subclasses-of-type-method ((table semanticdb-abstract-table) parent &optional tags) | 1343 | (cl-defmethod semanticdb-find-tags-subclasses-of-type-method ((table semanticdb-abstract-table) parent &optional tags) |
| 1344 | "In TABLE, find all occurrences of tags whose parent is the PARENT type. | 1344 | "In TABLE, find all occurrences of tags whose parent is the PARENT type. |
| 1345 | Optional argument TAGS is a list of tags to search. | 1345 | Optional argument TAGS is a list of tags to search. |
| 1346 | Returns a table of all matching tags." | 1346 | Returns a table of all matching tags." |
| @@ -1348,7 +1348,7 @@ Returns a table of all matching tags." | |||
| 1348 | (semantic-find-tags-subclasses-of-type parent (or tags (semanticdb-get-tags table)))) | 1348 | (semantic-find-tags-subclasses-of-type parent (or tags (semanticdb-get-tags table)))) |
| 1349 | 1349 | ||
| 1350 | ;;; Deep Searches | 1350 | ;;; Deep Searches |
| 1351 | (defmethod semanticdb-deep-find-tags-by-name-method ((table semanticdb-abstract-table) name &optional tags) | 1351 | (cl-defmethod semanticdb-deep-find-tags-by-name-method ((table semanticdb-abstract-table) name &optional tags) |
| 1352 | "In TABLE, find all occurrences of tags with NAME. | 1352 | "In TABLE, find all occurrences of tags with NAME. |
| 1353 | Search in all tags in TABLE, and all components of top level tags in | 1353 | Search in all tags in TABLE, and all components of top level tags in |
| 1354 | TABLE. | 1354 | TABLE. |
| @@ -1356,7 +1356,7 @@ Optional argument TAGS is a list of tags to search. | |||
| 1356 | Return a table of all matching tags." | 1356 | Return a table of all matching tags." |
| 1357 | (semantic-find-tags-by-name name (semantic-flatten-tags-table (or tags (semanticdb-get-tags table))))) | 1357 | (semantic-find-tags-by-name name (semantic-flatten-tags-table (or tags (semanticdb-get-tags table))))) |
| 1358 | 1358 | ||
| 1359 | (defmethod semanticdb-deep-find-tags-by-name-regexp-method ((table semanticdb-abstract-table) regexp &optional tags) | 1359 | (cl-defmethod semanticdb-deep-find-tags-by-name-regexp-method ((table semanticdb-abstract-table) regexp &optional tags) |
| 1360 | "In TABLE, find all occurrences of tags matching REGEXP. | 1360 | "In TABLE, find all occurrences of tags matching REGEXP. |
| 1361 | Search in all tags in TABLE, and all components of top level tags in | 1361 | Search in all tags in TABLE, and all components of top level tags in |
| 1362 | TABLE. | 1362 | TABLE. |
| @@ -1364,7 +1364,7 @@ Optional argument TAGS is a list of tags to search. | |||
| 1364 | Return a table of all matching tags." | 1364 | Return a table of all matching tags." |
| 1365 | (semantic-find-tags-by-name-regexp regexp (semantic-flatten-tags-table (or tags (semanticdb-get-tags table))))) | 1365 | (semantic-find-tags-by-name-regexp regexp (semantic-flatten-tags-table (or tags (semanticdb-get-tags table))))) |
| 1366 | 1366 | ||
| 1367 | (defmethod semanticdb-deep-find-tags-for-completion-method ((table semanticdb-abstract-table) prefix &optional tags) | 1367 | (cl-defmethod semanticdb-deep-find-tags-for-completion-method ((table semanticdb-abstract-table) prefix &optional tags) |
| 1368 | "In TABLE, find all occurrences of tags matching PREFIX. | 1368 | "In TABLE, find all occurrences of tags matching PREFIX. |
| 1369 | Search in all tags in TABLE, and all components of top level tags in | 1369 | Search in all tags in TABLE, and all components of top level tags in |
| 1370 | TABLE. | 1370 | TABLE. |
diff --git a/lisp/cedet/semantic/db-global.el b/lisp/cedet/semantic/db-global.el index b042b49ec6e..b95fa34cb3c 100644 --- a/lisp/cedet/semantic/db-global.el +++ b/lisp/cedet/semantic/db-global.el | |||
| @@ -112,12 +112,12 @@ if optional DONT-ERR-IF-NOT-AVAILABLE is non-nil; else throw an error." | |||
| 112 | ) | 112 | ) |
| 113 | "A table for returning search results from GNU Global.") | 113 | "A table for returning search results from GNU Global.") |
| 114 | 114 | ||
| 115 | (defmethod object-print ((obj semanticdb-table-global) &rest strings) | 115 | (cl-defmethod object-print ((obj semanticdb-table-global) &rest strings) |
| 116 | "Pretty printer extension for `semanticdb-table-global'. | 116 | "Pretty printer extension for `semanticdb-table-global'. |
| 117 | Adds the number of tags in this file to the object print name." | 117 | Adds the number of tags in this file to the object print name." |
| 118 | (apply 'call-next-method obj (cons " (proxy)" strings))) | 118 | (apply 'call-next-method obj (cons " (proxy)" strings))) |
| 119 | 119 | ||
| 120 | (defmethod semanticdb-equivalent-mode ((table semanticdb-table-global) &optional buffer) | 120 | (cl-defmethod semanticdb-equivalent-mode ((table semanticdb-table-global) &optional buffer) |
| 121 | "Return t, pretend that this table's mode is equivalent to BUFFER. | 121 | "Return t, pretend that this table's mode is equivalent to BUFFER. |
| 122 | Equivalent modes are specified by the `semantic-equivalent-major-modes' | 122 | Equivalent modes are specified by the `semantic-equivalent-major-modes' |
| 123 | local variable." | 123 | local variable." |
| @@ -126,7 +126,7 @@ local variable." | |||
| 126 | 126 | ||
| 127 | ;;; Filename based methods | 127 | ;;; Filename based methods |
| 128 | ;; | 128 | ;; |
| 129 | (defmethod semanticdb-get-database-tables ((obj semanticdb-project-database-global)) | 129 | (cl-defmethod semanticdb-get-database-tables ((obj semanticdb-project-database-global)) |
| 130 | "For a global database, there are no explicit tables. | 130 | "For a global database, there are no explicit tables. |
| 131 | For each file hit, get the traditional semantic table from that file." | 131 | For each file hit, get the traditional semantic table from that file." |
| 132 | ;; We need to return something since there is always the "master table" | 132 | ;; We need to return something since there is always the "master table" |
| @@ -138,9 +138,9 @@ For each file hit, get the traditional semantic table from that file." | |||
| 138 | (oset newtable tags nil) | 138 | (oset newtable tags nil) |
| 139 | )) | 139 | )) |
| 140 | 140 | ||
| 141 | (call-next-method)) | 141 | (cl-call-next-method)) |
| 142 | 142 | ||
| 143 | (defmethod semanticdb-file-table ((obj semanticdb-project-database-global) filename) | 143 | (cl-defmethod semanticdb-file-table ((obj semanticdb-project-database-global) filename) |
| 144 | "From OBJ, return FILENAME's associated table object." | 144 | "From OBJ, return FILENAME's associated table object." |
| 145 | ;; We pass in "don't load". I wonder if we need to avoid that or not? | 145 | ;; We pass in "don't load". I wonder if we need to avoid that or not? |
| 146 | (car (semanticdb-get-database-tables obj)) | 146 | (car (semanticdb-get-database-tables obj)) |
| @@ -150,13 +150,13 @@ For each file hit, get the traditional semantic table from that file." | |||
| 150 | ;; | 150 | ;; |
| 151 | ;; Only NAME based searches work with GLOBAL as that is all it tracks. | 151 | ;; Only NAME based searches work with GLOBAL as that is all it tracks. |
| 152 | ;; | 152 | ;; |
| 153 | (defmethod semanticdb-find-tags-by-name-method | 153 | (cl-defmethod semanticdb-find-tags-by-name-method |
| 154 | ((table semanticdb-table-global) name &optional tags) | 154 | ((table semanticdb-table-global) name &optional tags) |
| 155 | "Find all tags named NAME in TABLE. | 155 | "Find all tags named NAME in TABLE. |
| 156 | Return a list of tags." | 156 | Return a list of tags." |
| 157 | (if tags | 157 | (if tags |
| 158 | ;; If TAGS are passed in, then we don't need to do work here. | 158 | ;; If TAGS are passed in, then we don't need to do work here. |
| 159 | (call-next-method) | 159 | (cl-call-next-method) |
| 160 | ;; Call out to GNU Global for some results. | 160 | ;; Call out to GNU Global for some results. |
| 161 | (let* ((semantic-symref-tool 'global) | 161 | (let* ((semantic-symref-tool 'global) |
| 162 | (result (semantic-symref-find-tags-by-name name 'project)) | 162 | (result (semantic-symref-find-tags-by-name name 'project)) |
| @@ -167,12 +167,12 @@ Return a list of tags." | |||
| 167 | (semantic-symref-result-get-tags result)) | 167 | (semantic-symref-result-get-tags result)) |
| 168 | ))) | 168 | ))) |
| 169 | 169 | ||
| 170 | (defmethod semanticdb-find-tags-by-name-regexp-method | 170 | (cl-defmethod semanticdb-find-tags-by-name-regexp-method |
| 171 | ((table semanticdb-table-global) regex &optional tags) | 171 | ((table semanticdb-table-global) regex &optional tags) |
| 172 | "Find all tags with name matching REGEX in TABLE. | 172 | "Find all tags with name matching REGEX in TABLE. |
| 173 | Optional argument TAGS is a list of tags to search. | 173 | Optional argument TAGS is a list of tags to search. |
| 174 | Return a list of tags." | 174 | Return a list of tags." |
| 175 | (if tags (call-next-method) | 175 | (if tags (cl-call-next-method) |
| 176 | (let* ((semantic-symref-tool 'global) | 176 | (let* ((semantic-symref-tool 'global) |
| 177 | (result (semantic-symref-find-tags-by-regexp regex 'project)) | 177 | (result (semantic-symref-find-tags-by-regexp regex 'project)) |
| 178 | ) | 178 | ) |
| @@ -180,12 +180,12 @@ Return a list of tags." | |||
| 180 | (semantic-symref-result-get-tags result)) | 180 | (semantic-symref-result-get-tags result)) |
| 181 | ))) | 181 | ))) |
| 182 | 182 | ||
| 183 | (defmethod semanticdb-find-tags-for-completion-method | 183 | (cl-defmethod semanticdb-find-tags-for-completion-method |
| 184 | ((table semanticdb-table-global) prefix &optional tags) | 184 | ((table semanticdb-table-global) prefix &optional tags) |
| 185 | "In TABLE, find all occurrences of tags matching PREFIX. | 185 | "In TABLE, find all occurrences of tags matching PREFIX. |
| 186 | Optional argument TAGS is a list of tags to search. | 186 | Optional argument TAGS is a list of tags to search. |
| 187 | Returns a table of all matching tags." | 187 | Returns a table of all matching tags." |
| 188 | (if tags (call-next-method) | 188 | (if tags (cl-call-next-method) |
| 189 | (let* ((semantic-symref-tool 'global) | 189 | (let* ((semantic-symref-tool 'global) |
| 190 | (result (semantic-symref-find-tags-by-completion prefix 'project)) | 190 | (result (semantic-symref-find-tags-by-completion prefix 'project)) |
| 191 | (faketags nil) | 191 | (faketags nil) |
| @@ -206,21 +206,21 @@ Returns a table of all matching tags." | |||
| 206 | ;; alone, otherwise replace with implementations similar to those | 206 | ;; alone, otherwise replace with implementations similar to those |
| 207 | ;; above. | 207 | ;; above. |
| 208 | ;; | 208 | ;; |
| 209 | (defmethod semanticdb-deep-find-tags-by-name-method | 209 | (cl-defmethod semanticdb-deep-find-tags-by-name-method |
| 210 | ((table semanticdb-table-global) name &optional tags) | 210 | ((table semanticdb-table-global) name &optional tags) |
| 211 | "Find all tags name NAME in TABLE. | 211 | "Find all tags name NAME in TABLE. |
| 212 | Optional argument TAGS is a list of tags to search. | 212 | Optional argument TAGS is a list of tags to search. |
| 213 | Like `semanticdb-find-tags-by-name-method' for global." | 213 | Like `semanticdb-find-tags-by-name-method' for global." |
| 214 | (semanticdb-find-tags-by-name-method table name tags)) | 214 | (semanticdb-find-tags-by-name-method table name tags)) |
| 215 | 215 | ||
| 216 | (defmethod semanticdb-deep-find-tags-by-name-regexp-method | 216 | (cl-defmethod semanticdb-deep-find-tags-by-name-regexp-method |
| 217 | ((table semanticdb-table-global) regex &optional tags) | 217 | ((table semanticdb-table-global) regex &optional tags) |
| 218 | "Find all tags with name matching REGEX in TABLE. | 218 | "Find all tags with name matching REGEX in TABLE. |
| 219 | Optional argument TAGS is a list of tags to search. | 219 | Optional argument TAGS is a list of tags to search. |
| 220 | Like `semanticdb-find-tags-by-name-method' for global." | 220 | Like `semanticdb-find-tags-by-name-method' for global." |
| 221 | (semanticdb-find-tags-by-name-regexp-method table regex tags)) | 221 | (semanticdb-find-tags-by-name-regexp-method table regex tags)) |
| 222 | 222 | ||
| 223 | (defmethod semanticdb-deep-find-tags-for-completion-method | 223 | (cl-defmethod semanticdb-deep-find-tags-for-completion-method |
| 224 | ((table semanticdb-table-global) prefix &optional tags) | 224 | ((table semanticdb-table-global) prefix &optional tags) |
| 225 | "In TABLE, find all occurrences of tags matching PREFIX. | 225 | "In TABLE, find all occurrences of tags matching PREFIX. |
| 226 | Optional argument TAGS is a list of tags to search. | 226 | Optional argument TAGS is a list of tags to search. |
diff --git a/lisp/cedet/semantic/db-javascript.el b/lisp/cedet/semantic/db-javascript.el index 24aa6b702cd..4aced34d8ef 100644 --- a/lisp/cedet/semantic/db-javascript.el +++ b/lisp/cedet/semantic/db-javascript.el | |||
| @@ -111,7 +111,7 @@ the omniscience database.") | |||
| 111 | 111 | ||
| 112 | ;;; Filename based methods | 112 | ;;; Filename based methods |
| 113 | ;; | 113 | ;; |
| 114 | (defmethod semanticdb-get-database-tables ((obj semanticdb-project-database-javascript)) | 114 | (cl-defmethod semanticdb-get-database-tables ((obj semanticdb-project-database-javascript)) |
| 115 | "For a javascript database, there are no explicit tables. | 115 | "For a javascript database, there are no explicit tables. |
| 116 | Create one of our special tables that can act as an intermediary." | 116 | Create one of our special tables that can act as an intermediary." |
| 117 | ;; NOTE: This method overrides an accessor for the `tables' slot in | 117 | ;; NOTE: This method overrides an accessor for the `tables' slot in |
| @@ -126,23 +126,23 @@ Create one of our special tables that can act as an intermediary." | |||
| 126 | (oset newtable parent-db obj) | 126 | (oset newtable parent-db obj) |
| 127 | (oset newtable tags nil) | 127 | (oset newtable tags nil) |
| 128 | )) | 128 | )) |
| 129 | (call-next-method) | 129 | (cl-call-next-method) |
| 130 | ) | 130 | ) |
| 131 | 131 | ||
| 132 | (defmethod semanticdb-file-table ((obj semanticdb-project-database-javascript) filename) | 132 | (cl-defmethod semanticdb-file-table ((obj semanticdb-project-database-javascript) filename) |
| 133 | "From OBJ, return FILENAME's associated table object." | 133 | "From OBJ, return FILENAME's associated table object." |
| 134 | ;; NOTE: See not for `semanticdb-get-database-tables'. | 134 | ;; NOTE: See not for `semanticdb-get-database-tables'. |
| 135 | (car (semanticdb-get-database-tables obj)) | 135 | (car (semanticdb-get-database-tables obj)) |
| 136 | ) | 136 | ) |
| 137 | 137 | ||
| 138 | (defmethod semanticdb-get-tags ((table semanticdb-table-javascript )) | 138 | (cl-defmethod semanticdb-get-tags ((table semanticdb-table-javascript )) |
| 139 | "Return the list of tags belonging to TABLE." | 139 | "Return the list of tags belonging to TABLE." |
| 140 | ;; NOTE: Omniscient databases probably don't want to keep large tables | 140 | ;; NOTE: Omniscient databases probably don't want to keep large tables |
| 141 | ;; lolly-gagging about. Keep internal Emacs tables empty and | 141 | ;; lolly-gagging about. Keep internal Emacs tables empty and |
| 142 | ;; refer to alternate databases when you need something. | 142 | ;; refer to alternate databases when you need something. |
| 143 | semanticdb-javascript-tags) | 143 | semanticdb-javascript-tags) |
| 144 | 144 | ||
| 145 | (defmethod semanticdb-equivalent-mode ((table semanticdb-table-javascript) &optional buffer) | 145 | (cl-defmethod semanticdb-equivalent-mode ((table semanticdb-table-javascript) &optional buffer) |
| 146 | "Return non-nil if TABLE's mode is equivalent to BUFFER. | 146 | "Return non-nil if TABLE's mode is equivalent to BUFFER. |
| 147 | Equivalent modes are specified by the `semantic-equivalent-major-modes' | 147 | Equivalent modes are specified by the `semantic-equivalent-major-modes' |
| 148 | local variable." | 148 | local variable." |
| @@ -192,43 +192,43 @@ database (if available.)" | |||
| 192 | (setq tags (cdr tags))) | 192 | (setq tags (cdr tags))) |
| 193 | result)) | 193 | result)) |
| 194 | 194 | ||
| 195 | (defmethod semanticdb-find-tags-by-name-method | 195 | (cl-defmethod semanticdb-find-tags-by-name-method |
| 196 | ((table semanticdb-table-javascript) name &optional tags) | 196 | ((table semanticdb-table-javascript) name &optional tags) |
| 197 | "Find all tags named NAME in TABLE. | 197 | "Find all tags named NAME in TABLE. |
| 198 | Return a list of tags." | 198 | Return a list of tags." |
| 199 | (if tags | 199 | (if tags |
| 200 | ;; If TAGS are passed in, then we don't need to do work here. | 200 | ;; If TAGS are passed in, then we don't need to do work here. |
| 201 | (call-next-method) | 201 | (cl-call-next-method) |
| 202 | (assoc-string name semanticdb-javascript-tags) | 202 | (assoc-string name semanticdb-javascript-tags) |
| 203 | )) | 203 | )) |
| 204 | 204 | ||
| 205 | (defmethod semanticdb-find-tags-by-name-regexp-method | 205 | (cl-defmethod semanticdb-find-tags-by-name-regexp-method |
| 206 | ((table semanticdb-table-javascript) regex &optional tags) | 206 | ((table semanticdb-table-javascript) regex &optional tags) |
| 207 | "Find all tags with name matching REGEX in TABLE. | 207 | "Find all tags with name matching REGEX in TABLE. |
| 208 | Optional argument TAGS is a list of tags to search. | 208 | Optional argument TAGS is a list of tags to search. |
| 209 | Return a list of tags." | 209 | Return a list of tags." |
| 210 | (if tags (call-next-method) | 210 | (if tags (cl-call-next-method) |
| 211 | ;; YOUR IMPLEMENTATION HERE | 211 | ;; YOUR IMPLEMENTATION HERE |
| 212 | (semanticdb-javascript-regexp-search regex) | 212 | (semanticdb-javascript-regexp-search regex) |
| 213 | 213 | ||
| 214 | )) | 214 | )) |
| 215 | 215 | ||
| 216 | (defmethod semanticdb-find-tags-for-completion-method | 216 | (cl-defmethod semanticdb-find-tags-for-completion-method |
| 217 | ((table semanticdb-table-javascript) prefix &optional tags) | 217 | ((table semanticdb-table-javascript) prefix &optional tags) |
| 218 | "In TABLE, find all occurrences of tags matching PREFIX. | 218 | "In TABLE, find all occurrences of tags matching PREFIX. |
| 219 | Optional argument TAGS is a list of tags to search. | 219 | Optional argument TAGS is a list of tags to search. |
| 220 | Returns a table of all matching tags." | 220 | Returns a table of all matching tags." |
| 221 | (if tags (call-next-method) | 221 | (if tags (cl-call-next-method) |
| 222 | ;; YOUR IMPLEMENTATION HERE | 222 | ;; YOUR IMPLEMENTATION HERE |
| 223 | (semanticdb-javascript-regexp-search (concat "^" prefix ".*")) | 223 | (semanticdb-javascript-regexp-search (concat "^" prefix ".*")) |
| 224 | )) | 224 | )) |
| 225 | 225 | ||
| 226 | (defmethod semanticdb-find-tags-by-class-method | 226 | (cl-defmethod semanticdb-find-tags-by-class-method |
| 227 | ((table semanticdb-table-javascript) class &optional tags) | 227 | ((table semanticdb-table-javascript) class &optional tags) |
| 228 | "In TABLE, find all occurrences of tags of CLASS. | 228 | "In TABLE, find all occurrences of tags of CLASS. |
| 229 | Optional argument TAGS is a list of tags to search. | 229 | Optional argument TAGS is a list of tags to search. |
| 230 | Returns a table of all matching tags." | 230 | Returns a table of all matching tags." |
| 231 | (if tags (call-next-method) | 231 | (if tags (cl-call-next-method) |
| 232 | ;; YOUR IMPLEMENTATION HERE | 232 | ;; YOUR IMPLEMENTATION HERE |
| 233 | ;; | 233 | ;; |
| 234 | ;; Note: This search method could be considered optional in an | 234 | ;; Note: This search method could be considered optional in an |
| @@ -244,21 +244,21 @@ Returns a table of all matching tags." | |||
| 244 | ;; alone, otherwise replace with implementations similar to those | 244 | ;; alone, otherwise replace with implementations similar to those |
| 245 | ;; above. | 245 | ;; above. |
| 246 | ;; | 246 | ;; |
| 247 | (defmethod semanticdb-deep-find-tags-by-name-method | 247 | (cl-defmethod semanticdb-deep-find-tags-by-name-method |
| 248 | ((table semanticdb-table-javascript) name &optional tags) | 248 | ((table semanticdb-table-javascript) name &optional tags) |
| 249 | "Find all tags name NAME in TABLE. | 249 | "Find all tags name NAME in TABLE. |
| 250 | Optional argument TAGS is a list of tags to search. | 250 | Optional argument TAGS is a list of tags to search. |
| 251 | Like `semanticdb-find-tags-by-name-method' for javascript." | 251 | Like `semanticdb-find-tags-by-name-method' for javascript." |
| 252 | (semanticdb-find-tags-by-name-method table name tags)) | 252 | (semanticdb-find-tags-by-name-method table name tags)) |
| 253 | 253 | ||
| 254 | (defmethod semanticdb-deep-find-tags-by-name-regexp-method | 254 | (cl-defmethod semanticdb-deep-find-tags-by-name-regexp-method |
| 255 | ((table semanticdb-table-javascript) regex &optional tags) | 255 | ((table semanticdb-table-javascript) regex &optional tags) |
| 256 | "Find all tags with name matching REGEX in TABLE. | 256 | "Find all tags with name matching REGEX in TABLE. |
| 257 | Optional argument TAGS is a list of tags to search. | 257 | Optional argument TAGS is a list of tags to search. |
| 258 | Like `semanticdb-find-tags-by-name-method' for javascript." | 258 | Like `semanticdb-find-tags-by-name-method' for javascript." |
| 259 | (semanticdb-find-tags-by-name-regexp-method table regex tags)) | 259 | (semanticdb-find-tags-by-name-regexp-method table regex tags)) |
| 260 | 260 | ||
| 261 | (defmethod semanticdb-deep-find-tags-for-completion-method | 261 | (cl-defmethod semanticdb-deep-find-tags-for-completion-method |
| 262 | ((table semanticdb-table-javascript) prefix &optional tags) | 262 | ((table semanticdb-table-javascript) prefix &optional tags) |
| 263 | "In TABLE, find all occurrences of tags matching PREFIX. | 263 | "In TABLE, find all occurrences of tags matching PREFIX. |
| 264 | Optional argument TAGS is a list of tags to search. | 264 | Optional argument TAGS is a list of tags to search. |
| @@ -267,12 +267,12 @@ Like `semanticdb-find-tags-for-completion-method' for javascript." | |||
| 267 | 267 | ||
| 268 | ;;; Advanced Searches | 268 | ;;; Advanced Searches |
| 269 | ;; | 269 | ;; |
| 270 | (defmethod semanticdb-find-tags-external-children-of-type-method | 270 | (cl-defmethod semanticdb-find-tags-external-children-of-type-method |
| 271 | ((table semanticdb-table-javascript) type &optional tags) | 271 | ((table semanticdb-table-javascript) type &optional tags) |
| 272 | "Find all nonterminals which are child elements of TYPE. | 272 | "Find all nonterminals which are child elements of TYPE. |
| 273 | Optional argument TAGS is a list of tags to search. | 273 | Optional argument TAGS is a list of tags to search. |
| 274 | Return a list of tags." | 274 | Return a list of tags." |
| 275 | (if tags (call-next-method) | 275 | (if tags (cl-call-next-method) |
| 276 | ;; YOUR IMPLEMENTATION HERE | 276 | ;; YOUR IMPLEMENTATION HERE |
| 277 | ;; | 277 | ;; |
| 278 | ;; OPTIONAL: This could be considered an optional function. It is | 278 | ;; OPTIONAL: This could be considered an optional function. It is |
diff --git a/lisp/cedet/semantic/db-ref.el b/lisp/cedet/semantic/db-ref.el index d2fe67bbf84..445dcfe5c20 100644 --- a/lisp/cedet/semantic/db-ref.el +++ b/lisp/cedet/semantic/db-ref.el | |||
| @@ -37,6 +37,7 @@ | |||
| 37 | 37 | ||
| 38 | ;;; Code: | 38 | ;;; Code: |
| 39 | (require 'eieio) | 39 | (require 'eieio) |
| 40 | (require 'cl-generic) | ||
| 40 | (require 'semantic) | 41 | (require 'semantic) |
| 41 | (require 'semantic/db) | 42 | (require 'semantic/db) |
| 42 | (require 'semantic/tag) | 43 | (require 'semantic/tag) |
| @@ -44,7 +45,7 @@ | |||
| 44 | ;; For the semantic-find-tags-by-name-regexp macro. | 45 | ;; For the semantic-find-tags-by-name-regexp macro. |
| 45 | (eval-when-compile (require 'semantic/find)) | 46 | (eval-when-compile (require 'semantic/find)) |
| 46 | 47 | ||
| 47 | (defmethod semanticdb-add-reference ((dbt semanticdb-abstract-table) | 48 | (cl-defmethod semanticdb-add-reference ((dbt semanticdb-abstract-table) |
| 48 | include-tag) | 49 | include-tag) |
| 49 | "Add a reference for the database table DBT based on INCLUDE-TAG. | 50 | "Add a reference for the database table DBT based on INCLUDE-TAG. |
| 50 | DBT is the database table that owns the INCLUDE-TAG. The reference | 51 | DBT is the database table that owns the INCLUDE-TAG. The reference |
| @@ -66,18 +67,18 @@ will be added to the database that INCLUDE-TAG refers to." | |||
| 66 | (object-add-to-list refdbt 'db-refs dbt) | 67 | (object-add-to-list refdbt 'db-refs dbt) |
| 67 | t))) | 68 | t))) |
| 68 | 69 | ||
| 69 | (defmethod semanticdb-check-references ((dbt semanticdb-abstract-table)) | 70 | (cl-defmethod semanticdb-check-references ((dbt semanticdb-abstract-table)) |
| 70 | "Check and cleanup references in the database DBT. | 71 | "Check and cleanup references in the database DBT. |
| 71 | Abstract tables would be difficult to reference." | 72 | Abstract tables would be difficult to reference." |
| 72 | ;; Not sure how an abstract table can have references. | 73 | ;; Not sure how an abstract table can have references. |
| 73 | nil) | 74 | nil) |
| 74 | 75 | ||
| 75 | (defmethod semanticdb-includes-in-table ((dbt semanticdb-abstract-table)) | 76 | (cl-defmethod semanticdb-includes-in-table ((dbt semanticdb-abstract-table)) |
| 76 | "Return a list of direct includes in table DBT." | 77 | "Return a list of direct includes in table DBT." |
| 77 | (semantic-find-tags-by-class 'include (semanticdb-get-tags dbt))) | 78 | (semantic-find-tags-by-class 'include (semanticdb-get-tags dbt))) |
| 78 | 79 | ||
| 79 | 80 | ||
| 80 | (defmethod semanticdb-check-references ((dbt semanticdb-table)) | 81 | (cl-defmethod semanticdb-check-references ((dbt semanticdb-table)) |
| 81 | "Check and cleanup references in the database DBT. | 82 | "Check and cleanup references in the database DBT. |
| 82 | Any reference to a file that cannot be found, or whos file no longer | 83 | Any reference to a file that cannot be found, or whos file no longer |
| 83 | refers to DBT will be removed." | 84 | refers to DBT will be removed." |
| @@ -108,13 +109,13 @@ refers to DBT will be removed." | |||
| 108 | )) | 109 | )) |
| 109 | (setq refs (cdr refs))))) | 110 | (setq refs (cdr refs))))) |
| 110 | 111 | ||
| 111 | (defmethod semanticdb-refresh-references ((dbt semanticdb-abstract-table)) | 112 | (cl-defmethod semanticdb-refresh-references ((dbt semanticdb-abstract-table)) |
| 112 | "Refresh references to DBT in other files." | 113 | "Refresh references to DBT in other files." |
| 113 | ;; alternate tables can't be edited, so can't be changed. | 114 | ;; alternate tables can't be edited, so can't be changed. |
| 114 | nil | 115 | nil |
| 115 | ) | 116 | ) |
| 116 | 117 | ||
| 117 | (defmethod semanticdb-refresh-references ((dbt semanticdb-table)) | 118 | (cl-defmethod semanticdb-refresh-references ((dbt semanticdb-table)) |
| 118 | "Refresh references to DBT in other files." | 119 | "Refresh references to DBT in other files." |
| 119 | (let ((refs (semanticdb-includes-in-table dbt)) | 120 | (let ((refs (semanticdb-includes-in-table dbt)) |
| 120 | ) | 121 | ) |
| @@ -127,7 +128,7 @@ refers to DBT will be removed." | |||
| 127 | (setq refs (cdr refs))) | 128 | (setq refs (cdr refs))) |
| 128 | )) | 129 | )) |
| 129 | 130 | ||
| 130 | (defmethod semanticdb-notify-references ((dbt semanticdb-table) | 131 | (cl-defmethod semanticdb-notify-references ((dbt semanticdb-table) |
| 131 | method) | 132 | method) |
| 132 | "Notify all references of the table DBT using method. | 133 | "Notify all references of the table DBT using method. |
| 133 | METHOD takes two arguments. | 134 | METHOD takes two arguments. |
diff --git a/lisp/cedet/semantic/db-typecache.el b/lisp/cedet/semantic/db-typecache.el index 723b7bd28bc..20b5b3f9ea0 100644 --- a/lisp/cedet/semantic/db-typecache.el +++ b/lisp/cedet/semantic/db-typecache.el | |||
| @@ -67,7 +67,7 @@ Said object must support `semantic-reset' methods.") | |||
| 67 | ) | 67 | ) |
| 68 | "Structure for maintaining a typecache.") | 68 | "Structure for maintaining a typecache.") |
| 69 | 69 | ||
| 70 | (defmethod semantic-reset ((tc semanticdb-typecache)) | 70 | (cl-defmethod semantic-reset ((tc semanticdb-typecache)) |
| 71 | "Reset the object IDX." | 71 | "Reset the object IDX." |
| 72 | (oset tc filestream nil) | 72 | (oset tc filestream nil) |
| 73 | (oset tc includestream nil) | 73 | (oset tc includestream nil) |
| @@ -78,14 +78,14 @@ Said object must support `semantic-reset' methods.") | |||
| 78 | (oset tc dependants nil) | 78 | (oset tc dependants nil) |
| 79 | ) | 79 | ) |
| 80 | 80 | ||
| 81 | (defmethod semanticdb-typecache-notify-reset ((tc semanticdb-typecache)) | 81 | (cl-defmethod semanticdb-typecache-notify-reset ((tc semanticdb-typecache)) |
| 82 | "Do a reset from a notify from a table we depend on." | 82 | "Do a reset from a notify from a table we depend on." |
| 83 | (oset tc includestream nil) | 83 | (oset tc includestream nil) |
| 84 | (mapc 'semantic-reset (oref tc dependants)) | 84 | (mapc 'semantic-reset (oref tc dependants)) |
| 85 | (oset tc dependants nil) | 85 | (oset tc dependants nil) |
| 86 | ) | 86 | ) |
| 87 | 87 | ||
| 88 | (defmethod semanticdb-partial-synchronize ((tc semanticdb-typecache) | 88 | (cl-defmethod semanticdb-partial-synchronize ((tc semanticdb-typecache) |
| 89 | new-tags) | 89 | new-tags) |
| 90 | "Reset the typecache based on a partial reparse." | 90 | "Reset the typecache based on a partial reparse." |
| 91 | (when (semantic-find-tags-by-class 'include new-tags) | 91 | (when (semantic-find-tags-by-class 'include new-tags) |
| @@ -125,7 +125,7 @@ Debugging function." | |||
| 125 | (t -1) )) | 125 | (t -1) )) |
| 126 | 126 | ||
| 127 | 127 | ||
| 128 | (defmethod semanticdb-get-typecache ((table semanticdb-abstract-table)) | 128 | (cl-defmethod semanticdb-get-typecache ((table semanticdb-abstract-table)) |
| 129 | "Retrieve the typecache from the semanticdb TABLE. | 129 | "Retrieve the typecache from the semanticdb TABLE. |
| 130 | If there is no table, create one, and fill it in." | 130 | If there is no table, create one, and fill it in." |
| 131 | (semanticdb-refresh-table table) | 131 | (semanticdb-refresh-table table) |
| @@ -141,7 +141,7 @@ If there is no table, create one, and fill it in." | |||
| 141 | 141 | ||
| 142 | cache)) | 142 | cache)) |
| 143 | 143 | ||
| 144 | (defmethod semanticdb-have-typecache-p ((table semanticdb-abstract-table)) | 144 | (cl-defmethod semanticdb-have-typecache-p ((table semanticdb-abstract-table)) |
| 145 | "Return non-nil (the typecache) if TABLE has a pre-calculated typecache." | 145 | "Return non-nil (the typecache) if TABLE has a pre-calculated typecache." |
| 146 | (let* ((idx (semanticdb-get-table-index table))) | 146 | (let* ((idx (semanticdb-get-table-index table))) |
| 147 | (oref idx type-cache))) | 147 | (oref idx type-cache))) |
| @@ -162,22 +162,22 @@ If there is no table, create one, and fill it in." | |||
| 162 | ) | 162 | ) |
| 163 | "Structure for maintaining a typecache.") | 163 | "Structure for maintaining a typecache.") |
| 164 | 164 | ||
| 165 | (defmethod semantic-reset ((tc semanticdb-database-typecache)) | 165 | (cl-defmethod semantic-reset ((tc semanticdb-database-typecache)) |
| 166 | "Reset the object IDX." | 166 | "Reset the object IDX." |
| 167 | (oset tc stream nil) | 167 | (oset tc stream nil) |
| 168 | ) | 168 | ) |
| 169 | 169 | ||
| 170 | (defmethod semanticdb-synchronize ((cache semanticdb-database-typecache) | 170 | (cl-defmethod semanticdb-synchronize ((cache semanticdb-database-typecache) |
| 171 | new-tags) | 171 | new-tags) |
| 172 | "Synchronize a CACHE with some NEW-TAGS." | 172 | "Synchronize a CACHE with some NEW-TAGS." |
| 173 | ) | 173 | ) |
| 174 | 174 | ||
| 175 | (defmethod semanticdb-partial-synchronize ((cache semanticdb-database-typecache) | 175 | (cl-defmethod semanticdb-partial-synchronize ((cache semanticdb-database-typecache) |
| 176 | new-tags) | 176 | new-tags) |
| 177 | "Synchronize a CACHE with some changed NEW-TAGS." | 177 | "Synchronize a CACHE with some changed NEW-TAGS." |
| 178 | ) | 178 | ) |
| 179 | 179 | ||
| 180 | (defmethod semanticdb-get-typecache ((db semanticdb-project-database)) | 180 | (cl-defmethod semanticdb-get-typecache ((db semanticdb-project-database)) |
| 181 | "Retrieve the typecache from the semantic database DB. | 181 | "Retrieve the typecache from the semantic database DB. |
| 182 | If there is no table, create one, and fill it in." | 182 | If there is no table, create one, and fill it in." |
| 183 | (semanticdb-cache-get db 'semanticdb-database-typecache) | 183 | (semanticdb-cache-get db 'semanticdb-database-typecache) |
| @@ -312,11 +312,11 @@ If TAG has fully qualified names, expand it to a series of nested | |||
| 312 | namespaces instead." | 312 | namespaces instead." |
| 313 | tag) | 313 | tag) |
| 314 | 314 | ||
| 315 | (defmethod semanticdb-typecache-file-tags ((table semanticdb-abstract-table)) | 315 | (cl-defmethod semanticdb-typecache-file-tags ((table semanticdb-abstract-table)) |
| 316 | "No tags available from non-file based tables." | 316 | "No tags available from non-file based tables." |
| 317 | nil) | 317 | nil) |
| 318 | 318 | ||
| 319 | (defmethod semanticdb-typecache-file-tags ((table semanticdb-table)) | 319 | (cl-defmethod semanticdb-typecache-file-tags ((table semanticdb-table)) |
| 320 | "Update the typecache for TABLE, and return the file-tags. | 320 | "Update the typecache for TABLE, and return the file-tags. |
| 321 | File-tags are those that belong to this file only, and excludes | 321 | File-tags are those that belong to this file only, and excludes |
| 322 | all included files." | 322 | all included files." |
| @@ -338,11 +338,11 @@ all included files." | |||
| 338 | (oref cache filestream) | 338 | (oref cache filestream) |
| 339 | )) | 339 | )) |
| 340 | 340 | ||
| 341 | (defmethod semanticdb-typecache-include-tags ((table semanticdb-abstract-table)) | 341 | (cl-defmethod semanticdb-typecache-include-tags ((table semanticdb-abstract-table)) |
| 342 | "No tags available from non-file based tables." | 342 | "No tags available from non-file based tables." |
| 343 | nil) | 343 | nil) |
| 344 | 344 | ||
| 345 | (defmethod semanticdb-typecache-include-tags ((table semanticdb-table)) | 345 | (cl-defmethod semanticdb-typecache-include-tags ((table semanticdb-table)) |
| 346 | "Update the typecache for TABLE, and return the merged types from the include tags. | 346 | "Update the typecache for TABLE, and return the merged types from the include tags. |
| 347 | Include-tags are the tags brought in via includes, all merged together into | 347 | Include-tags are the tags brought in via includes, all merged together into |
| 348 | a master list." | 348 | a master list." |
| @@ -418,7 +418,7 @@ is of class 'type." | |||
| 418 | (types (semantic-find-tags-by-class 'type nmerge))) | 418 | (types (semantic-find-tags-by-class 'type nmerge))) |
| 419 | (or (car-safe types) (car-safe nmerge)))) | 419 | (or (car-safe types) (car-safe nmerge)))) |
| 420 | 420 | ||
| 421 | (defmethod semanticdb-typecache-find-method ((table semanticdb-abstract-table) | 421 | (cl-defmethod semanticdb-typecache-find-method ((table semanticdb-abstract-table) |
| 422 | type find-file-match) | 422 | type find-file-match) |
| 423 | "Search the typecache in TABLE for the datatype TYPE. | 423 | "Search the typecache in TABLE for the datatype TYPE. |
| 424 | If type is a string, split the string, and search for the parts. | 424 | If type is a string, split the string, and search for the parts. |
| @@ -544,7 +544,7 @@ found tag to be loaded." | |||
| 544 | ;; | 544 | ;; |
| 545 | ;; Routines for a typecache that crosses all tables in a given database | 545 | ;; Routines for a typecache that crosses all tables in a given database |
| 546 | ;; for a matching major-mode. | 546 | ;; for a matching major-mode. |
| 547 | (defmethod semanticdb-typecache-for-database ((db semanticdb-project-database) | 547 | (cl-defmethod semanticdb-typecache-for-database ((db semanticdb-project-database) |
| 548 | &optional mode) | 548 | &optional mode) |
| 549 | "Return the typecache for the project database DB. | 549 | "Return the typecache for the project database DB. |
| 550 | If there isn't one, create it. | 550 | If there isn't one, create it. |
diff --git a/lisp/cedet/semantic/db.el b/lisp/cedet/semantic/db.el index b2c1252c502..1dba9b15701 100644 --- a/lisp/cedet/semantic/db.el +++ b/lisp/cedet/semantic/db.el | |||
| @@ -115,11 +115,11 @@ This table is the root of tables, and contains the minimum needed | |||
| 115 | for a new table not associated with a buffer." | 115 | for a new table not associated with a buffer." |
| 116 | :abstract t) | 116 | :abstract t) |
| 117 | 117 | ||
| 118 | (defmethod semanticdb-in-buffer-p ((obj semanticdb-abstract-table)) | 118 | (cl-defmethod semanticdb-in-buffer-p ((obj semanticdb-abstract-table)) |
| 119 | "Return a nil, meaning abstract table OBJ is not in a buffer." | 119 | "Return a nil, meaning abstract table OBJ is not in a buffer." |
| 120 | nil) | 120 | nil) |
| 121 | 121 | ||
| 122 | (defmethod semanticdb-get-buffer ((obj semanticdb-abstract-table)) | 122 | (cl-defmethod semanticdb-get-buffer ((obj semanticdb-abstract-table)) |
| 123 | "Return a buffer associated with OBJ. | 123 | "Return a buffer associated with OBJ. |
| 124 | If the buffer is not in memory, load it with `find-file-noselect'." | 124 | If the buffer is not in memory, load it with `find-file-noselect'." |
| 125 | nil) | 125 | nil) |
| @@ -127,7 +127,7 @@ If the buffer is not in memory, load it with `find-file-noselect'." | |||
| 127 | ;; This generic method allows for sloppier coding. Many | 127 | ;; This generic method allows for sloppier coding. Many |
| 128 | ;; functions treat "table" as something that could be a buffer, | 128 | ;; functions treat "table" as something that could be a buffer, |
| 129 | ;; file name, or other. This makes use of table more robust. | 129 | ;; file name, or other. This makes use of table more robust. |
| 130 | (defmethod semanticdb-full-filename (buffer-or-string) | 130 | (cl-defmethod semanticdb-full-filename (buffer-or-string) |
| 131 | "Fetch the full filename that BUFFER-OR-STRING refers to. | 131 | "Fetch the full filename that BUFFER-OR-STRING refers to. |
| 132 | This uses semanticdb to get a better file name." | 132 | This uses semanticdb to get a better file name." |
| 133 | (cond ((bufferp buffer-or-string) | 133 | (cond ((bufferp buffer-or-string) |
| @@ -136,23 +136,23 @@ This uses semanticdb to get a better file name." | |||
| 136 | ((and (stringp buffer-or-string) (file-exists-p buffer-or-string)) | 136 | ((and (stringp buffer-or-string) (file-exists-p buffer-or-string)) |
| 137 | (expand-file-name buffer-or-string)))) | 137 | (expand-file-name buffer-or-string)))) |
| 138 | 138 | ||
| 139 | (defmethod semanticdb-full-filename ((obj semanticdb-abstract-table)) | 139 | (cl-defmethod semanticdb-full-filename ((obj semanticdb-abstract-table)) |
| 140 | "Fetch the full filename that OBJ refers to. | 140 | "Fetch the full filename that OBJ refers to. |
| 141 | Abstract tables do not have file names associated with them." | 141 | Abstract tables do not have file names associated with them." |
| 142 | nil) | 142 | nil) |
| 143 | 143 | ||
| 144 | (defmethod semanticdb-dirty-p ((obj semanticdb-abstract-table)) | 144 | (cl-defmethod semanticdb-dirty-p ((obj semanticdb-abstract-table)) |
| 145 | "Return non-nil if OBJ is 'dirty'." | 145 | "Return non-nil if OBJ is 'dirty'." |
| 146 | nil) | 146 | nil) |
| 147 | 147 | ||
| 148 | (defmethod semanticdb-set-dirty ((obj semanticdb-abstract-table)) | 148 | (cl-defmethod semanticdb-set-dirty ((obj semanticdb-abstract-table)) |
| 149 | "Mark the abstract table OBJ dirty. | 149 | "Mark the abstract table OBJ dirty. |
| 150 | Abstract tables can not be marked dirty, as there is nothing | 150 | Abstract tables can not be marked dirty, as there is nothing |
| 151 | for them to synchronize against." | 151 | for them to synchronize against." |
| 152 | ;; The abstract table can not be dirty. | 152 | ;; The abstract table can not be dirty. |
| 153 | nil) | 153 | nil) |
| 154 | 154 | ||
| 155 | (defmethod semanticdb-normalize-tags ((obj semanticdb-abstract-table) tags) | 155 | (cl-defmethod semanticdb-normalize-tags ((obj semanticdb-abstract-table) tags) |
| 156 | "For the table OBJ, convert a list of TAGS, into standardized form. | 156 | "For the table OBJ, convert a list of TAGS, into standardized form. |
| 157 | The default is to return TAGS. | 157 | The default is to return TAGS. |
| 158 | Some databases may default to searching and providing simplified tags | 158 | Some databases may default to searching and providing simplified tags |
| @@ -160,7 +160,7 @@ based on whichever technique used. This method provides a hook for | |||
| 160 | them to convert TAG into a more complete form." | 160 | them to convert TAG into a more complete form." |
| 161 | tags) | 161 | tags) |
| 162 | 162 | ||
| 163 | (defmethod semanticdb-normalize-one-tag ((obj semanticdb-abstract-table) tag) | 163 | (cl-defmethod semanticdb-normalize-one-tag ((obj semanticdb-abstract-table) tag) |
| 164 | "For the table OBJ, convert a TAG, into standardized form. | 164 | "For the table OBJ, convert a TAG, into standardized form. |
| 165 | This method returns a list of the form (DATABASE . NEWTAG). | 165 | This method returns a list of the form (DATABASE . NEWTAG). |
| 166 | 166 | ||
| @@ -171,14 +171,14 @@ based on whichever technique used. This method provides a hook for | |||
| 171 | them to convert TAG into a more complete form." | 171 | them to convert TAG into a more complete form." |
| 172 | (cons obj tag)) | 172 | (cons obj tag)) |
| 173 | 173 | ||
| 174 | (defmethod object-print ((obj semanticdb-abstract-table) &rest strings) | 174 | (cl-defmethod object-print ((obj semanticdb-abstract-table) &rest strings) |
| 175 | "Pretty printer extension for `semanticdb-abstract-table'. | 175 | "Pretty printer extension for `semanticdb-abstract-table'. |
| 176 | Adds the number of tags in this file to the object print name." | 176 | Adds the number of tags in this file to the object print name." |
| 177 | (if (or (not strings) | 177 | (if (or (not strings) |
| 178 | (and (= (length strings) 1) (stringp (car strings)) | 178 | (and (= (length strings) 1) (stringp (car strings)) |
| 179 | (string= (car strings) ""))) | 179 | (string= (car strings) ""))) |
| 180 | ;; Else, add a tags quantifier. | 180 | ;; Else, add a tags quantifier. |
| 181 | (call-next-method obj (format " (%d tags)" (length (semanticdb-get-tags obj)))) | 181 | (cl-call-next-method obj (format " (%d tags)" (length (semanticdb-get-tags obj)))) |
| 182 | ;; Pass through. | 182 | ;; Pass through. |
| 183 | (apply 'call-next-method obj strings) | 183 | (apply 'call-next-method obj strings) |
| 184 | )) | 184 | )) |
| @@ -195,7 +195,7 @@ The search index will store data about which other tables might be | |||
| 195 | needed, or perhaps create hash or index tables for the current buffer." | 195 | needed, or perhaps create hash or index tables for the current buffer." |
| 196 | :abstract t) | 196 | :abstract t) |
| 197 | 197 | ||
| 198 | (defmethod semanticdb-get-table-index ((obj semanticdb-abstract-table)) | 198 | (cl-defmethod semanticdb-get-table-index ((obj semanticdb-abstract-table)) |
| 199 | "Return the search index for the table OBJ. | 199 | "Return the search index for the table OBJ. |
| 200 | If one doesn't exist, create it." | 200 | If one doesn't exist, create it." |
| 201 | (if (slot-boundp obj 'index) | 201 | (if (slot-boundp obj 'index) |
| @@ -209,13 +209,13 @@ If one doesn't exist, create it." | |||
| 209 | (oset obj index idx) | 209 | (oset obj index idx) |
| 210 | idx))) | 210 | idx))) |
| 211 | 211 | ||
| 212 | (defmethod semanticdb-synchronize ((idx semanticdb-abstract-search-index) | 212 | (cl-defmethod semanticdb-synchronize ((idx semanticdb-abstract-search-index) |
| 213 | new-tags) | 213 | new-tags) |
| 214 | "Synchronize the search index IDX with some NEW-TAGS." | 214 | "Synchronize the search index IDX with some NEW-TAGS." |
| 215 | ;; The abstract class will do... NOTHING! | 215 | ;; The abstract class will do... NOTHING! |
| 216 | ) | 216 | ) |
| 217 | 217 | ||
| 218 | (defmethod semanticdb-partial-synchronize ((idx semanticdb-abstract-search-index) | 218 | (cl-defmethod semanticdb-partial-synchronize ((idx semanticdb-abstract-search-index) |
| 219 | new-tags) | 219 | new-tags) |
| 220 | "Synchronize the search index IDX with some changed NEW-TAGS." | 220 | "Synchronize the search index IDX with some changed NEW-TAGS." |
| 221 | ;; The abstract class will do... NOTHING! | 221 | ;; The abstract class will do... NOTHING! |
| @@ -233,7 +233,7 @@ If one doesn't exist, create it." | |||
| 233 | Examples include search results from external sources such as from | 233 | Examples include search results from external sources such as from |
| 234 | Emacs's own symbol table, or from external libraries.") | 234 | Emacs's own symbol table, or from external libraries.") |
| 235 | 235 | ||
| 236 | (defmethod semanticdb-refresh-table ((obj semanticdb-search-results-table) &optional force) | 236 | (cl-defmethod semanticdb-refresh-table ((obj semanticdb-search-results-table) &optional force) |
| 237 | "If the tag list associated with OBJ is loaded, refresh it. | 237 | "If the tag list associated with OBJ is loaded, refresh it. |
| 238 | This will call `semantic-fetch-tags' if that file is in memory." | 238 | This will call `semantic-fetch-tags' if that file is in memory." |
| 239 | nil) | 239 | nil) |
| @@ -285,7 +285,7 @@ For C/C++, the C preprocessor macros can be saved here.") | |||
| 285 | ) | 285 | ) |
| 286 | "A single table of tags derived from file.") | 286 | "A single table of tags derived from file.") |
| 287 | 287 | ||
| 288 | (defmethod semanticdb-in-buffer-p ((obj semanticdb-table)) | 288 | (cl-defmethod semanticdb-in-buffer-p ((obj semanticdb-table)) |
| 289 | "Return a buffer associated with OBJ. | 289 | "Return a buffer associated with OBJ. |
| 290 | If the buffer is in memory, return that buffer." | 290 | If the buffer is in memory, return that buffer." |
| 291 | (let ((buff (oref obj buffer))) | 291 | (let ((buff (oref obj buffer))) |
| @@ -293,7 +293,7 @@ If the buffer is in memory, return that buffer." | |||
| 293 | buff | 293 | buff |
| 294 | (oset obj buffer nil)))) | 294 | (oset obj buffer nil)))) |
| 295 | 295 | ||
| 296 | (defmethod semanticdb-get-buffer ((obj semanticdb-table)) | 296 | (cl-defmethod semanticdb-get-buffer ((obj semanticdb-table)) |
| 297 | "Return a buffer associated with OBJ. | 297 | "Return a buffer associated with OBJ. |
| 298 | If the buffer is in memory, return that buffer. | 298 | If the buffer is in memory, return that buffer. |
| 299 | If the buffer is not in memory, load it with `find-file-noselect'." | 299 | If the buffer is not in memory, load it with `find-file-noselect'." |
| @@ -302,26 +302,26 @@ If the buffer is not in memory, load it with `find-file-noselect'." | |||
| 302 | (save-match-data | 302 | (save-match-data |
| 303 | (find-file-noselect (semanticdb-full-filename obj) t)))) | 303 | (find-file-noselect (semanticdb-full-filename obj) t)))) |
| 304 | 304 | ||
| 305 | (defmethod semanticdb-set-buffer ((obj semanticdb-table)) | 305 | (cl-defmethod semanticdb-set-buffer ((obj semanticdb-table)) |
| 306 | "Set the current buffer to be a buffer owned by OBJ. | 306 | "Set the current buffer to be a buffer owned by OBJ. |
| 307 | If OBJ's file is not loaded, read it in first." | 307 | If OBJ's file is not loaded, read it in first." |
| 308 | (set-buffer (semanticdb-get-buffer obj))) | 308 | (set-buffer (semanticdb-get-buffer obj))) |
| 309 | 309 | ||
| 310 | (defmethod semanticdb-full-filename ((obj semanticdb-table)) | 310 | (cl-defmethod semanticdb-full-filename ((obj semanticdb-table)) |
| 311 | "Fetch the full filename that OBJ refers to." | 311 | "Fetch the full filename that OBJ refers to." |
| 312 | (expand-file-name (oref obj file) | 312 | (expand-file-name (oref obj file) |
| 313 | (oref (oref obj parent-db) reference-directory))) | 313 | (oref (oref obj parent-db) reference-directory))) |
| 314 | 314 | ||
| 315 | (defmethod semanticdb-dirty-p ((obj semanticdb-table)) | 315 | (cl-defmethod semanticdb-dirty-p ((obj semanticdb-table)) |
| 316 | "Return non-nil if OBJ is 'dirty'." | 316 | "Return non-nil if OBJ is 'dirty'." |
| 317 | (oref obj dirty)) | 317 | (oref obj dirty)) |
| 318 | 318 | ||
| 319 | (defmethod semanticdb-set-dirty ((obj semanticdb-table)) | 319 | (cl-defmethod semanticdb-set-dirty ((obj semanticdb-table)) |
| 320 | "Mark the abstract table OBJ dirty." | 320 | "Mark the abstract table OBJ dirty." |
| 321 | (oset obj dirty t) | 321 | (oset obj dirty t) |
| 322 | ) | 322 | ) |
| 323 | 323 | ||
| 324 | (defmethod object-print ((obj semanticdb-table) &rest strings) | 324 | (cl-defmethod object-print ((obj semanticdb-table) &rest strings) |
| 325 | "Pretty printer extension for `semanticdb-table'. | 325 | "Pretty printer extension for `semanticdb-table'. |
| 326 | Adds the number of tags in this file to the object print name." | 326 | Adds the number of tags in this file to the object print name." |
| 327 | (apply 'call-next-method obj | 327 | (apply 'call-next-method obj |
| @@ -363,12 +363,12 @@ Note: This index will not be saved in a persistent file.") | |||
| 363 | :documentation "List of `semantic-db-table' objects.")) | 363 | :documentation "List of `semantic-db-table' objects.")) |
| 364 | "Database of file tables.") | 364 | "Database of file tables.") |
| 365 | 365 | ||
| 366 | (defmethod semanticdb-full-filename ((obj semanticdb-project-database)) | 366 | (cl-defmethod semanticdb-full-filename ((obj semanticdb-project-database)) |
| 367 | "Fetch the full filename that OBJ refers to. | 367 | "Fetch the full filename that OBJ refers to. |
| 368 | Abstract tables do not have file names associated with them." | 368 | Abstract tables do not have file names associated with them." |
| 369 | nil) | 369 | nil) |
| 370 | 370 | ||
| 371 | (defmethod semanticdb-dirty-p ((DB semanticdb-project-database)) | 371 | (cl-defmethod semanticdb-dirty-p ((DB semanticdb-project-database)) |
| 372 | "Return non-nil if DB is 'dirty'. | 372 | "Return non-nil if DB is 'dirty'. |
| 373 | A database is dirty if the state of the database changed in a way | 373 | A database is dirty if the state of the database changed in a way |
| 374 | where it may need to resynchronize with some persistent storage." | 374 | where it may need to resynchronize with some persistent storage." |
| @@ -379,7 +379,7 @@ where it may need to resynchronize with some persistent storage." | |||
| 379 | (setq tabs (cdr tabs))) | 379 | (setq tabs (cdr tabs))) |
| 380 | dirty)) | 380 | dirty)) |
| 381 | 381 | ||
| 382 | (defmethod object-print ((obj semanticdb-project-database) &rest strings) | 382 | (cl-defmethod object-print ((obj semanticdb-project-database) &rest strings) |
| 383 | "Pretty printer extension for `semanticdb-project-database'. | 383 | "Pretty printer extension for `semanticdb-project-database'. |
| 384 | Adds the number of tables in this file to the object print name." | 384 | Adds the number of tables in this file to the object print name." |
| 385 | (apply 'call-next-method obj | 385 | (apply 'call-next-method obj |
| @@ -390,7 +390,7 @@ Adds the number of tables in this file to the object print name." | |||
| 390 | ) | 390 | ) |
| 391 | strings))) | 391 | strings))) |
| 392 | 392 | ||
| 393 | (defmethod semanticdb-create-database :STATIC ((dbc semanticdb-project-database) directory) | 393 | (cl-defmethod semanticdb-create-database ((dbc (subclass semanticdb-project-database)) directory) |
| 394 | "Create a new semantic database of class DBC for DIRECTORY and return it. | 394 | "Create a new semantic database of class DBC for DIRECTORY and return it. |
| 395 | If a database for DIRECTORY has already been created, return it. | 395 | If a database for DIRECTORY has already been created, return it. |
| 396 | If DIRECTORY doesn't exist, create a new one." | 396 | If DIRECTORY doesn't exist, create a new one." |
| @@ -404,11 +404,11 @@ If DIRECTORY doesn't exist, create a new one." | |||
| 404 | (oset db reference-directory (file-truename directory))) | 404 | (oset db reference-directory (file-truename directory))) |
| 405 | db)) | 405 | db)) |
| 406 | 406 | ||
| 407 | (defmethod semanticdb-flush-database-tables ((db semanticdb-project-database)) | 407 | (cl-defmethod semanticdb-flush-database-tables ((db semanticdb-project-database)) |
| 408 | "Reset the tables in DB to be empty." | 408 | "Reset the tables in DB to be empty." |
| 409 | (oset db tables nil)) | 409 | (oset db tables nil)) |
| 410 | 410 | ||
| 411 | (defmethod semanticdb-create-table ((db semanticdb-project-database) file) | 411 | (cl-defmethod semanticdb-create-table ((db semanticdb-project-database) file) |
| 412 | "Create a new table in DB for FILE and return it. | 412 | "Create a new table in DB for FILE and return it. |
| 413 | The class of DB contains the class name for the type of table to create. | 413 | The class of DB contains the class name for the type of table to create. |
| 414 | If the table for FILE exists, return it. | 414 | If the table for FILE exists, return it. |
| @@ -425,7 +425,7 @@ If the table for FILE does not exist, create one." | |||
| 425 | (object-add-to-list db 'tables newtab t)) | 425 | (object-add-to-list db 'tables newtab t)) |
| 426 | newtab)) | 426 | newtab)) |
| 427 | 427 | ||
| 428 | (defmethod semanticdb-file-table ((obj semanticdb-project-database) filename) | 428 | (cl-defmethod semanticdb-file-table ((obj semanticdb-project-database) filename) |
| 429 | "From OBJ, return FILENAME's associated table object." | 429 | "From OBJ, return FILENAME's associated table object." |
| 430 | (object-assoc (file-relative-name (file-truename filename) | 430 | (object-assoc (file-relative-name (file-truename filename) |
| 431 | (oref obj reference-directory)) | 431 | (oref obj reference-directory)) |
| @@ -475,7 +475,7 @@ In order to keep your cache up to date, be sure to implement | |||
| 475 | See the file semantic/scope.el for an example." | 475 | See the file semantic/scope.el for an example." |
| 476 | :abstract t) | 476 | :abstract t) |
| 477 | 477 | ||
| 478 | (defmethod semanticdb-cache-get ((table semanticdb-abstract-table) | 478 | (cl-defmethod semanticdb-cache-get ((table semanticdb-abstract-table) |
| 479 | desired-class) | 479 | desired-class) |
| 480 | "Get a cache object on TABLE of class DESIRED-CLASS. | 480 | "Get a cache object on TABLE of class DESIRED-CLASS. |
| 481 | This method will create one if none exists with no init arguments | 481 | This method will create one if none exists with no init arguments |
| @@ -495,18 +495,18 @@ other than :table." | |||
| 495 | (object-add-to-list table 'cache obj) | 495 | (object-add-to-list table 'cache obj) |
| 496 | obj))) | 496 | obj))) |
| 497 | 497 | ||
| 498 | (defmethod semanticdb-cache-remove ((table semanticdb-abstract-table) | 498 | (cl-defmethod semanticdb-cache-remove ((table semanticdb-abstract-table) |
| 499 | cache) | 499 | cache) |
| 500 | "Remove from TABLE the cache object CACHE." | 500 | "Remove from TABLE the cache object CACHE." |
| 501 | (object-remove-from-list table 'cache cache)) | 501 | (object-remove-from-list table 'cache cache)) |
| 502 | 502 | ||
| 503 | (defmethod semanticdb-synchronize ((cache semanticdb-abstract-cache) | 503 | (cl-defmethod semanticdb-synchronize ((cache semanticdb-abstract-cache) |
| 504 | new-tags) | 504 | new-tags) |
| 505 | "Synchronize a CACHE with some NEW-TAGS." | 505 | "Synchronize a CACHE with some NEW-TAGS." |
| 506 | ;; The abstract class will do... NOTHING! | 506 | ;; The abstract class will do... NOTHING! |
| 507 | ) | 507 | ) |
| 508 | 508 | ||
| 509 | (defmethod semanticdb-partial-synchronize ((cache semanticdb-abstract-cache) | 509 | (cl-defmethod semanticdb-partial-synchronize ((cache semanticdb-abstract-cache) |
| 510 | new-tags) | 510 | new-tags) |
| 511 | "Synchronize a CACHE with some changed NEW-TAGS." | 511 | "Synchronize a CACHE with some changed NEW-TAGS." |
| 512 | ;; The abstract class will do... NOTHING! | 512 | ;; The abstract class will do... NOTHING! |
| @@ -526,7 +526,7 @@ In order to keep your cache up to date, be sure to implement | |||
| 526 | See the file semantic/scope.el for an example." | 526 | See the file semantic/scope.el for an example." |
| 527 | :abstract t) | 527 | :abstract t) |
| 528 | 528 | ||
| 529 | (defmethod semanticdb-cache-get ((db semanticdb-project-database) | 529 | (cl-defmethod semanticdb-cache-get ((db semanticdb-project-database) |
| 530 | desired-class) | 530 | desired-class) |
| 531 | "Get a cache object on DB of class DESIRED-CLASS. | 531 | "Get a cache object on DB of class DESIRED-CLASS. |
| 532 | This method will create one if none exists with no init arguments | 532 | This method will create one if none exists with no init arguments |
| @@ -546,19 +546,19 @@ other than :table." | |||
| 546 | (object-add-to-list db 'cache obj) | 546 | (object-add-to-list db 'cache obj) |
| 547 | obj))) | 547 | obj))) |
| 548 | 548 | ||
| 549 | (defmethod semanticdb-cache-remove ((db semanticdb-project-database) | 549 | (cl-defmethod semanticdb-cache-remove ((db semanticdb-project-database) |
| 550 | cache) | 550 | cache) |
| 551 | "Remove from TABLE the cache object CACHE." | 551 | "Remove from TABLE the cache object CACHE." |
| 552 | (object-remove-from-list db 'cache cache)) | 552 | (object-remove-from-list db 'cache cache)) |
| 553 | 553 | ||
| 554 | 554 | ||
| 555 | (defmethod semanticdb-synchronize ((cache semanticdb-abstract-db-cache) | 555 | (cl-defmethod semanticdb-synchronize ((cache semanticdb-abstract-db-cache) |
| 556 | new-tags) | 556 | new-tags) |
| 557 | "Synchronize a CACHE with some NEW-TAGS." | 557 | "Synchronize a CACHE with some NEW-TAGS." |
| 558 | ;; The abstract class will do... NOTHING! | 558 | ;; The abstract class will do... NOTHING! |
| 559 | ) | 559 | ) |
| 560 | 560 | ||
| 561 | (defmethod semanticdb-partial-synchronize ((cache semanticdb-abstract-db-cache) | 561 | (cl-defmethod semanticdb-partial-synchronize ((cache semanticdb-abstract-db-cache) |
| 562 | new-tags) | 562 | new-tags) |
| 563 | "Synchronize a CACHE with some changed NEW-TAGS." | 563 | "Synchronize a CACHE with some changed NEW-TAGS." |
| 564 | ;; The abstract class will do... NOTHING! | 564 | ;; The abstract class will do... NOTHING! |
| @@ -566,7 +566,7 @@ other than :table." | |||
| 566 | 566 | ||
| 567 | ;;; REFRESH | 567 | ;;; REFRESH |
| 568 | 568 | ||
| 569 | (defmethod semanticdb-refresh-table ((obj semanticdb-table) &optional force) | 569 | (cl-defmethod semanticdb-refresh-table ((obj semanticdb-table) &optional force) |
| 570 | "If the tag list associated with OBJ is loaded, refresh it. | 570 | "If the tag list associated with OBJ is loaded, refresh it. |
| 571 | Optional argument FORCE will force a refresh even if the file in question | 571 | Optional argument FORCE will force a refresh even if the file in question |
| 572 | is not in a buffer. Avoid using FORCE for most uses, as an old cache | 572 | is not in a buffer. Avoid using FORCE for most uses, as an old cache |
| @@ -593,7 +593,7 @@ This will call `semantic-fetch-tags' if that file is in memory." | |||
| 593 | ;; Kill off the buffer if it didn't exist when we were called. | 593 | ;; Kill off the buffer if it didn't exist when we were called. |
| 594 | (kill-buffer buff)))))) | 594 | (kill-buffer buff)))))) |
| 595 | 595 | ||
| 596 | (defmethod semanticdb-needs-refresh-p ((obj semanticdb-table)) | 596 | (cl-defmethod semanticdb-needs-refresh-p ((obj semanticdb-table)) |
| 597 | "Return non-nil of OBJ's tag list is out of date. | 597 | "Return non-nil of OBJ's tag list is out of date. |
| 598 | The file associated with OBJ does not need to be in a buffer." | 598 | The file associated with OBJ does not need to be in a buffer." |
| 599 | (let* ((ff (semanticdb-full-filename obj)) | 599 | (let* ((ff (semanticdb-full-filename obj)) |
| @@ -624,7 +624,7 @@ The file associated with OBJ does not need to be in a buffer." | |||
| 624 | 624 | ||
| 625 | ;;; Synchronization | 625 | ;;; Synchronization |
| 626 | ;; | 626 | ;; |
| 627 | (defmethod semanticdb-synchronize ((table semanticdb-abstract-table) | 627 | (cl-defmethod semanticdb-synchronize ((table semanticdb-abstract-table) |
| 628 | new-tags) | 628 | new-tags) |
| 629 | "Synchronize the table TABLE with some NEW-TAGS." | 629 | "Synchronize the table TABLE with some NEW-TAGS." |
| 630 | (oset table tags new-tags) | 630 | (oset table tags new-tags) |
| @@ -655,7 +655,7 @@ The file associated with OBJ does not need to be in a buffer." | |||
| 655 | (semanticdb-refresh-references table) | 655 | (semanticdb-refresh-references table) |
| 656 | ) | 656 | ) |
| 657 | 657 | ||
| 658 | (defmethod semanticdb-partial-synchronize ((table semanticdb-abstract-table) | 658 | (cl-defmethod semanticdb-partial-synchronize ((table semanticdb-abstract-table) |
| 659 | new-tags) | 659 | new-tags) |
| 660 | "Synchronize the table TABLE where some NEW-TAGS changed." | 660 | "Synchronize the table TABLE where some NEW-TAGS changed." |
| 661 | ;; You might think we need to reset the tags, but since the partial | 661 | ;; You might think we need to reset the tags, but since the partial |
| @@ -688,7 +688,7 @@ The file associated with OBJ does not need to be in a buffer." | |||
| 688 | 688 | ||
| 689 | ;;; SAVE/LOAD | 689 | ;;; SAVE/LOAD |
| 690 | ;; | 690 | ;; |
| 691 | (defmethod semanticdb-save-db ((DB semanticdb-project-database) | 691 | (cl-defmethod semanticdb-save-db ((DB semanticdb-project-database) |
| 692 | &optional suppress-questions) | 692 | &optional suppress-questions) |
| 693 | "Cause a database to save itself. | 693 | "Cause a database to save itself. |
| 694 | The database base class does not save itself persistently. | 694 | The database base class does not save itself persistently. |
| @@ -741,7 +741,7 @@ Project Management software (such as EDE and JDE) should add their own | |||
| 741 | predicates with `add-hook' to this variable, and semanticdb will save tag | 741 | predicates with `add-hook' to this variable, and semanticdb will save tag |
| 742 | caches in directories controlled by them.") | 742 | caches in directories controlled by them.") |
| 743 | 743 | ||
| 744 | (defmethod semanticdb-write-directory-p ((obj semanticdb-project-database)) | 744 | (cl-defmethod semanticdb-write-directory-p ((obj semanticdb-project-database)) |
| 745 | "Return non-nil if OBJ should be written to disk. | 745 | "Return non-nil if OBJ should be written to disk. |
| 746 | Uses `semanticdb-persistent-path' to determine the return value." | 746 | Uses `semanticdb-persistent-path' to determine the return value." |
| 747 | nil) | 747 | nil) |
| @@ -772,7 +772,7 @@ This temporarily sets `semanticdb-match-any-mode' while executing BODY." | |||
| 772 | ,@body)) | 772 | ,@body)) |
| 773 | (put 'semanticdb-with-match-any-mode 'lisp-indent-function 0) | 773 | (put 'semanticdb-with-match-any-mode 'lisp-indent-function 0) |
| 774 | 774 | ||
| 775 | (defmethod semanticdb-equivalent-mode-for-search (table &optional buffer) | 775 | (cl-defmethod semanticdb-equivalent-mode-for-search (table &optional buffer) |
| 776 | "Return non-nil if TABLE's mode is equivalent to BUFFER. | 776 | "Return non-nil if TABLE's mode is equivalent to BUFFER. |
| 777 | See `semanticdb-equivalent-mode' for details. | 777 | See `semanticdb-equivalent-mode' for details. |
| 778 | This version is used during searches. Major-modes that opt | 778 | This version is used during searches. Major-modes that opt |
| @@ -783,13 +783,13 @@ all files of any type." | |||
| 783 | (semanticdb-equivalent-mode table buffer)) | 783 | (semanticdb-equivalent-mode table buffer)) |
| 784 | ) | 784 | ) |
| 785 | 785 | ||
| 786 | (defmethod semanticdb-equivalent-mode ((table semanticdb-abstract-table) &optional buffer) | 786 | (cl-defmethod semanticdb-equivalent-mode ((table semanticdb-abstract-table) &optional buffer) |
| 787 | "Return non-nil if TABLE's mode is equivalent to BUFFER. | 787 | "Return non-nil if TABLE's mode is equivalent to BUFFER. |
| 788 | Equivalent modes are specified by the `semantic-equivalent-major-modes' | 788 | Equivalent modes are specified by the `semantic-equivalent-major-modes' |
| 789 | local variable." | 789 | local variable." |
| 790 | nil) | 790 | nil) |
| 791 | 791 | ||
| 792 | (defmethod semanticdb-equivalent-mode ((table semanticdb-table) &optional buffer) | 792 | (cl-defmethod semanticdb-equivalent-mode ((table semanticdb-table) &optional buffer) |
| 793 | "Return non-nil if TABLE's mode is equivalent to BUFFER. | 793 | "Return non-nil if TABLE's mode is equivalent to BUFFER. |
| 794 | Equivalent modes are specified by the `semantic-equivalent-major-modes' | 794 | Equivalent modes are specified by the `semantic-equivalent-major-modes' |
| 795 | local variable." | 795 | local variable." |
diff --git a/lisp/cedet/semantic/debug.el b/lisp/cedet/semantic/debug.el index 9168af59dd4..4a3c51f4e0c 100644 --- a/lisp/cedet/semantic/debug.el +++ b/lisp/cedet/semantic/debug.el | |||
| @@ -39,6 +39,7 @@ | |||
| 39 | (eval-when-compile (require 'cl)) | 39 | (eval-when-compile (require 'cl)) |
| 40 | (require 'semantic) | 40 | (require 'semantic) |
| 41 | (require 'eieio) | 41 | (require 'eieio) |
| 42 | (require 'cl-generic) | ||
| 42 | (eval-when-compile (require 'semantic/find)) | 43 | (eval-when-compile (require 'semantic/find)) |
| 43 | 44 | ||
| 44 | ;;; Code: | 45 | ;;; Code: |
| @@ -117,13 +118,13 @@ These buffers are brought into view when layout occurs.") | |||
| 117 | "Controls action when in `semantic-debug-mode'") | 118 | "Controls action when in `semantic-debug-mode'") |
| 118 | 119 | ||
| 119 | ;; Methods | 120 | ;; Methods |
| 120 | (defmethod semantic-debug-set-frame ((iface semantic-debug-interface) frame) | 121 | (cl-defmethod semantic-debug-set-frame ((iface semantic-debug-interface) frame) |
| 121 | "Set the current frame on IFACE to FRAME." | 122 | "Set the current frame on IFACE to FRAME." |
| 122 | (if frame | 123 | (if frame |
| 123 | (oset iface current-frame frame) | 124 | (oset iface current-frame frame) |
| 124 | (slot-makeunbound iface 'current-frame))) | 125 | (slot-makeunbound iface 'current-frame))) |
| 125 | 126 | ||
| 126 | (defmethod semantic-debug-set-parser-location ((iface semantic-debug-interface) point) | 127 | (cl-defmethod semantic-debug-set-parser-location ((iface semantic-debug-interface) point) |
| 127 | "Set the parser location in IFACE to POINT." | 128 | "Set the parser location in IFACE to POINT." |
| 128 | (with-current-buffer (oref iface parser-buffer) | 129 | (with-current-buffer (oref iface parser-buffer) |
| 129 | (if (not (slot-boundp iface 'parser-location)) | 130 | (if (not (slot-boundp iface 'parser-location)) |
| @@ -131,7 +132,7 @@ These buffers are brought into view when layout occurs.") | |||
| 131 | (move-marker (oref iface parser-location) point)) | 132 | (move-marker (oref iface parser-location) point)) |
| 132 | ) | 133 | ) |
| 133 | 134 | ||
| 134 | (defmethod semantic-debug-set-source-location ((iface semantic-debug-interface) point) | 135 | (cl-defmethod semantic-debug-set-source-location ((iface semantic-debug-interface) point) |
| 135 | "Set the source location in IFACE to POINT." | 136 | "Set the source location in IFACE to POINT." |
| 136 | (with-current-buffer (oref iface source-buffer) | 137 | (with-current-buffer (oref iface source-buffer) |
| 137 | (if (not (slot-boundp iface 'source-location)) | 138 | (if (not (slot-boundp iface 'source-location)) |
| @@ -139,7 +140,7 @@ These buffers are brought into view when layout occurs.") | |||
| 139 | (move-marker (oref iface source-location) point)) | 140 | (move-marker (oref iface source-location) point)) |
| 140 | ) | 141 | ) |
| 141 | 142 | ||
| 142 | (defmethod semantic-debug-interface-layout ((iface semantic-debug-interface)) | 143 | (cl-defmethod semantic-debug-interface-layout ((iface semantic-debug-interface)) |
| 143 | "Layout windows in the current frame to facilitate debugging." | 144 | "Layout windows in the current frame to facilitate debugging." |
| 144 | (delete-other-windows) | 145 | (delete-other-windows) |
| 145 | ;; Deal with the data buffer | 146 | ;; Deal with the data buffer |
| @@ -167,7 +168,7 @@ These buffers are brought into view when layout occurs.") | |||
| 167 | (goto-char (oref iface source-location))) | 168 | (goto-char (oref iface source-location))) |
| 168 | ) | 169 | ) |
| 169 | 170 | ||
| 170 | (defmethod semantic-debug-highlight-lexical-token ((iface semantic-debug-interface) token) | 171 | (cl-defmethod semantic-debug-highlight-lexical-token ((iface semantic-debug-interface) token) |
| 171 | "For IFACE, highlight TOKEN in the source buffer . | 172 | "For IFACE, highlight TOKEN in the source buffer . |
| 172 | TOKEN is a lexical token." | 173 | TOKEN is a lexical token." |
| 173 | (set-buffer (oref iface :source-buffer)) | 174 | (set-buffer (oref iface :source-buffer)) |
| @@ -178,7 +179,7 @@ TOKEN is a lexical token." | |||
| 178 | (semantic-debug-set-source-location iface (semantic-lex-token-start token)) | 179 | (semantic-debug-set-source-location iface (semantic-lex-token-start token)) |
| 179 | ) | 180 | ) |
| 180 | 181 | ||
| 181 | (defmethod semantic-debug-highlight-rule ((iface semantic-debug-interface) nonterm &optional rule match) | 182 | (cl-defmethod semantic-debug-highlight-rule ((iface semantic-debug-interface) nonterm &optional rule match) |
| 182 | "For IFACE, highlight NONTERM in the parser buffer. | 183 | "For IFACE, highlight NONTERM in the parser buffer. |
| 183 | NONTERM is the name of the rule currently being processed that shows up | 184 | NONTERM is the name of the rule currently being processed that shows up |
| 184 | as a nonterminal (or tag) in the source buffer. | 185 | as a nonterminal (or tag) in the source buffer. |
| @@ -226,7 +227,7 @@ If RULE and MATCH indices are specified, highlight those also." | |||
| 226 | 227 | ||
| 227 | )))) | 228 | )))) |
| 228 | 229 | ||
| 229 | (defmethod semantic-debug-unhighlight ((iface semantic-debug-interface)) | 230 | (cl-defmethod semantic-debug-unhighlight ((iface semantic-debug-interface)) |
| 230 | "Remove all debugging overlays." | 231 | "Remove all debugging overlays." |
| 231 | (mapc 'semantic-overlay-delete (oref iface overlays)) | 232 | (mapc 'semantic-overlay-delete (oref iface overlays)) |
| 232 | (oset iface overlays nil)) | 233 | (oset iface overlays nil)) |
| @@ -271,12 +272,12 @@ on different types of return values." | |||
| 271 | ) | 272 | ) |
| 272 | "One frame representation.") | 273 | "One frame representation.") |
| 273 | 274 | ||
| 274 | (defmethod semantic-debug-frame-highlight ((frame semantic-debug-frame)) | 275 | (cl-defmethod semantic-debug-frame-highlight ((frame semantic-debug-frame)) |
| 275 | "Highlight one parser frame." | 276 | "Highlight one parser frame." |
| 276 | 277 | ||
| 277 | ) | 278 | ) |
| 278 | 279 | ||
| 279 | (defmethod semantic-debug-frame-info ((frame semantic-debug-frame)) | 280 | (cl-defmethod semantic-debug-frame-info ((frame semantic-debug-frame)) |
| 280 | "Display info about this one parser frame." | 281 | "Display info about this one parser frame." |
| 281 | 282 | ||
| 282 | ) | 283 | ) |
| @@ -521,49 +522,49 @@ by overriding one of the command methods. Be sure to use | |||
| 521 | down to your parser later." | 522 | down to your parser later." |
| 522 | :abstract t) | 523 | :abstract t) |
| 523 | 524 | ||
| 524 | (defmethod semantic-debug-parser-next ((parser semantic-debug-parser)) | 525 | (cl-defmethod semantic-debug-parser-next ((parser semantic-debug-parser)) |
| 525 | "Execute next for this PARSER." | 526 | "Execute next for this PARSER." |
| 526 | (setq semantic-debug-user-command 'next) | 527 | (setq semantic-debug-user-command 'next) |
| 527 | ) | 528 | ) |
| 528 | 529 | ||
| 529 | (defmethod semantic-debug-parser-step ((parser semantic-debug-parser)) | 530 | (cl-defmethod semantic-debug-parser-step ((parser semantic-debug-parser)) |
| 530 | "Execute a step for this PARSER." | 531 | "Execute a step for this PARSER." |
| 531 | (setq semantic-debug-user-command 'step) | 532 | (setq semantic-debug-user-command 'step) |
| 532 | ) | 533 | ) |
| 533 | 534 | ||
| 534 | (defmethod semantic-debug-parser-go ((parser semantic-debug-parser)) | 535 | (cl-defmethod semantic-debug-parser-go ((parser semantic-debug-parser)) |
| 535 | "Continue execution in this PARSER until the next breakpoint." | 536 | "Continue execution in this PARSER until the next breakpoint." |
| 536 | (setq semantic-debug-user-command 'go) | 537 | (setq semantic-debug-user-command 'go) |
| 537 | ) | 538 | ) |
| 538 | 539 | ||
| 539 | (defmethod semantic-debug-parser-fail ((parser semantic-debug-parser)) | 540 | (cl-defmethod semantic-debug-parser-fail ((parser semantic-debug-parser)) |
| 540 | "Continue execution in this PARSER until the next breakpoint." | 541 | "Continue execution in this PARSER until the next breakpoint." |
| 541 | (setq semantic-debug-user-command 'fail) | 542 | (setq semantic-debug-user-command 'fail) |
| 542 | ) | 543 | ) |
| 543 | 544 | ||
| 544 | (defmethod semantic-debug-parser-quit ((parser semantic-debug-parser)) | 545 | (cl-defmethod semantic-debug-parser-quit ((parser semantic-debug-parser)) |
| 545 | "Continue execution in this PARSER until the next breakpoint." | 546 | "Continue execution in this PARSER until the next breakpoint." |
| 546 | (setq semantic-debug-user-command 'quit) | 547 | (setq semantic-debug-user-command 'quit) |
| 547 | ) | 548 | ) |
| 548 | 549 | ||
| 549 | (defmethod semantic-debug-parser-abort ((parser semantic-debug-parser)) | 550 | (cl-defmethod semantic-debug-parser-abort ((parser semantic-debug-parser)) |
| 550 | "Continue execution in this PARSER until the next breakpoint." | 551 | "Continue execution in this PARSER until the next breakpoint." |
| 551 | (setq semantic-debug-user-command 'abort) | 552 | (setq semantic-debug-user-command 'abort) |
| 552 | ) | 553 | ) |
| 553 | 554 | ||
| 554 | (defmethod semantic-debug-parser-print-state ((parser semantic-debug-parser)) | 555 | (cl-defmethod semantic-debug-parser-print-state ((parser semantic-debug-parser)) |
| 555 | "Print state for this PARSER at the current breakpoint." | 556 | "Print state for this PARSER at the current breakpoint." |
| 556 | (with-slots (current-frame) semantic-debug-current-interface | 557 | (with-slots (current-frame) semantic-debug-current-interface |
| 557 | (when current-frame | 558 | (when current-frame |
| 558 | (semantic-debug-frame-info current-frame) | 559 | (semantic-debug-frame-info current-frame) |
| 559 | ))) | 560 | ))) |
| 560 | 561 | ||
| 561 | (defmethod semantic-debug-parser-break ((parser semantic-debug-parser)) | 562 | (cl-defmethod semantic-debug-parser-break ((parser semantic-debug-parser)) |
| 562 | "Set a breakpoint for this PARSER." | 563 | "Set a breakpoint for this PARSER." |
| 563 | ) | 564 | ) |
| 564 | 565 | ||
| 565 | ;; Stack stuff | 566 | ;; Stack stuff |
| 566 | (defmethod semantic-debug-parser-frames ((parser semantic-debug-parser)) | 567 | (cl-defmethod semantic-debug-parser-frames ((parser semantic-debug-parser)) |
| 567 | "Return a list of frames for the current parser. | 568 | "Return a list of frames for the current parser. |
| 568 | A frame is of the form: | 569 | A frame is of the form: |
| 569 | ( .. .what ? .. ) | 570 | ( .. .what ? .. ) |
diff --git a/lisp/cedet/semantic/decorate/include.el b/lisp/cedet/semantic/decorate/include.el index 718669b567b..7bfca77e8c4 100644 --- a/lisp/cedet/semantic/decorate/include.el +++ b/lisp/cedet/semantic/decorate/include.el | |||
| @@ -831,7 +831,7 @@ When an include's referring file is parsed, we need to undecorate | |||
| 831 | any decorated referring includes.") | 831 | any decorated referring includes.") |
| 832 | 832 | ||
| 833 | 833 | ||
| 834 | (defmethod semantic-reset ((obj semantic-decoration-unparsed-include-cache)) | 834 | (cl-defmethod semantic-reset ((obj semantic-decoration-unparsed-include-cache)) |
| 835 | "Reset OBJ back to it's empty settings." | 835 | "Reset OBJ back to it's empty settings." |
| 836 | (let ((table (oref obj table))) | 836 | (let ((table (oref obj table))) |
| 837 | ;; This is a hack. Add in something better? | 837 | ;; This is a hack. Add in something better? |
| @@ -841,13 +841,13 @@ any decorated referring includes.") | |||
| 841 | )) | 841 | )) |
| 842 | )) | 842 | )) |
| 843 | 843 | ||
| 844 | (defmethod semanticdb-partial-synchronize ((cache semantic-decoration-unparsed-include-cache) | 844 | (cl-defmethod semanticdb-partial-synchronize ((cache semantic-decoration-unparsed-include-cache) |
| 845 | new-tags) | 845 | new-tags) |
| 846 | "Synchronize CACHE with some NEW-TAGS." | 846 | "Synchronize CACHE with some NEW-TAGS." |
| 847 | (if (semantic-find-tags-by-class 'include new-tags) | 847 | (if (semantic-find-tags-by-class 'include new-tags) |
| 848 | (semantic-reset cache))) | 848 | (semantic-reset cache))) |
| 849 | 849 | ||
| 850 | (defmethod semanticdb-synchronize ((cache semantic-decoration-unparsed-include-cache) | 850 | (cl-defmethod semanticdb-synchronize ((cache semantic-decoration-unparsed-include-cache) |
| 851 | new-tags) | 851 | new-tags) |
| 852 | "Synchronize a CACHE with some NEW-TAGS." | 852 | "Synchronize a CACHE with some NEW-TAGS." |
| 853 | (semantic-reset cache)) | 853 | (semantic-reset cache)) |
diff --git a/lisp/cedet/semantic/ede-grammar.el b/lisp/cedet/semantic/ede-grammar.el index 67f0cfeea6d..eb4a98c0a2d 100644 --- a/lisp/cedet/semantic/ede-grammar.el +++ b/lisp/cedet/semantic/ede-grammar.el | |||
| @@ -51,7 +51,7 @@ | |||
| 51 | A grammar target consists of grammar files that build Emacs Lisp programs for | 51 | A grammar target consists of grammar files that build Emacs Lisp programs for |
| 52 | parsing different languages.") | 52 | parsing different languages.") |
| 53 | 53 | ||
| 54 | (defmethod ede-proj-makefile-dependencies ((this semantic-ede-proj-target-grammar)) | 54 | (cl-defmethod ede-proj-makefile-dependencies ((this semantic-ede-proj-target-grammar)) |
| 55 | "Return a string representing the dependencies for THIS. | 55 | "Return a string representing the dependencies for THIS. |
| 56 | Some compilers only use the first element in the dependencies, others | 56 | Some compilers only use the first element in the dependencies, others |
| 57 | have a list of intermediates (object files), and others don't care. | 57 | have a list of intermediates (object files), and others don't care. |
| @@ -124,17 +124,17 @@ For Emacs Lisp, return addsuffix command on source files." | |||
| 124 | "Compile Emacs Lisp programs.") | 124 | "Compile Emacs Lisp programs.") |
| 125 | 125 | ||
| 126 | ;;; Target options. | 126 | ;;; Target options. |
| 127 | (defmethod ede-buffer-mine ((this semantic-ede-proj-target-grammar) buffer) | 127 | (cl-defmethod ede-buffer-mine ((this semantic-ede-proj-target-grammar) buffer) |
| 128 | "Return t if object THIS lays claim to the file in BUFFER. | 128 | "Return t if object THIS lays claim to the file in BUFFER. |
| 129 | Lays claim to all -by.el, and -wy.el files." | 129 | Lays claim to all -by.el, and -wy.el files." |
| 130 | ;; We need to be a little more careful than this, but at the moment it | 130 | ;; We need to be a little more careful than this, but at the moment it |
| 131 | ;; is common to have only one target of this class per directory. | 131 | ;; is common to have only one target of this class per directory. |
| 132 | (if (string-match "-[bw]y\\.elc?$" (buffer-file-name buffer)) | 132 | (if (string-match "-[bw]y\\.elc?$" (buffer-file-name buffer)) |
| 133 | t | 133 | t |
| 134 | (call-next-method) ; The usual thing. | 134 | (cl-call-next-method) ; The usual thing. |
| 135 | )) | 135 | )) |
| 136 | 136 | ||
| 137 | (defmethod project-compile-target ((obj semantic-ede-proj-target-grammar)) | 137 | (cl-defmethod project-compile-target ((obj semantic-ede-proj-target-grammar)) |
| 138 | "Compile all sources in a Lisp target OBJ." | 138 | "Compile all sources in a Lisp target OBJ." |
| 139 | (let* ((cb (current-buffer)) | 139 | (let* ((cb (current-buffer)) |
| 140 | (proj (ede-target-parent obj)) | 140 | (proj (ede-target-parent obj)) |
| @@ -167,13 +167,13 @@ Lays claim to all -by.el, and -wy.el files." | |||
| 167 | 167 | ||
| 168 | ;;; Makefile generation functions | 168 | ;;; Makefile generation functions |
| 169 | ;; | 169 | ;; |
| 170 | (defmethod ede-proj-makefile-sourcevar ((this semantic-ede-proj-target-grammar)) | 170 | (cl-defmethod ede-proj-makefile-sourcevar ((this semantic-ede-proj-target-grammar)) |
| 171 | "Return the variable name for THIS's sources." | 171 | "Return the variable name for THIS's sources." |
| 172 | (cond ((ede-proj-automake-p) | 172 | (cond ((ede-proj-automake-p) |
| 173 | (error "No Automake support for Semantic Grammars")) | 173 | (error "No Automake support for Semantic Grammars")) |
| 174 | (t (concat (ede-pmake-varname this) "_SEMANTIC_GRAMMAR")))) | 174 | (t (concat (ede-pmake-varname this) "_SEMANTIC_GRAMMAR")))) |
| 175 | 175 | ||
| 176 | (defmethod ede-proj-makefile-insert-variables :AFTER ((this semantic-ede-proj-target-grammar)) | 176 | (cl-defmethod ede-proj-makefile-insert-variables :after ((this semantic-ede-proj-target-grammar)) |
| 177 | "Insert variables needed by target THIS." | 177 | "Insert variables needed by target THIS." |
| 178 | (ede-proj-makefile-insert-loadpath-items | 178 | (ede-proj-makefile-insert-loadpath-items |
| 179 | (ede-proj-elisp-packages-to-loadpath | 179 | (ede-proj-elisp-packages-to-loadpath |
| @@ -192,7 +192,7 @@ Lays claim to all -by.el, and -wy.el files." | |||
| 192 | " "))) | 192 | " "))) |
| 193 | ) | 193 | ) |
| 194 | 194 | ||
| 195 | (defmethod ede-proj-makefile-insert-rules :after ((this semantic-ede-proj-target-grammar)) | 195 | (cl-defmethod ede-proj-makefile-insert-rules :after ((this semantic-ede-proj-target-grammar)) |
| 196 | "Insert rules needed by THIS target. | 196 | "Insert rules needed by THIS target. |
| 197 | This raises `max-specpdl-size' and `max-lisp-eval-depth', which can be | 197 | This raises `max-specpdl-size' and `max-lisp-eval-depth', which can be |
| 198 | needed for the compilation of the resulting parsers." | 198 | needed for the compilation of the resulting parsers." |
| @@ -200,12 +200,12 @@ needed for the compilation of the resulting parsers." | |||
| 200 | max-lisp-eval-depth 700)'\n" | 200 | max-lisp-eval-depth 700)'\n" |
| 201 | (oref this name)))) | 201 | (oref this name)))) |
| 202 | 202 | ||
| 203 | (defmethod ede-proj-makefile-insert-dist-dependencies ((this semantic-ede-proj-target-grammar)) | 203 | (cl-defmethod ede-proj-makefile-insert-dist-dependencies ((this semantic-ede-proj-target-grammar)) |
| 204 | "Insert dist dependencies, or intermediate targets. | 204 | "Insert dist dependencies, or intermediate targets. |
| 205 | This makes sure that all grammar lisp files are created before the dist | 205 | This makes sure that all grammar lisp files are created before the dist |
| 206 | runs, so they are always up to date. | 206 | runs, so they are always up to date. |
| 207 | Argument THIS is the target that should insert stuff." | 207 | Argument THIS is the target that should insert stuff." |
| 208 | (call-next-method) | 208 | (cl-call-next-method) |
| 209 | (insert " $(" (ede-pmake-varname this) "_SEMANTIC_GRAMMAR_EL)") | 209 | (insert " $(" (ede-pmake-varname this) "_SEMANTIC_GRAMMAR_EL)") |
| 210 | ) | 210 | ) |
| 211 | 211 | ||
diff --git a/lisp/cedet/semantic/ia-sb.el b/lisp/cedet/semantic/ia-sb.el index 410d63acab4..fcc9c002cef 100644 --- a/lisp/cedet/semantic/ia-sb.el +++ b/lisp/cedet/semantic/ia-sb.el | |||
| @@ -138,7 +138,7 @@ DIRECTORY is the current directory, which is ignored, and ZERO is 0." | |||
| 138 | 138 | ||
| 139 | ))) | 139 | ))) |
| 140 | 140 | ||
| 141 | (defmethod semantic-ia-sb-show-doc ((context semantic-analyze-context)) | 141 | (cl-defmethod semantic-ia-sb-show-doc ((context semantic-analyze-context)) |
| 142 | "Show documentation about CONTEXT if CONTEXT points at a complete symbol." | 142 | "Show documentation about CONTEXT if CONTEXT points at a complete symbol." |
| 143 | (let ((sym (car (reverse (oref context prefix)))) | 143 | (let ((sym (car (reverse (oref context prefix)))) |
| 144 | (doc nil)) | 144 | (doc nil)) |
| @@ -163,7 +163,7 @@ DIRECTORY is the current directory, which is ignored, and ZERO is 0." | |||
| 163 | ;; This is from semantic-sb | 163 | ;; This is from semantic-sb |
| 164 | 'semantic-sb-token-jump)))) | 164 | 'semantic-sb-token-jump)))) |
| 165 | 165 | ||
| 166 | (defmethod semantic-ia-sb-more-buttons ((context semantic-analyze-context)) | 166 | (cl-defmethod semantic-ia-sb-more-buttons ((context semantic-analyze-context)) |
| 167 | "Show a set of speedbar buttons specific to CONTEXT." | 167 | "Show a set of speedbar buttons specific to CONTEXT." |
| 168 | (let ((prefix (oref context prefix))) | 168 | (let ((prefix (oref context prefix))) |
| 169 | (when prefix | 169 | (when prefix |
| @@ -173,9 +173,9 @@ DIRECTORY is the current directory, which is ignored, and ZERO is 0." | |||
| 173 | 'semantic-sb-token-jump)) | 173 | 'semantic-sb-token-jump)) |
| 174 | )) | 174 | )) |
| 175 | 175 | ||
| 176 | (defmethod semantic-ia-sb-more-buttons ((context semantic-analyze-context-assignment)) | 176 | (cl-defmethod semantic-ia-sb-more-buttons ((context semantic-analyze-context-assignment)) |
| 177 | "Show a set of speedbar buttons specific to CONTEXT." | 177 | "Show a set of speedbar buttons specific to CONTEXT." |
| 178 | (call-next-method) | 178 | (cl-call-next-method) |
| 179 | (let ((assignee (oref context assignee))) | 179 | (let ((assignee (oref context assignee))) |
| 180 | (when assignee | 180 | (when assignee |
| 181 | (speedbar-insert-separator "Assignee") | 181 | (speedbar-insert-separator "Assignee") |
| @@ -183,9 +183,9 @@ DIRECTORY is the current directory, which is ignored, and ZERO is 0." | |||
| 183 | 'speedbar-tag-face | 183 | 'speedbar-tag-face |
| 184 | 'semantic-sb-token-jump)))) | 184 | 'semantic-sb-token-jump)))) |
| 185 | 185 | ||
| 186 | (defmethod semantic-ia-sb-more-buttons ((context semantic-analyze-context-functionarg)) | 186 | (cl-defmethod semantic-ia-sb-more-buttons ((context semantic-analyze-context-functionarg)) |
| 187 | "Show a set of speedbar buttons specific to CONTEXT." | 187 | "Show a set of speedbar buttons specific to CONTEXT." |
| 188 | (call-next-method) | 188 | (cl-call-next-method) |
| 189 | (let ((func (oref context function))) | 189 | (let ((func (oref context function))) |
| 190 | (when func | 190 | (when func |
| 191 | (speedbar-insert-separator "Function") | 191 | (speedbar-insert-separator "Function") |
diff --git a/lisp/cedet/semantic/mru-bookmark.el b/lisp/cedet/semantic/mru-bookmark.el index ddebcd627b2..b75408f6a9d 100644 --- a/lisp/cedet/semantic/mru-bookmark.el +++ b/lisp/cedet/semantic/mru-bookmark.el | |||
| @@ -86,7 +86,7 @@ Nice values are 'edit, 'read, 'jump, and 'mark. | |||
| 86 | ) | 86 | ) |
| 87 | "A single bookmark.") | 87 | "A single bookmark.") |
| 88 | 88 | ||
| 89 | (defmethod initialize-instance :AFTER ((sbm semantic-bookmark) &rest fields) | 89 | (cl-defmethod initialize-instance :after ((sbm semantic-bookmark) &rest fields) |
| 90 | "Initialize the bookmark SBM with details about :tag." | 90 | "Initialize the bookmark SBM with details about :tag." |
| 91 | (condition-case nil | 91 | (condition-case nil |
| 92 | (save-excursion | 92 | (save-excursion |
| @@ -96,7 +96,7 @@ Nice values are 'edit, 'read, 'jump, and 'mark. | |||
| 96 | (error (message "Error bookmarking tag."))) | 96 | (error (message "Error bookmarking tag."))) |
| 97 | ) | 97 | ) |
| 98 | 98 | ||
| 99 | (defmethod semantic-mrub-visit ((sbm semantic-bookmark)) | 99 | (cl-defmethod semantic-mrub-visit ((sbm semantic-bookmark)) |
| 100 | "Visit the semantic tag bookmark SBM. | 100 | "Visit the semantic tag bookmark SBM. |
| 101 | Uses `semantic-go-to-tag' and highlighting." | 101 | Uses `semantic-go-to-tag' and highlighting." |
| 102 | (require 'semantic/decorate) | 102 | (require 'semantic/decorate) |
| @@ -117,7 +117,7 @@ Uses `semantic-go-to-tag' and highlighting." | |||
| 117 | (semantic-momentary-highlight-tag tag) | 117 | (semantic-momentary-highlight-tag tag) |
| 118 | )) | 118 | )) |
| 119 | 119 | ||
| 120 | (defmethod semantic-mrub-update ((sbm semantic-bookmark) point reason) | 120 | (cl-defmethod semantic-mrub-update ((sbm semantic-bookmark) point reason) |
| 121 | "Update the existing bookmark SBM. | 121 | "Update the existing bookmark SBM. |
| 122 | POINT is some important location. | 122 | POINT is some important location. |
| 123 | REASON is a symbol. See slot `reason' on `semantic-bookmark'." | 123 | REASON is a symbol. See slot `reason' on `semantic-bookmark'." |
| @@ -132,7 +132,7 @@ REASON is a symbol. See slot `reason' on `semantic-bookmark'." | |||
| 132 | (error nil)) | 132 | (error nil)) |
| 133 | ) | 133 | ) |
| 134 | 134 | ||
| 135 | (defmethod semantic-mrub-preflush ((sbm semantic-bookmark)) | 135 | (cl-defmethod semantic-mrub-preflush ((sbm semantic-bookmark)) |
| 136 | "Method called on a tag before the current buffer list of tags is flushed. | 136 | "Method called on a tag before the current buffer list of tags is flushed. |
| 137 | If there is a buffer match, unlink the tag." | 137 | If there is a buffer match, unlink the tag." |
| 138 | (let ((tag (oref sbm tag)) | 138 | (let ((tag (oref sbm tag)) |
| @@ -183,7 +183,7 @@ Argument POINT is where to find the tag near." | |||
| 183 | (when nearby (setq tag nearby)))) | 183 | (when nearby (setq tag nearby)))) |
| 184 | tag)) | 184 | tag)) |
| 185 | 185 | ||
| 186 | (defmethod semantic-mrub-push ((sbr semantic-bookmark-ring) point | 186 | (cl-defmethod semantic-mrub-push ((sbr semantic-bookmark-ring) point |
| 187 | &optional reason) | 187 | &optional reason) |
| 188 | "Add a bookmark to the ring SBR from POINT. | 188 | "Add a bookmark to the ring SBR from POINT. |
| 189 | REASON is why it is being pushed. See doc for `semantic-bookmark' | 189 | REASON is why it is being pushed. See doc for `semantic-bookmark' |
diff --git a/lisp/cedet/semantic/scope.el b/lisp/cedet/semantic/scope.el index c56cbc3c126..acc6545233b 100644 --- a/lisp/cedet/semantic/scope.el +++ b/lisp/cedet/semantic/scope.el | |||
| @@ -101,7 +101,7 @@ Saves scoping information between runs of the analyzer.") | |||
| 101 | ;; | 101 | ;; |
| 102 | ;; Methods for basic management of the structure in semanticdb. | 102 | ;; Methods for basic management of the structure in semanticdb. |
| 103 | ;; | 103 | ;; |
| 104 | (defmethod semantic-reset ((obj semantic-scope-cache)) | 104 | (cl-defmethod semantic-reset ((obj semantic-scope-cache)) |
| 105 | "Reset OBJ back to it's empty settings." | 105 | "Reset OBJ back to it's empty settings." |
| 106 | (oset obj tag nil) | 106 | (oset obj tag nil) |
| 107 | (oset obj scopetypes nil) | 107 | (oset obj scopetypes nil) |
| @@ -114,13 +114,13 @@ Saves scoping information between runs of the analyzer.") | |||
| 114 | (oset obj typescope nil) | 114 | (oset obj typescope nil) |
| 115 | ) | 115 | ) |
| 116 | 116 | ||
| 117 | (defmethod semanticdb-synchronize ((cache semantic-scope-cache) | 117 | (cl-defmethod semanticdb-synchronize ((cache semantic-scope-cache) |
| 118 | new-tags) | 118 | new-tags) |
| 119 | "Synchronize a CACHE with some NEW-TAGS." | 119 | "Synchronize a CACHE with some NEW-TAGS." |
| 120 | (semantic-reset cache)) | 120 | (semantic-reset cache)) |
| 121 | 121 | ||
| 122 | 122 | ||
| 123 | (defmethod semanticdb-partial-synchronize ((cache semantic-scope-cache) | 123 | (cl-defmethod semanticdb-partial-synchronize ((cache semantic-scope-cache) |
| 124 | new-tags) | 124 | new-tags) |
| 125 | "Synchronize a CACHE with some changed NEW-TAGS." | 125 | "Synchronize a CACHE with some changed NEW-TAGS." |
| 126 | ;; If there are any includes or datatypes changed, then clear. | 126 | ;; If there are any includes or datatypes changed, then clear. |
| @@ -137,7 +137,7 @@ Saves scoping information between runs of the analyzer.") | |||
| 137 | 'semantic-scope-cache))) | 137 | 'semantic-scope-cache))) |
| 138 | (semantic-reset co)))) | 138 | (semantic-reset co)))) |
| 139 | 139 | ||
| 140 | (defmethod semantic-scope-set-typecache ((cache semantic-scope-cache) | 140 | (cl-defmethod semantic-scope-set-typecache ((cache semantic-scope-cache) |
| 141 | types-in-scope) | 141 | types-in-scope) |
| 142 | "Set the :typescope property on CACHE to some types. | 142 | "Set the :typescope property on CACHE to some types. |
| 143 | TYPES-IN-SCOPE is a list of type tags whos members are | 143 | TYPES-IN-SCOPE is a list of type tags whos members are |
| @@ -829,7 +829,7 @@ hits in order, with the first tag being in the closest scope." | |||
| 829 | 829 | ||
| 830 | ;;; DUMP | 830 | ;;; DUMP |
| 831 | ;; | 831 | ;; |
| 832 | (defmethod semantic-analyze-show ((context semantic-scope-cache)) | 832 | (cl-defmethod semantic-analyze-show ((context semantic-scope-cache)) |
| 833 | "Insert CONTEXT into the current buffer in a nice way." | 833 | "Insert CONTEXT into the current buffer in a nice way." |
| 834 | (require 'semantic/analyze) | 834 | (require 'semantic/analyze) |
| 835 | (semantic-analyze-princ-sequence (oref context scopetypes) "-> ScopeTypes: " ) | 835 | (semantic-analyze-princ-sequence (oref context scopetypes) "-> ScopeTypes: " ) |
diff --git a/lisp/cedet/semantic/symref.el b/lisp/cedet/semantic/symref.el index 170495e5d61..10293d9496c 100644 --- a/lisp/cedet/semantic/symref.el +++ b/lisp/cedet/semantic/symref.el | |||
| @@ -314,7 +314,7 @@ Use the `semantic-symref-hit-tags' method to get this list.") | |||
| 314 | ) | 314 | ) |
| 315 | "The results from a symbol reference search.") | 315 | "The results from a symbol reference search.") |
| 316 | 316 | ||
| 317 | (defmethod semantic-symref-result-get-files ((result semantic-symref-result)) | 317 | (cl-defmethod semantic-symref-result-get-files ((result semantic-symref-result)) |
| 318 | "Get the list of files from the symref result RESULT." | 318 | "Get the list of files from the symref result RESULT." |
| 319 | (if (slot-boundp result :hit-files) | 319 | (if (slot-boundp result :hit-files) |
| 320 | (oref result hit-files) | 320 | (oref result hit-files) |
| @@ -352,7 +352,7 @@ until the next command is executed." | |||
| 352 | (remove-hook 'post-command-hook 'semantic-symref-cleanup-recent-buffers-fcn) | 352 | (remove-hook 'post-command-hook 'semantic-symref-cleanup-recent-buffers-fcn) |
| 353 | ) | 353 | ) |
| 354 | 354 | ||
| 355 | (defmethod semantic-symref-result-get-tags ((result semantic-symref-result) | 355 | (cl-defmethod semantic-symref-result-get-tags ((result semantic-symref-result) |
| 356 | &optional open-buffers) | 356 | &optional open-buffers) |
| 357 | "Get the list of tags from the symref result RESULT. | 357 | "Get the list of tags from the symref result RESULT. |
| 358 | Optional OPEN-BUFFERS indicates that the buffers that the hits are | 358 | Optional OPEN-BUFFERS indicates that the buffers that the hits are |
| @@ -531,7 +531,7 @@ NAME is the name of the tool used in the configuration variable | |||
| 531 | `semantic-symref-tool'" | 531 | `semantic-symref-tool'" |
| 532 | :abstract t) | 532 | :abstract t) |
| 533 | 533 | ||
| 534 | (defmethod semantic-symref-get-result ((tool semantic-symref-tool-baseclass)) | 534 | (cl-defmethod semantic-symref-get-result ((tool semantic-symref-tool-baseclass)) |
| 535 | "Calculate the results of a search based on TOOL. | 535 | "Calculate the results of a search based on TOOL. |
| 536 | The symref TOOL should already contain the search criteria." | 536 | The symref TOOL should already contain the search criteria." |
| 537 | (let ((answer (semantic-symref-perform-search tool)) | 537 | (let ((answer (semantic-symref-perform-search tool)) |
| @@ -549,11 +549,11 @@ The symref TOOL should already contain the search criteria." | |||
| 549 | ) | 549 | ) |
| 550 | )) | 550 | )) |
| 551 | 551 | ||
| 552 | (defmethod semantic-symref-perform-search ((tool semantic-symref-tool-baseclass)) | 552 | (cl-defmethod semantic-symref-perform-search ((tool semantic-symref-tool-baseclass)) |
| 553 | "Base search for symref tools should throw an error." | 553 | "Base search for symref tools should throw an error." |
| 554 | (error "Symref tool objects must implement `semantic-symref-perform-search'")) | 554 | (error "Symref tool objects must implement `semantic-symref-perform-search'")) |
| 555 | 555 | ||
| 556 | (defmethod semantic-symref-parse-tool-output ((tool semantic-symref-tool-baseclass) | 556 | (cl-defmethod semantic-symref-parse-tool-output ((tool semantic-symref-tool-baseclass) |
| 557 | outputbuffer) | 557 | outputbuffer) |
| 558 | "Parse the entire OUTPUTBUFFER of a symref tool. | 558 | "Parse the entire OUTPUTBUFFER of a symref tool. |
| 559 | Calls the method `semantic-symref-parse-tool-output-one-line' over and | 559 | Calls the method `semantic-symref-parse-tool-output-one-line' over and |
| @@ -567,7 +567,7 @@ over until it returns nil." | |||
| 567 | (nreverse result))) | 567 | (nreverse result))) |
| 568 | ) | 568 | ) |
| 569 | 569 | ||
| 570 | (defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref-tool-baseclass)) | 570 | (cl-defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref-tool-baseclass)) |
| 571 | "Base tool output parser is not implemented." | 571 | "Base tool output parser is not implemented." |
| 572 | (error "Symref tool objects must implement `semantic-symref-parse-tool-output-one-line'")) | 572 | (error "Symref tool objects must implement `semantic-symref-parse-tool-output-one-line'")) |
| 573 | 573 | ||
diff --git a/lisp/cedet/semantic/symref/cscope.el b/lisp/cedet/semantic/symref/cscope.el index 3e8c34b9832..91804f4ac9d 100644 --- a/lisp/cedet/semantic/symref/cscope.el +++ b/lisp/cedet/semantic/symref/cscope.el | |||
| @@ -42,7 +42,7 @@ the hit list. | |||
| 42 | 42 | ||
| 43 | See the function `cedet-cscope-search' for more details.") | 43 | See the function `cedet-cscope-search' for more details.") |
| 44 | 44 | ||
| 45 | (defmethod semantic-symref-perform-search ((tool semantic-symref-tool-cscope)) | 45 | (cl-defmethod semantic-symref-perform-search ((tool semantic-symref-tool-cscope)) |
| 46 | "Perform a search with GNU Global." | 46 | "Perform a search with GNU Global." |
| 47 | (let* ((rootproj (when (and (featurep 'ede) ede-minor-mode) | 47 | (let* ((rootproj (when (and (featurep 'ede) ede-minor-mode) |
| 48 | (ede-toplevel))) | 48 | (ede-toplevel))) |
| @@ -60,7 +60,7 @@ See the function `cedet-cscope-search' for more details.") | |||
| 60 | (semantic-symref-parse-tool-output tool b) | 60 | (semantic-symref-parse-tool-output tool b) |
| 61 | )) | 61 | )) |
| 62 | 62 | ||
| 63 | (defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref-tool-cscope)) | 63 | (cl-defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref-tool-cscope)) |
| 64 | "Parse one line of grep output, and return it as a match list. | 64 | "Parse one line of grep output, and return it as a match list. |
| 65 | Moves cursor to end of the match." | 65 | Moves cursor to end of the match." |
| 66 | (cond ((eq (oref tool :resulttype) 'file) | 66 | (cond ((eq (oref tool :resulttype) 'file) |
diff --git a/lisp/cedet/semantic/symref/global.el b/lisp/cedet/semantic/symref/global.el index 1f5aecb576c..88713474d69 100644 --- a/lisp/cedet/semantic/symref/global.el +++ b/lisp/cedet/semantic/symref/global.el | |||
| @@ -38,7 +38,7 @@ the hit list. | |||
| 38 | 38 | ||
| 39 | See the function `cedet-gnu-global-search' for more details.") | 39 | See the function `cedet-gnu-global-search' for more details.") |
| 40 | 40 | ||
| 41 | (defmethod semantic-symref-perform-search ((tool semantic-symref-tool-global)) | 41 | (cl-defmethod semantic-symref-perform-search ((tool semantic-symref-tool-global)) |
| 42 | "Perform a search with GNU Global." | 42 | "Perform a search with GNU Global." |
| 43 | (let ((b (cedet-gnu-global-search (oref tool :searchfor) | 43 | (let ((b (cedet-gnu-global-search (oref tool :searchfor) |
| 44 | (oref tool :searchtype) | 44 | (oref tool :searchtype) |
| @@ -49,7 +49,7 @@ See the function `cedet-gnu-global-search' for more details.") | |||
| 49 | (semantic-symref-parse-tool-output tool b) | 49 | (semantic-symref-parse-tool-output tool b) |
| 50 | )) | 50 | )) |
| 51 | 51 | ||
| 52 | (defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref-tool-global)) | 52 | (cl-defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref-tool-global)) |
| 53 | "Parse one line of grep output, and return it as a match list. | 53 | "Parse one line of grep output, and return it as a match list. |
| 54 | Moves cursor to end of the match." | 54 | Moves cursor to end of the match." |
| 55 | (cond ((or (eq (oref tool :resulttype) 'file) | 55 | (cond ((or (eq (oref tool :resulttype) 'file) |
diff --git a/lisp/cedet/semantic/symref/grep.el b/lisp/cedet/semantic/symref/grep.el index f9821b42988..981dab8a8b5 100644 --- a/lisp/cedet/semantic/symref/grep.el +++ b/lisp/cedet/semantic/symref/grep.el | |||
| @@ -121,7 +121,7 @@ This shell should support pipe redirect syntax." | |||
| 121 | :group 'semantic | 121 | :group 'semantic |
| 122 | :type 'string) | 122 | :type 'string) |
| 123 | 123 | ||
| 124 | (defmethod semantic-symref-perform-search ((tool semantic-symref-tool-grep)) | 124 | (cl-defmethod semantic-symref-perform-search ((tool semantic-symref-tool-grep)) |
| 125 | "Perform a search with Grep." | 125 | "Perform a search with Grep." |
| 126 | ;; Grep doesn't support some types of searches. | 126 | ;; Grep doesn't support some types of searches. |
| 127 | (let ((st (oref tool :searchtype))) | 127 | (let ((st (oref tool :searchtype))) |
| @@ -167,7 +167,7 @@ This shell should support pipe redirect syntax." | |||
| 167 | ;; Return the answer | 167 | ;; Return the answer |
| 168 | ans)) | 168 | ans)) |
| 169 | 169 | ||
| 170 | (defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref-tool-grep)) | 170 | (cl-defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref-tool-grep)) |
| 171 | "Parse one line of grep output, and return it as a match list. | 171 | "Parse one line of grep output, and return it as a match list. |
| 172 | Moves cursor to end of the match." | 172 | Moves cursor to end of the match." |
| 173 | (cond ((eq (oref tool :resulttype) 'file) | 173 | (cond ((eq (oref tool :resulttype) 'file) |
diff --git a/lisp/cedet/semantic/symref/idutils.el b/lisp/cedet/semantic/symref/idutils.el index 5e9a0a42bfc..c22a6a3b7fb 100644 --- a/lisp/cedet/semantic/symref/idutils.el +++ b/lisp/cedet/semantic/symref/idutils.el | |||
| @@ -38,7 +38,7 @@ the hit list. | |||
| 38 | 38 | ||
| 39 | See the function `cedet-idutils-search' for more details.") | 39 | See the function `cedet-idutils-search' for more details.") |
| 40 | 40 | ||
| 41 | (defmethod semantic-symref-perform-search ((tool semantic-symref-tool-idutils)) | 41 | (cl-defmethod semantic-symref-perform-search ((tool semantic-symref-tool-idutils)) |
| 42 | "Perform a search with IDUtils." | 42 | "Perform a search with IDUtils." |
| 43 | (let ((b (cedet-idutils-search (oref tool :searchfor) | 43 | (let ((b (cedet-idutils-search (oref tool :searchfor) |
| 44 | (oref tool :searchtype) | 44 | (oref tool :searchtype) |
| @@ -49,7 +49,7 @@ See the function `cedet-idutils-search' for more details.") | |||
| 49 | (semantic-symref-parse-tool-output tool b) | 49 | (semantic-symref-parse-tool-output tool b) |
| 50 | )) | 50 | )) |
| 51 | 51 | ||
| 52 | (defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref-tool-idutils)) | 52 | (cl-defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref-tool-idutils)) |
| 53 | "Parse one line of grep output, and return it as a match list. | 53 | "Parse one line of grep output, and return it as a match list. |
| 54 | Moves cursor to end of the match." | 54 | Moves cursor to end of the match." |
| 55 | (cond ((eq (oref tool :resulttype) 'file) | 55 | (cond ((eq (oref tool :resulttype) 'file) |
diff --git a/lisp/cedet/srecode/compile.el b/lisp/cedet/srecode/compile.el index 782121ef5b5..c93a6f72a9a 100644 --- a/lisp/cedet/srecode/compile.el +++ b/lisp/cedet/srecode/compile.el | |||
| @@ -34,6 +34,7 @@ | |||
| 34 | (eval-when-compile (require 'cl)) | 34 | (eval-when-compile (require 'cl)) |
| 35 | (require 'semantic) | 35 | (require 'semantic) |
| 36 | (require 'eieio) | 36 | (require 'eieio) |
| 37 | (require 'cl-generic) | ||
| 37 | (require 'eieio-base) | 38 | (require 'eieio-base) |
| 38 | (require 'srecode/table) | 39 | (require 'srecode/table) |
| 39 | (require 'srecode/dictionary) | 40 | (require 'srecode/dictionary) |
| @@ -115,7 +116,7 @@ additional static argument data.")) | |||
| 115 | Plain text strings are not handled via this baseclass." | 116 | Plain text strings are not handled via this baseclass." |
| 116 | :abstract t) | 117 | :abstract t) |
| 117 | 118 | ||
| 118 | (defmethod srecode-parse-input ((ins srecode-template-inserter) | 119 | (cl-defmethod srecode-parse-input ((ins srecode-template-inserter) |
| 119 | tag input STATE) | 120 | tag input STATE) |
| 120 | "For the template inserter INS, parse INPUT. | 121 | "For the template inserter INS, parse INPUT. |
| 121 | Shorten input only by the amount needed. | 122 | Shorten input only by the amount needed. |
| @@ -123,15 +124,15 @@ Return the remains of INPUT. | |||
| 123 | STATE is the current compilation state." | 124 | STATE is the current compilation state." |
| 124 | input) | 125 | input) |
| 125 | 126 | ||
| 126 | (defmethod srecode-match-end ((ins srecode-template-inserter) name) | 127 | (cl-defmethod srecode-match-end ((ins srecode-template-inserter) name) |
| 127 | "For the template inserter INS, do I end a section called NAME?" | 128 | "For the template inserter INS, do I end a section called NAME?" |
| 128 | nil) | 129 | nil) |
| 129 | 130 | ||
| 130 | (defmethod srecode-inserter-apply-state ((ins srecode-template-inserter) STATE) | 131 | (cl-defmethod srecode-inserter-apply-state ((ins srecode-template-inserter) STATE) |
| 131 | "For the template inserter INS, apply information from STATE." | 132 | "For the template inserter INS, apply information from STATE." |
| 132 | nil) | 133 | nil) |
| 133 | 134 | ||
| 134 | (defmethod srecode-inserter-prin-example :STATIC ((ins srecode-template-inserter) | 135 | (cl-defmethod srecode-inserter-prin-example ((ins (subclass srecode-template-inserter)) |
| 135 | escape-start escape-end) | 136 | escape-start escape-end) |
| 136 | "Insert an example using inserter INS. | 137 | "Insert an example using inserter INS. |
| 137 | Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." | 138 | Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." |
| @@ -158,7 +159,7 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." | |||
| 158 | ) | 159 | ) |
| 159 | "Current state of the compile.") | 160 | "Current state of the compile.") |
| 160 | 161 | ||
| 161 | (defmethod srecode-compile-add-prompt ((state srecode-compile-state) | 162 | (cl-defmethod srecode-compile-add-prompt ((state srecode-compile-state) |
| 162 | prompttag) | 163 | prompttag) |
| 163 | "Add PROMPTTAG to the current list of prompts." | 164 | "Add PROMPTTAG to the current list of prompts." |
| 164 | (with-slots (prompts) state | 165 | (with-slots (prompts) state |
| @@ -595,7 +596,7 @@ A list of defined variables VARS provides a variable table." | |||
| 595 | ;; Dump out information about the current srecoder compiled templates. | 596 | ;; Dump out information about the current srecoder compiled templates. |
| 596 | ;; | 597 | ;; |
| 597 | 598 | ||
| 598 | (defmethod srecode-dump ((tmp srecode-template)) | 599 | (cl-defmethod srecode-dump ((tmp srecode-template)) |
| 599 | "Dump the contents of the SRecode template tmp." | 600 | "Dump the contents of the SRecode template tmp." |
| 600 | (princ "== Template \"") | 601 | (princ "== Template \"") |
| 601 | (princ (eieio-object-name-string tmp)) | 602 | (princ (eieio-object-name-string tmp)) |
| @@ -641,7 +642,7 @@ Argument INDENT specifies the indentation level for the list." | |||
| 641 | (princ "\n")))) | 642 | (princ "\n")))) |
| 642 | ) | 643 | ) |
| 643 | 644 | ||
| 644 | (defmethod srecode-dump ((ins srecode-template-inserter) indent) | 645 | (cl-defmethod srecode-dump ((ins srecode-template-inserter) indent) |
| 645 | "Dump the state of the SRecode template inserter INS." | 646 | "Dump the state of the SRecode template inserter INS." |
| 646 | (princ "INS: \"") | 647 | (princ "INS: \"") |
| 647 | (princ (eieio-object-name-string ins)) | 648 | (princ (eieio-object-name-string ins)) |
diff --git a/lisp/cedet/srecode/dictionary.el b/lisp/cedet/srecode/dictionary.el index 9b471eb102d..97d3310a2ae 100644 --- a/lisp/cedet/srecode/dictionary.el +++ b/lisp/cedet/srecode/dictionary.el | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | 30 | ||
| 31 | (eval-when-compile (require 'cl)) | 31 | (eval-when-compile (require 'cl)) |
| 32 | (require 'eieio) | 32 | (require 'eieio) |
| 33 | (require 'cl-generic) | ||
| 33 | (require 'srecode) | 34 | (require 'srecode) |
| 34 | (require 'srecode/table) | 35 | (require 'srecode/table) |
| 35 | (eval-when-compile (require 'semantic)) | 36 | (eval-when-compile (require 'semantic)) |
| @@ -103,7 +104,7 @@ set NAME \"str\" macro \"OTHERNAME\" | |||
| 103 | 104 | ||
| 104 | with appending various parts together in a list.") | 105 | with appending various parts together in a list.") |
| 105 | 106 | ||
| 106 | (defmethod initialize-instance ((this srecode-dictionary-compound-variable) | 107 | (cl-defmethod initialize-instance ((this srecode-dictionary-compound-variable) |
| 107 | &optional fields) | 108 | &optional fields) |
| 108 | "Initialize the compound variable THIS. | 109 | "Initialize the compound variable THIS. |
| 109 | Makes sure that :value is compiled." | 110 | Makes sure that :value is compiled." |
| @@ -120,7 +121,7 @@ Makes sure that :value is compiled." | |||
| 120 | ;;(when (not state) | 121 | ;;(when (not state) |
| 121 | ;; (error "Cannot create compound variable outside of sectiondictionary")) | 122 | ;; (error "Cannot create compound variable outside of sectiondictionary")) |
| 122 | 123 | ||
| 123 | (call-next-method this (nreverse newfields)) | 124 | (cl-call-next-method this (nreverse newfields)) |
| 124 | (when (not (slot-boundp this 'compiled)) | 125 | (when (not (slot-boundp this 'compiled)) |
| 125 | (let ((val (oref this :value)) | 126 | (let ((val (oref this :value)) |
| 126 | (comp nil)) | 127 | (comp nil)) |
| @@ -215,7 +216,7 @@ associated with a buffer or parent." | |||
| 215 | )) | 216 | )) |
| 216 | dict)))) | 217 | dict)))) |
| 217 | 218 | ||
| 218 | (defmethod srecode-dictionary-add-template-table ((dict srecode-dictionary) | 219 | (cl-defmethod srecode-dictionary-add-template-table ((dict srecode-dictionary) |
| 219 | tpl) | 220 | tpl) |
| 220 | "Insert into DICT the variables found in table TPL. | 221 | "Insert into DICT the variables found in table TPL. |
| 221 | TPL is an object representing a compiled template file." | 222 | TPL is an object representing a compiled template file." |
| @@ -235,7 +236,7 @@ TPL is an object representing a compiled template file." | |||
| 235 | (setq tabs (cdr tabs)))))) | 236 | (setq tabs (cdr tabs)))))) |
| 236 | 237 | ||
| 237 | 238 | ||
| 238 | (defmethod srecode-dictionary-set-value ((dict srecode-dictionary) | 239 | (cl-defmethod srecode-dictionary-set-value ((dict srecode-dictionary) |
| 239 | name value) | 240 | name value) |
| 240 | "In dictionary DICT, set NAME to have VALUE." | 241 | "In dictionary DICT, set NAME to have VALUE." |
| 241 | ;; Validate inputs | 242 | ;; Validate inputs |
| @@ -247,7 +248,7 @@ TPL is an object representing a compiled template file." | |||
| 247 | (puthash name value namehash)) | 248 | (puthash name value namehash)) |
| 248 | ) | 249 | ) |
| 249 | 250 | ||
| 250 | (defmethod srecode-dictionary-add-section-dictionary ((dict srecode-dictionary) | 251 | (cl-defmethod srecode-dictionary-add-section-dictionary ((dict srecode-dictionary) |
| 251 | name &optional show-only force) | 252 | name &optional show-only force) |
| 252 | "In dictionary DICT, add a section dictionary for section macro NAME. | 253 | "In dictionary DICT, add a section dictionary for section macro NAME. |
| 253 | Return the new dictionary. | 254 | Return the new dictionary. |
| @@ -299,7 +300,7 @@ inserted dictionaries." | |||
| 299 | ;; Return the new sub-dictionary. | 300 | ;; Return the new sub-dictionary. |
| 300 | new)) | 301 | new)) |
| 301 | 302 | ||
| 302 | (defmethod srecode-dictionary-show-section ((dict srecode-dictionary) name) | 303 | (cl-defmethod srecode-dictionary-show-section ((dict srecode-dictionary) name) |
| 303 | "In dictionary DICT, indicate that the section NAME should be exposed." | 304 | "In dictionary DICT, indicate that the section NAME should be exposed." |
| 304 | ;; Validate inputs | 305 | ;; Validate inputs |
| 305 | (unless (stringp name) | 306 | (unless (stringp name) |
| @@ -310,7 +311,7 @@ inserted dictionaries." | |||
| 310 | (srecode-dictionary-add-section-dictionary dict name t) | 311 | (srecode-dictionary-add-section-dictionary dict name t) |
| 311 | nil) | 312 | nil) |
| 312 | 313 | ||
| 313 | (defmethod srecode-dictionary-hide-section ((dict srecode-dictionary) name) | 314 | (cl-defmethod srecode-dictionary-hide-section ((dict srecode-dictionary) name) |
| 314 | "In dictionary DICT, indicate that the section NAME should be hidden." | 315 | "In dictionary DICT, indicate that the section NAME should be hidden." |
| 315 | ;; We need to find the has value, and then delete it. | 316 | ;; We need to find the has value, and then delete it. |
| 316 | ;; Validate inputs | 317 | ;; Validate inputs |
| @@ -322,7 +323,7 @@ inserted dictionaries." | |||
| 322 | (remhash name namehash)) | 323 | (remhash name namehash)) |
| 323 | nil) | 324 | nil) |
| 324 | 325 | ||
| 325 | (defmethod srecode-dictionary-add-entries ((dict srecode-dictionary) | 326 | (cl-defmethod srecode-dictionary-add-entries ((dict srecode-dictionary) |
| 326 | entries &optional state) | 327 | entries &optional state) |
| 327 | "Add ENTRIES to DICT. | 328 | "Add ENTRIES to DICT. |
| 328 | 329 | ||
| @@ -373,7 +374,7 @@ values but STATE is nil." | |||
| 373 | (setq entries (nthcdr 2 entries))) | 374 | (setq entries (nthcdr 2 entries))) |
| 374 | dict) | 375 | dict) |
| 375 | 376 | ||
| 376 | (defmethod srecode-dictionary-merge ((dict srecode-dictionary) otherdict | 377 | (cl-defmethod srecode-dictionary-merge ((dict srecode-dictionary) otherdict |
| 377 | &optional force) | 378 | &optional force) |
| 378 | "Merge into DICT the dictionary entries from OTHERDICT. | 379 | "Merge into DICT the dictionary entries from OTHERDICT. |
| 379 | Unless the optional argument FORCE is non-nil, values in DICT are | 380 | Unless the optional argument FORCE is non-nil, values in DICT are |
| @@ -405,7 +406,7 @@ OTHERDICT." | |||
| 405 | (srecode-dictionary-set-value dict key entry))))) | 406 | (srecode-dictionary-set-value dict key entry))))) |
| 406 | (oref otherdict namehash)))) | 407 | (oref otherdict namehash)))) |
| 407 | 408 | ||
| 408 | (defmethod srecode-dictionary-lookup-name ((dict srecode-dictionary) | 409 | (cl-defmethod srecode-dictionary-lookup-name ((dict srecode-dictionary) |
| 409 | name &optional non-recursive) | 410 | name &optional non-recursive) |
| 410 | "Return information about DICT's value for NAME. | 411 | "Return information about DICT's value for NAME. |
| 411 | DICT is a dictionary, and NAME is a string that is treated as the | 412 | DICT is a dictionary, and NAME is a string that is treated as the |
| @@ -429,7 +430,7 @@ This function derives values for some special NAMEs, such as | |||
| 429 | (srecode-dictionary-lookup-name parent name))))) | 430 | (srecode-dictionary-lookup-name parent name))))) |
| 430 | ) | 431 | ) |
| 431 | 432 | ||
| 432 | (defmethod srecode-root-dictionary ((dict srecode-dictionary)) | 433 | (cl-defmethod srecode-root-dictionary ((dict srecode-dictionary)) |
| 433 | "For dictionary DICT, return the root dictionary. | 434 | "For dictionary DICT, return the root dictionary. |
| 434 | The root dictionary is usually for a current or active insertion." | 435 | The root dictionary is usually for a current or active insertion." |
| 435 | (let ((ans dict)) | 436 | (let ((ans dict)) |
| @@ -442,7 +443,7 @@ The root dictionary is usually for a current or active insertion." | |||
| 442 | ;; Compound values must provide at least the toString method | 443 | ;; Compound values must provide at least the toString method |
| 443 | ;; for use in converting the compound value into something insertable. | 444 | ;; for use in converting the compound value into something insertable. |
| 444 | 445 | ||
| 445 | (defmethod srecode-compound-toString ((cp srecode-dictionary-compound-value) | 446 | (cl-defmethod srecode-compound-toString ((cp srecode-dictionary-compound-value) |
| 446 | function | 447 | function |
| 447 | dictionary) | 448 | dictionary) |
| 448 | "Convert the compound dictionary value CP to a string. | 449 | "Convert the compound dictionary value CP to a string. |
| @@ -456,13 +457,13 @@ the value itself using `princ', or by detecting if the current | |||
| 456 | standard out is a buffer, and using `insert'." | 457 | standard out is a buffer, and using `insert'." |
| 457 | (eieio-object-name cp)) | 458 | (eieio-object-name cp)) |
| 458 | 459 | ||
| 459 | (defmethod srecode-dump ((cp srecode-dictionary-compound-value) | 460 | (cl-defmethod srecode-dump ((cp srecode-dictionary-compound-value) |
| 460 | &optional indent) | 461 | &optional indent) |
| 461 | "Display information about this compound value." | 462 | "Display information about this compound value." |
| 462 | (princ (eieio-object-name cp)) | 463 | (princ (eieio-object-name cp)) |
| 463 | ) | 464 | ) |
| 464 | 465 | ||
| 465 | (defmethod srecode-compound-toString ((cp srecode-dictionary-compound-variable) | 466 | (cl-defmethod srecode-compound-toString ((cp srecode-dictionary-compound-variable) |
| 466 | function | 467 | function |
| 467 | dictionary) | 468 | dictionary) |
| 468 | "Convert the compound dictionary variable value CP into a string. | 469 | "Convert the compound dictionary variable value CP into a string. |
| @@ -471,7 +472,7 @@ FUNCTION and DICTIONARY are as for the baseclass." | |||
| 471 | (srecode-insert-code-stream (oref cp compiled) dictionary)) | 472 | (srecode-insert-code-stream (oref cp compiled) dictionary)) |
| 472 | 473 | ||
| 473 | 474 | ||
| 474 | (defmethod srecode-dump ((cp srecode-dictionary-compound-variable) | 475 | (cl-defmethod srecode-dump ((cp srecode-dictionary-compound-variable) |
| 475 | &optional indent) | 476 | &optional indent) |
| 476 | "Display information about this compound value." | 477 | "Display information about this compound value." |
| 477 | (require 'srecode/compile) | 478 | (require 'srecode/compile) |
| @@ -501,7 +502,7 @@ Compound values allow a field to be stored in the dictionary for when | |||
| 501 | it is referenced a second time. This compound value can then be | 502 | it is referenced a second time. This compound value can then be |
| 502 | inserted with a new editable field.") | 503 | inserted with a new editable field.") |
| 503 | 504 | ||
| 504 | (defmethod srecode-compound-toString((cp srecode-field-value) | 505 | (cl-defmethod srecode-compound-toString((cp srecode-field-value) |
| 505 | function | 506 | function |
| 506 | dictionary) | 507 | dictionary) |
| 507 | "Convert this field into an insertable string." | 508 | "Convert this field into an insertable string." |
| @@ -639,7 +640,7 @@ STATE is the current compiler state." | |||
| 639 | (srecode-dump dict)) | 640 | (srecode-dump dict)) |
| 640 | )))) | 641 | )))) |
| 641 | 642 | ||
| 642 | (defmethod srecode-dump ((dict srecode-dictionary) &optional indent) | 643 | (cl-defmethod srecode-dump ((dict srecode-dictionary) &optional indent) |
| 643 | "Dump a dictionary." | 644 | "Dump a dictionary." |
| 644 | (if (not indent) (setq indent 0)) | 645 | (if (not indent) (setq indent 0)) |
| 645 | (maphash (lambda (key entry) | 646 | (maphash (lambda (key entry) |
diff --git a/lisp/cedet/srecode/extract.el b/lisp/cedet/srecode/extract.el index c3b1f6e6da1..027ae0c25dd 100644 --- a/lisp/cedet/srecode/extract.el +++ b/lisp/cedet/srecode/extract.el | |||
| @@ -55,16 +55,16 @@ | |||
| 55 | ) | 55 | ) |
| 56 | "The current extraction state.") | 56 | "The current extraction state.") |
| 57 | 57 | ||
| 58 | (defmethod srecode-extract-state-set ((st srecode-extract-state) ins dict) | 58 | (cl-defmethod srecode-extract-state-set ((st srecode-extract-state) ins dict) |
| 59 | "Set onto the extract state ST a new inserter INS and dictionary DICT." | 59 | "Set onto the extract state ST a new inserter INS and dictionary DICT." |
| 60 | (oset st lastinserter ins) | 60 | (oset st lastinserter ins) |
| 61 | (oset st lastdict dict)) | 61 | (oset st lastdict dict)) |
| 62 | 62 | ||
| 63 | (defmethod srecode-extract-state-set-anchor ((st srecode-extract-state)) | 63 | (cl-defmethod srecode-extract-state-set-anchor ((st srecode-extract-state)) |
| 64 | "Reset the anchor point on extract state ST." | 64 | "Reset the anchor point on extract state ST." |
| 65 | (oset st anchor (point))) | 65 | (oset st anchor (point))) |
| 66 | 66 | ||
| 67 | (defmethod srecode-extract-state-extract ((st srecode-extract-state) | 67 | (cl-defmethod srecode-extract-state-extract ((st srecode-extract-state) |
| 68 | endpoint) | 68 | endpoint) |
| 69 | "Perform an extraction on the extract state ST with ENDPOINT. | 69 | "Perform an extraction on the extract state ST with ENDPOINT. |
| 70 | If there was no waiting inserter, do nothing." | 70 | If there was no waiting inserter, do nothing." |
| @@ -94,7 +94,7 @@ the dictionary entries were for that block of text." | |||
| 94 | (srecode-extract-method template dict state) | 94 | (srecode-extract-method template dict state) |
| 95 | dict)))) | 95 | dict)))) |
| 96 | 96 | ||
| 97 | (defmethod srecode-extract-method ((st srecode-template) dictionary | 97 | (cl-defmethod srecode-extract-method ((st srecode-template) dictionary |
| 98 | state) | 98 | state) |
| 99 | "Extract template ST and store extracted text in DICTIONARY. | 99 | "Extract template ST and store extracted text in DICTIONARY. |
| 100 | Optional STARTRETURN is a symbol in which the start of the first | 100 | Optional STARTRETURN is a symbol in which the start of the first |
| @@ -139,11 +139,11 @@ Uses STATE to maintain the current extraction state." | |||
| 139 | 139 | ||
| 140 | ;;; Inserter Base Extractors | 140 | ;;; Inserter Base Extractors |
| 141 | ;; | 141 | ;; |
| 142 | (defmethod srecode-inserter-do-extract-p ((ins srecode-template-inserter)) | 142 | (cl-defmethod srecode-inserter-do-extract-p ((ins srecode-template-inserter)) |
| 143 | "Return non-nil if this inserter can extract values." | 143 | "Return non-nil if this inserter can extract values." |
| 144 | nil) | 144 | nil) |
| 145 | 145 | ||
| 146 | (defmethod srecode-inserter-extract ((ins srecode-template-inserter) | 146 | (cl-defmethod srecode-inserter-extract ((ins srecode-template-inserter) |
| 147 | start end dict state) | 147 | start end dict state) |
| 148 | "Extract text from START/END and store in DICT. | 148 | "Extract text from START/END and store in DICT. |
| 149 | Return nil as this inserter will extract nothing." | 149 | Return nil as this inserter will extract nothing." |
| @@ -151,11 +151,11 @@ Return nil as this inserter will extract nothing." | |||
| 151 | 151 | ||
| 152 | ;;; Variable extractor is simple and can extract later. | 152 | ;;; Variable extractor is simple and can extract later. |
| 153 | ;; | 153 | ;; |
| 154 | (defmethod srecode-inserter-do-extract-p ((ins srecode-template-inserter-variable)) | 154 | (cl-defmethod srecode-inserter-do-extract-p ((ins srecode-template-inserter-variable)) |
| 155 | "Return non-nil if this inserter can extract values." | 155 | "Return non-nil if this inserter can extract values." |
| 156 | 'later) | 156 | 'later) |
| 157 | 157 | ||
| 158 | (defmethod srecode-inserter-extract ((ins srecode-template-inserter-variable) | 158 | (cl-defmethod srecode-inserter-extract ((ins srecode-template-inserter-variable) |
| 159 | start end vdict state) | 159 | start end vdict state) |
| 160 | "Extract text from START/END and store in VDICT. | 160 | "Extract text from START/END and store in VDICT. |
| 161 | Return t if something was extracted. | 161 | Return t if something was extracted. |
| @@ -169,11 +169,11 @@ Return nil if this inserter doesn't need to extract anything." | |||
| 169 | 169 | ||
| 170 | ;;; Section Inserter | 170 | ;;; Section Inserter |
| 171 | ;; | 171 | ;; |
| 172 | (defmethod srecode-inserter-do-extract-p ((ins srecode-template-inserter-section-start)) | 172 | (cl-defmethod srecode-inserter-do-extract-p ((ins srecode-template-inserter-section-start)) |
| 173 | "Return non-nil if this inserter can extract values." | 173 | "Return non-nil if this inserter can extract values." |
| 174 | 'now) | 174 | 'now) |
| 175 | 175 | ||
| 176 | (defmethod srecode-inserter-extract ((ins srecode-template-inserter-section-start) | 176 | (cl-defmethod srecode-inserter-extract ((ins srecode-template-inserter-section-start) |
| 177 | start end indict state) | 177 | start end indict state) |
| 178 | "Extract text from START/END and store in INDICT. | 178 | "Extract text from START/END and store in INDICT. |
| 179 | Return the starting location of the first plain-text match. | 179 | Return the starting location of the first plain-text match. |
| @@ -203,11 +203,11 @@ Return nil if nothing was extracted." | |||
| 203 | 203 | ||
| 204 | ;;; Include Extractor must extract now. | 204 | ;;; Include Extractor must extract now. |
| 205 | ;; | 205 | ;; |
| 206 | (defmethod srecode-inserter-do-extract-p ((ins srecode-template-inserter-include)) | 206 | (cl-defmethod srecode-inserter-do-extract-p ((ins srecode-template-inserter-include)) |
| 207 | "Return non-nil if this inserter can extract values." | 207 | "Return non-nil if this inserter can extract values." |
| 208 | 'now) | 208 | 'now) |
| 209 | 209 | ||
| 210 | (defmethod srecode-inserter-extract ((ins srecode-template-inserter-include) | 210 | (cl-defmethod srecode-inserter-extract ((ins srecode-template-inserter-include) |
| 211 | start end dict state) | 211 | start end dict state) |
| 212 | "Extract text from START/END and store in DICT. | 212 | "Extract text from START/END and store in DICT. |
| 213 | Return the starting location of the first plain-text match. | 213 | Return the starting location of the first plain-text match. |
diff --git a/lisp/cedet/srecode/fields.el b/lisp/cedet/srecode/fields.el index f473a0d8261..dd38b65d7bf 100644 --- a/lisp/cedet/srecode/fields.el +++ b/lisp/cedet/srecode/fields.el | |||
| @@ -39,6 +39,7 @@ | |||
| 39 | 39 | ||
| 40 | ;; Keep this library independent of SRecode proper. | 40 | ;; Keep this library independent of SRecode proper. |
| 41 | (require 'eieio) | 41 | (require 'eieio) |
| 42 | (require 'cl-generic) | ||
| 42 | 43 | ||
| 43 | ;;; Code: | 44 | ;;; Code: |
| 44 | (defvar srecode-field-archive nil | 45 | (defvar srecode-field-archive nil |
| @@ -74,7 +75,7 @@ The overlay will crossreference this object.") | |||
| 74 | "An object that gets automatically bound to an overlay. | 75 | "An object that gets automatically bound to an overlay. |
| 75 | Has virtual :start and :end initializers.") | 76 | Has virtual :start and :end initializers.") |
| 76 | 77 | ||
| 77 | (defmethod initialize-instance ((olaid srecode-overlaid) &optional args) | 78 | (cl-defmethod initialize-instance ((olaid srecode-overlaid) &optional args) |
| 78 | "Initialize OLAID, being sure it archived." | 79 | "Initialize OLAID, being sure it archived." |
| 79 | ;; Extract :start and :end from the olaid list. | 80 | ;; Extract :start and :end from the olaid list. |
| 80 | (let ((newargs nil) | 81 | (let ((newargs nil) |
| @@ -107,11 +108,11 @@ Has virtual :start and :end initializers.") | |||
| 107 | (overlay-put olay 'srecode-init-only t) | 108 | (overlay-put olay 'srecode-init-only t) |
| 108 | 109 | ||
| 109 | (oset olaid overlay olay) | 110 | (oset olaid overlay olay) |
| 110 | (call-next-method olaid (nreverse newargs)) | 111 | (cl-call-next-method olaid (nreverse newargs)) |
| 111 | 112 | ||
| 112 | )) | 113 | )) |
| 113 | 114 | ||
| 114 | (defmethod srecode-overlaid-activate ((olaid srecode-overlaid)) | 115 | (cl-defmethod srecode-overlaid-activate ((olaid srecode-overlaid)) |
| 115 | "Activate the overlaid area." | 116 | "Activate the overlaid area." |
| 116 | (let* ((ola (oref olaid overlay)) | 117 | (let* ((ola (oref olaid overlay)) |
| 117 | (start (overlay-start ola)) | 118 | (start (overlay-start ola)) |
| @@ -128,23 +129,23 @@ Has virtual :start and :end initializers.") | |||
| 128 | 129 | ||
| 129 | )) | 130 | )) |
| 130 | 131 | ||
| 131 | (defmethod srecode-delete ((olaid srecode-overlaid)) | 132 | (cl-defmethod srecode-delete ((olaid srecode-overlaid)) |
| 132 | "Delete the overlay from OLAID." | 133 | "Delete the overlay from OLAID." |
| 133 | (delete-overlay (oref olaid overlay)) | 134 | (delete-overlay (oref olaid overlay)) |
| 134 | (slot-makeunbound olaid 'overlay) | 135 | (slot-makeunbound olaid 'overlay) |
| 135 | ) | 136 | ) |
| 136 | 137 | ||
| 137 | (defmethod srecode-empty-region-p ((olaid srecode-overlaid)) | 138 | (cl-defmethod srecode-empty-region-p ((olaid srecode-overlaid)) |
| 138 | "Return non-nil if the region covered by OLAID is of length 0." | 139 | "Return non-nil if the region covered by OLAID is of length 0." |
| 139 | (= 0 (srecode-region-size olaid))) | 140 | (= 0 (srecode-region-size olaid))) |
| 140 | 141 | ||
| 141 | (defmethod srecode-region-size ((olaid srecode-overlaid)) | 142 | (cl-defmethod srecode-region-size ((olaid srecode-overlaid)) |
| 142 | "Return the length of region covered by OLAID." | 143 | "Return the length of region covered by OLAID." |
| 143 | (let ((start (overlay-start (oref olaid overlay))) | 144 | (let ((start (overlay-start (oref olaid overlay))) |
| 144 | (end (overlay-end (oref olaid overlay)))) | 145 | (end (overlay-end (oref olaid overlay)))) |
| 145 | (- end start))) | 146 | (- end start))) |
| 146 | 147 | ||
| 147 | (defmethod srecode-point-in-region-p ((olaid srecode-overlaid)) | 148 | (cl-defmethod srecode-point-in-region-p ((olaid srecode-overlaid)) |
| 148 | "Return non-nil if point is in the region of OLAID." | 149 | "Return non-nil if point is in the region of OLAID." |
| 149 | (let ((start (overlay-start (oref olaid overlay))) | 150 | (let ((start (overlay-start (oref olaid overlay))) |
| 150 | (end (overlay-end (oref olaid overlay)))) | 151 | (end (overlay-end (oref olaid overlay)))) |
| @@ -161,7 +162,7 @@ Has virtual :start and :end initializers.") | |||
| 161 | (setq ol (cdr ol))) | 162 | (setq ol (cdr ol))) |
| 162 | (car (nreverse ret)))) | 163 | (car (nreverse ret)))) |
| 163 | 164 | ||
| 164 | (defmethod srecode-overlaid-text ((olaid srecode-overlaid) &optional set-to) | 165 | (cl-defmethod srecode-overlaid-text ((olaid srecode-overlaid) &optional set-to) |
| 165 | "Return the text under OLAID. | 166 | "Return the text under OLAID. |
| 166 | If SET-TO is a string, then replace the text of OLAID wit SET-TO." | 167 | If SET-TO is a string, then replace the text of OLAID wit SET-TO." |
| 167 | (let* ((ol (oref olaid overlay)) | 168 | (let* ((ol (oref olaid overlay)) |
| @@ -191,7 +192,7 @@ If SET-TO is a string, then replace the text of OLAID wit SET-TO." | |||
| 191 | ) | 192 | ) |
| 192 | "Manage a buffer region in which fields exist.") | 193 | "Manage a buffer region in which fields exist.") |
| 193 | 194 | ||
| 194 | (defmethod initialize-instance ((ir srecode-template-inserted-region) | 195 | (cl-defmethod initialize-instance ((ir srecode-template-inserted-region) |
| 195 | &rest args) | 196 | &rest args) |
| 196 | "Initialize IR, capturing the active fields, and creating the overlay." | 197 | "Initialize IR, capturing the active fields, and creating the overlay." |
| 197 | ;; Fill in the fields | 198 | ;; Fill in the fields |
| @@ -199,10 +200,10 @@ If SET-TO is a string, then replace the text of OLAID wit SET-TO." | |||
| 199 | (setq srecode-field-archive nil) | 200 | (setq srecode-field-archive nil) |
| 200 | 201 | ||
| 201 | ;; Initialize myself first. | 202 | ;; Initialize myself first. |
| 202 | (call-next-method) | 203 | (cl-call-next-method) |
| 203 | ) | 204 | ) |
| 204 | 205 | ||
| 205 | (defmethod srecode-overlaid-activate ((ir srecode-template-inserted-region)) | 206 | (cl-defmethod srecode-overlaid-activate ((ir srecode-template-inserted-region)) |
| 206 | "Activate the template area for IR." | 207 | "Activate the template area for IR." |
| 207 | ;; Activate all our fields | 208 | ;; Activate all our fields |
| 208 | 209 | ||
| @@ -210,7 +211,7 @@ If SET-TO is a string, then replace the text of OLAID wit SET-TO." | |||
| 210 | (srecode-overlaid-activate F)) | 211 | (srecode-overlaid-activate F)) |
| 211 | 212 | ||
| 212 | ;; Activate our overlay. | 213 | ;; Activate our overlay. |
| 213 | (call-next-method) | 214 | (cl-call-next-method) |
| 214 | 215 | ||
| 215 | ;; Position the cursor at the first field | 216 | ;; Position the cursor at the first field |
| 216 | (let ((first (car (oref ir fields)))) | 217 | (let ((first (car (oref ir fields)))) |
| @@ -223,14 +224,14 @@ If SET-TO is a string, then replace the text of OLAID wit SET-TO." | |||
| 223 | (add-hook 'post-command-hook 'srecode-field-post-command t t) | 224 | (add-hook 'post-command-hook 'srecode-field-post-command t t) |
| 224 | ) | 225 | ) |
| 225 | 226 | ||
| 226 | (defmethod srecode-delete ((ir srecode-template-inserted-region)) | 227 | (cl-defmethod srecode-delete ((ir srecode-template-inserted-region)) |
| 227 | "Call into our base, but also clear out the fields." | 228 | "Call into our base, but also clear out the fields." |
| 228 | ;; Clear us out of the baseclass. | 229 | ;; Clear us out of the baseclass. |
| 229 | (oset ir active-region nil) | 230 | (oset ir active-region nil) |
| 230 | ;; Clear our fields. | 231 | ;; Clear our fields. |
| 231 | (mapc 'srecode-delete (oref ir fields)) | 232 | (mapc 'srecode-delete (oref ir fields)) |
| 232 | ;; Call to our base | 233 | ;; Call to our base |
| 233 | (call-next-method) | 234 | (cl-call-next-method) |
| 234 | ;; Clear our hook. | 235 | ;; Clear our hook. |
| 235 | (remove-hook 'post-command-hook 'srecode-field-post-command t) | 236 | (remove-hook 'post-command-hook 'srecode-field-post-command t) |
| 236 | ) | 237 | ) |
| @@ -285,15 +286,15 @@ Try to use this to provide useful completion when available.") | |||
| 285 | km) | 286 | km) |
| 286 | "Keymap applied to field overlays.") | 287 | "Keymap applied to field overlays.") |
| 287 | 288 | ||
| 288 | (defmethod initialize-instance ((field srecode-field) &optional args) | 289 | (cl-defmethod initialize-instance ((field srecode-field) &optional args) |
| 289 | "Initialize FIELD, being sure it archived." | 290 | "Initialize FIELD, being sure it archived." |
| 290 | (add-to-list 'srecode-field-archive field t) | 291 | (add-to-list 'srecode-field-archive field t) |
| 291 | (call-next-method) | 292 | (cl-call-next-method) |
| 292 | ) | 293 | ) |
| 293 | 294 | ||
| 294 | (defmethod srecode-overlaid-activate ((field srecode-field)) | 295 | (cl-defmethod srecode-overlaid-activate ((field srecode-field)) |
| 295 | "Activate the FIELD area." | 296 | "Activate the FIELD area." |
| 296 | (call-next-method) | 297 | (cl-call-next-method) |
| 297 | 298 | ||
| 298 | (let* ((ol (oref field overlay)) | 299 | (let* ((ol (oref field overlay)) |
| 299 | (end nil) | 300 | (end nil) |
| @@ -314,13 +315,13 @@ Try to use this to provide useful completion when available.") | |||
| 314 | ) | 315 | ) |
| 315 | ) | 316 | ) |
| 316 | 317 | ||
| 317 | (defmethod srecode-delete ((olaid srecode-field)) | 318 | (cl-defmethod srecode-delete ((olaid srecode-field)) |
| 318 | "Delete our secondary overlay." | 319 | "Delete our secondary overlay." |
| 319 | ;; Remove our spare overlay | 320 | ;; Remove our spare overlay |
| 320 | (delete-overlay (oref olaid tail)) | 321 | (delete-overlay (oref olaid tail)) |
| 321 | (slot-makeunbound olaid 'tail) | 322 | (slot-makeunbound olaid 'tail) |
| 322 | ;; Do our baseclass work. | 323 | ;; Do our baseclass work. |
| 323 | (call-next-method) | 324 | (cl-call-next-method) |
| 324 | ) | 325 | ) |
| 325 | 326 | ||
| 326 | (defvar srecode-field-replication-max-size 100 | 327 | (defvar srecode-field-replication-max-size 100 |
| @@ -379,7 +380,7 @@ PRE-LEN is used in the after mode for the length of the changed text." | |||
| 379 | (srecode-field-mod-hook ol after start end pre-len)) | 380 | (srecode-field-mod-hook ol after start end pre-len)) |
| 380 | )) | 381 | )) |
| 381 | 382 | ||
| 382 | (defmethod srecode-field-goto ((field srecode-field)) | 383 | (cl-defmethod srecode-field-goto ((field srecode-field)) |
| 383 | "Goto the FIELD." | 384 | "Goto the FIELD." |
| 384 | (goto-char (overlay-start (oref field overlay)))) | 385 | (goto-char (overlay-start (oref field overlay)))) |
| 385 | 386 | ||
diff --git a/lisp/cedet/srecode/find.el b/lisp/cedet/srecode/find.el index fc1b79dfd52..092f739df7d 100644 --- a/lisp/cedet/srecode/find.el +++ b/lisp/cedet/srecode/find.el | |||
| @@ -96,7 +96,7 @@ all template files for that application will be loaded." | |||
| 96 | ;; | 96 | ;; |
| 97 | ;; Find if a template table has a project set, and if so, is the | 97 | ;; Find if a template table has a project set, and if so, is the |
| 98 | ;; current buffer in that project. | 98 | ;; current buffer in that project. |
| 99 | (defmethod srecode-template-table-in-project-p ((tab srecode-template-table)) | 99 | (cl-defmethod srecode-template-table-in-project-p ((tab srecode-template-table)) |
| 100 | "Return non-nil if the table TAB can be used in the current project. | 100 | "Return non-nil if the table TAB can be used in the current project. |
| 101 | If TAB has a :project set, check that the directories match. | 101 | If TAB has a :project set, check that the directories match. |
| 102 | If TAB is nil, then always return t." | 102 | If TAB is nil, then always return t." |
| @@ -113,7 +113,7 @@ If TAB is nil, then always return t." | |||
| 113 | ;; | 113 | ;; |
| 114 | ;; Find a given template based on name, and features of the current | 114 | ;; Find a given template based on name, and features of the current |
| 115 | ;; buffer. | 115 | ;; buffer. |
| 116 | (defmethod srecode-template-get-table ((tab srecode-template-table) | 116 | (cl-defmethod srecode-template-get-table ((tab srecode-template-table) |
| 117 | template-name &optional | 117 | template-name &optional |
| 118 | context application) | 118 | context application) |
| 119 | "Find in the template in table TAB, the template with TEMPLATE-NAME. | 119 | "Find in the template in table TAB, the template with TEMPLATE-NAME. |
| @@ -129,7 +129,7 @@ The APPLICATION argument is unused." | |||
| 129 | ;; No context, perhaps a merged name? | 129 | ;; No context, perhaps a merged name? |
| 130 | (gethash template-name (oref tab namehash))))) | 130 | (gethash template-name (oref tab namehash))))) |
| 131 | 131 | ||
| 132 | (defmethod srecode-template-get-table ((tab srecode-mode-table) | 132 | (cl-defmethod srecode-template-get-table ((tab srecode-mode-table) |
| 133 | template-name &optional | 133 | template-name &optional |
| 134 | context application) | 134 | context application) |
| 135 | "Find in the template in mode table TAB, the template with TEMPLATE-NAME. | 135 | "Find in the template in mode table TAB, the template with TEMPLATE-NAME. |
| @@ -157,7 +157,7 @@ tables that do not belong to an application will be searched." | |||
| 157 | ;; | 157 | ;; |
| 158 | ;; Find a given template based on a key binding. | 158 | ;; Find a given template based on a key binding. |
| 159 | ;; | 159 | ;; |
| 160 | (defmethod srecode-template-get-table-for-binding | 160 | (cl-defmethod srecode-template-get-table-for-binding |
| 161 | ((tab srecode-template-table) binding &optional context) | 161 | ((tab srecode-template-table) binding &optional context) |
| 162 | "Find in the template name in table TAB, the template with BINDING. | 162 | "Find in the template name in table TAB, the template with BINDING. |
| 163 | Optional argument CONTEXT specifies that the template should part | 163 | Optional argument CONTEXT specifies that the template should part |
| @@ -190,7 +190,7 @@ of a particular context." | |||
| 190 | (maphash hashfcn (oref tab namehash))) | 190 | (maphash hashfcn (oref tab namehash))) |
| 191 | keyout))) | 191 | keyout))) |
| 192 | 192 | ||
| 193 | (defmethod srecode-template-get-table-for-binding | 193 | (cl-defmethod srecode-template-get-table-for-binding |
| 194 | ((tab srecode-mode-table) binding &optional context application) | 194 | ((tab srecode-mode-table) binding &optional context application) |
| 195 | "Find in the template name in mode table TAB, the template with BINDING. | 195 | "Find in the template name in mode table TAB, the template with BINDING. |
| 196 | Optional argument CONTEXT specifies a context a particular template | 196 | Optional argument CONTEXT specifies a context a particular template |
diff --git a/lisp/cedet/srecode/insert.el b/lisp/cedet/srecode/insert.el index 78ec1658859..0c13ee51e34 100644 --- a/lisp/cedet/srecode/insert.el +++ b/lisp/cedet/srecode/insert.el | |||
| @@ -260,20 +260,20 @@ Optional argument TEMP is the template that is getting its arguments resolved." | |||
| 260 | ;; Code managing the top-level insert method and the current | 260 | ;; Code managing the top-level insert method and the current |
| 261 | ;; insertion stack. | 261 | ;; insertion stack. |
| 262 | ;; | 262 | ;; |
| 263 | (defmethod srecode-push ((st srecode-template)) | 263 | (cl-defmethod srecode-push ((st srecode-template)) |
| 264 | "Push the srecoder template ST onto the active stack." | 264 | "Push the srecoder template ST onto the active stack." |
| 265 | (oset st active (cons st (oref st active)))) | 265 | (oset st active (cons st (oref st active)))) |
| 266 | 266 | ||
| 267 | (defmethod srecode-pop :STATIC ((st srecode-template)) | 267 | (cl-defmethod srecode-pop ((st (subclass srecode-template))) |
| 268 | "Pop the srecoder template ST onto the active stack. | 268 | "Pop the srecoder template ST onto the active stack. |
| 269 | ST can be a class, or an object." | 269 | ST can be a class, or an object." |
| 270 | (oset st active (cdr (oref st active)))) | 270 | (oset st active (cdr (oref st active)))) |
| 271 | 271 | ||
| 272 | (defmethod srecode-peek :STATIC ((st srecode-template)) | 272 | (cl-defmethod srecode-peek ((st (subclass srecode-template))) |
| 273 | "Fetch the topmost active template record. ST can be a class." | 273 | "Fetch the topmost active template record. ST can be a class." |
| 274 | (car (oref st active))) | 274 | (car (oref st active))) |
| 275 | 275 | ||
| 276 | (defmethod srecode-insert-method ((st srecode-template) dictionary) | 276 | (cl-defmethod srecode-insert-method ((st srecode-template) dictionary) |
| 277 | "Insert the srecoder template ST." | 277 | "Insert the srecoder template ST." |
| 278 | ;; Merge any template entries into the input dictionary. | 278 | ;; Merge any template entries into the input dictionary. |
| 279 | ;; This may happen twice since some templates arguments need | 279 | ;; This may happen twice since some templates arguments need |
| @@ -324,7 +324,7 @@ by themselves.") | |||
| 324 | Specify the :indent argument to enable automatic indentation when newlines | 324 | Specify the :indent argument to enable automatic indentation when newlines |
| 325 | occur in your template.") | 325 | occur in your template.") |
| 326 | 326 | ||
| 327 | (defmethod srecode-insert-method ((sti srecode-template-inserter-newline) | 327 | (cl-defmethod srecode-insert-method ((sti srecode-template-inserter-newline) |
| 328 | dictionary) | 328 | dictionary) |
| 329 | "Insert the STI inserter." | 329 | "Insert the STI inserter." |
| 330 | ;; To be safe, indent the previous line since the template will | 330 | ;; To be safe, indent the previous line since the template will |
| @@ -363,9 +363,9 @@ occur in your template.") | |||
| 363 | ((stringp i) | 363 | ((stringp i) |
| 364 | (princ i)))))) | 364 | (princ i)))))) |
| 365 | 365 | ||
| 366 | (defmethod srecode-dump ((ins srecode-template-inserter-newline) indent) | 366 | (cl-defmethod srecode-dump ((ins srecode-template-inserter-newline) indent) |
| 367 | "Dump the state of the SRecode template inserter INS." | 367 | "Dump the state of the SRecode template inserter INS." |
| 368 | (call-next-method) | 368 | (cl-call-next-method) |
| 369 | (when (oref ins hard) | 369 | (when (oref ins hard) |
| 370 | (princ " : hard") | 370 | (princ " : hard") |
| 371 | )) | 371 | )) |
| @@ -388,7 +388,7 @@ When set to 'end it will insert a CR if we are not at 'eol'.") | |||
| 388 | "Insert a newline before and after a template, and possibly do indenting. | 388 | "Insert a newline before and after a template, and possibly do indenting. |
| 389 | Specify the :blank argument to enable this inserter.") | 389 | Specify the :blank argument to enable this inserter.") |
| 390 | 390 | ||
| 391 | (defmethod srecode-insert-method ((sti srecode-template-inserter-blank) | 391 | (cl-defmethod srecode-insert-method ((sti srecode-template-inserter-blank) |
| 392 | dictionary) | 392 | dictionary) |
| 393 | "Make sure there is no text before or after point." | 393 | "Make sure there is no text before or after point." |
| 394 | (let ((i (srecode-dictionary-lookup-name dictionary "INDENT")) | 394 | (let ((i (srecode-dictionary-lookup-name dictionary "INDENT")) |
| @@ -425,7 +425,7 @@ Specify the :blank argument to enable this inserter.") | |||
| 425 | ) | 425 | ) |
| 426 | "Allow comments within template coding. This inserts nothing.") | 426 | "Allow comments within template coding. This inserts nothing.") |
| 427 | 427 | ||
| 428 | (defmethod srecode-inserter-prin-example :STATIC ((ins srecode-template-inserter-comment) | 428 | (cl-defmethod srecode-inserter-prin-example ((ins (subclass srecode-template-inserter-comment)) |
| 429 | escape-start escape-end) | 429 | escape-start escape-end) |
| 430 | "Insert an example using inserter INS. | 430 | "Insert an example using inserter INS. |
| 431 | Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." | 431 | Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." |
| @@ -436,7 +436,7 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." | |||
| 436 | (terpri) | 436 | (terpri) |
| 437 | ) | 437 | ) |
| 438 | 438 | ||
| 439 | (defmethod srecode-insert-method ((sti srecode-template-inserter-comment) | 439 | (cl-defmethod srecode-insert-method ((sti srecode-template-inserter-comment) |
| 440 | dictionary) | 440 | dictionary) |
| 441 | "Don't insert anything for comment macros in STI." | 441 | "Don't insert anything for comment macros in STI." |
| 442 | nil) | 442 | nil) |
| @@ -453,7 +453,7 @@ If there is no entry, insert nothing.") | |||
| 453 | (defvar srecode-inserter-variable-current-dictionary nil | 453 | (defvar srecode-inserter-variable-current-dictionary nil |
| 454 | "The active dictionary when calling a variable filter.") | 454 | "The active dictionary when calling a variable filter.") |
| 455 | 455 | ||
| 456 | (defmethod srecode-insert-variable-secondname-handler | 456 | (cl-defmethod srecode-insert-variable-secondname-handler |
| 457 | ((sti srecode-template-inserter-variable) dictionary value secondname) | 457 | ((sti srecode-template-inserter-variable) dictionary value secondname) |
| 458 | "For VALUE handle SECONDNAME behaviors for this variable inserter. | 458 | "For VALUE handle SECONDNAME behaviors for this variable inserter. |
| 459 | Return the result as a string. | 459 | Return the result as a string. |
| @@ -471,7 +471,7 @@ If SECONDNAME is nil, return VALUE." | |||
| 471 | (object-print sti) secondname))) | 471 | (object-print sti) secondname))) |
| 472 | value)) | 472 | value)) |
| 473 | 473 | ||
| 474 | (defmethod srecode-insert-method ((sti srecode-template-inserter-variable) | 474 | (cl-defmethod srecode-insert-method ((sti srecode-template-inserter-variable) |
| 475 | dictionary) | 475 | dictionary) |
| 476 | "Insert the STI inserter." | 476 | "Insert the STI inserter." |
| 477 | ;; Convert the name into a name/fcn pair | 477 | ;; Convert the name into a name/fcn pair |
| @@ -541,7 +541,7 @@ If there is no entry, prompt the user for the value to use. | |||
| 541 | The prompt text used is derived from the previous PROMPT command in the | 541 | The prompt text used is derived from the previous PROMPT command in the |
| 542 | template file.") | 542 | template file.") |
| 543 | 543 | ||
| 544 | (defmethod srecode-inserter-apply-state | 544 | (cl-defmethod srecode-inserter-apply-state |
| 545 | ((ins srecode-template-inserter-ask) STATE) | 545 | ((ins srecode-template-inserter-ask) STATE) |
| 546 | "For the template inserter INS, apply information from STATE. | 546 | "For the template inserter INS, apply information from STATE. |
| 547 | Loop over the prompts to see if we have a match." | 547 | Loop over the prompts to see if we have a match." |
| @@ -561,14 +561,14 @@ Loop over the prompts to see if we have a match." | |||
| 561 | (setq prompts (cdr prompts))) | 561 | (setq prompts (cdr prompts))) |
| 562 | )) | 562 | )) |
| 563 | 563 | ||
| 564 | (defmethod srecode-insert-method ((sti srecode-template-inserter-ask) | 564 | (cl-defmethod srecode-insert-method ((sti srecode-template-inserter-ask) |
| 565 | dictionary) | 565 | dictionary) |
| 566 | "Insert the STI inserter." | 566 | "Insert the STI inserter." |
| 567 | (let ((val (srecode-dictionary-lookup-name | 567 | (let ((val (srecode-dictionary-lookup-name |
| 568 | dictionary (oref sti :object-name)))) | 568 | dictionary (oref sti :object-name)))) |
| 569 | (if val | 569 | (if val |
| 570 | ;; Does some extra work. Oh well. | 570 | ;; Does some extra work. Oh well. |
| 571 | (call-next-method) | 571 | (cl-call-next-method) |
| 572 | 572 | ||
| 573 | ;; How is our -ask value determined? | 573 | ;; How is our -ask value determined? |
| 574 | (if srecode-insert-with-fields-in-progress | 574 | (if srecode-insert-with-fields-in-progress |
| @@ -585,9 +585,9 @@ Loop over the prompts to see if we have a match." | |||
| 585 | 585 | ||
| 586 | ;; Now that this value is safely stowed in the dictionary, | 586 | ;; Now that this value is safely stowed in the dictionary, |
| 587 | ;; we can do what regular inserters do. | 587 | ;; we can do what regular inserters do. |
| 588 | (call-next-method)))) | 588 | (cl-call-next-method)))) |
| 589 | 589 | ||
| 590 | (defmethod srecode-insert-ask-default ((sti srecode-template-inserter-ask) | 590 | (cl-defmethod srecode-insert-ask-default ((sti srecode-template-inserter-ask) |
| 591 | dictionary) | 591 | dictionary) |
| 592 | "Derive the default value for an askable inserter STI. | 592 | "Derive the default value for an askable inserter STI. |
| 593 | DICTIONARY is used to derive some values." | 593 | DICTIONARY is used to derive some values." |
| @@ -612,7 +612,7 @@ DICTIONARY is used to derive some values." | |||
| 612 | dictionary | 612 | dictionary |
| 613 | "Unknown default for prompt: %S" defaultfcn))))) | 613 | "Unknown default for prompt: %S" defaultfcn))))) |
| 614 | 614 | ||
| 615 | (defmethod srecode-insert-method-ask ((sti srecode-template-inserter-ask) | 615 | (cl-defmethod srecode-insert-method-ask ((sti srecode-template-inserter-ask) |
| 616 | dictionary) | 616 | dictionary) |
| 617 | "Do the \"asking\" for the template inserter STI. | 617 | "Do the \"asking\" for the template inserter STI. |
| 618 | Use DICTIONARY to resolve values." | 618 | Use DICTIONARY to resolve values." |
| @@ -646,7 +646,7 @@ Use DICTIONARY to resolve values." | |||
| 646 | val) | 646 | val) |
| 647 | ) | 647 | ) |
| 648 | 648 | ||
| 649 | (defmethod srecode-insert-method-field ((sti srecode-template-inserter-ask) | 649 | (cl-defmethod srecode-insert-method-field ((sti srecode-template-inserter-ask) |
| 650 | dictionary) | 650 | dictionary) |
| 651 | "Create an editable field for the template inserter STI. | 651 | "Create an editable field for the template inserter STI. |
| 652 | Use DICTIONARY to resolve values." | 652 | Use DICTIONARY to resolve values." |
| @@ -661,9 +661,9 @@ Use DICTIONARY to resolve values." | |||
| 661 | ;; across multiple locations. | 661 | ;; across multiple locations. |
| 662 | compound-value)) | 662 | compound-value)) |
| 663 | 663 | ||
| 664 | (defmethod srecode-dump ((ins srecode-template-inserter-ask) indent) | 664 | (cl-defmethod srecode-dump ((ins srecode-template-inserter-ask) indent) |
| 665 | "Dump the state of the SRecode template inserter INS." | 665 | "Dump the state of the SRecode template inserter INS." |
| 666 | (call-next-method) | 666 | (cl-call-next-method) |
| 667 | (princ " : \"") | 667 | (princ " : \"") |
| 668 | (princ (oref ins prompt)) | 668 | (princ (oref ins prompt)) |
| 669 | (princ "\"") | 669 | (princ "\"") |
| @@ -681,7 +681,7 @@ Thus a specification of `10:left' will insert the value of A | |||
| 681 | to 10 characters, with spaces added to the left. Use `right' for adding | 681 | to 10 characters, with spaces added to the left. Use `right' for adding |
| 682 | spaces to the right.") | 682 | spaces to the right.") |
| 683 | 683 | ||
| 684 | (defmethod srecode-insert-variable-secondname-handler | 684 | (cl-defmethod srecode-insert-variable-secondname-handler |
| 685 | ((sti srecode-template-inserter-width) dictionary value width) | 685 | ((sti srecode-template-inserter-width) dictionary value width) |
| 686 | "For VALUE handle WIDTH behaviors for this variable inserter. | 686 | "For VALUE handle WIDTH behaviors for this variable inserter. |
| 687 | Return the result as a string. | 687 | Return the result as a string. |
| @@ -714,7 +714,7 @@ By default, treat as a function name." | |||
| 714 | (concat padchars value) | 714 | (concat padchars value) |
| 715 | (concat value padchars)))))) | 715 | (concat value padchars)))))) |
| 716 | 716 | ||
| 717 | (defmethod srecode-inserter-prin-example :STATIC ((ins srecode-template-inserter-width) | 717 | (cl-defmethod srecode-inserter-prin-example ((ins (subclass srecode-template-inserter-width)) |
| 718 | escape-start escape-end) | 718 | escape-start escape-end) |
| 719 | "Insert an example using inserter INS. | 719 | "Insert an example using inserter INS. |
| 720 | Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." | 720 | Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." |
| @@ -750,7 +750,7 @@ The cursor is placed at the ^ macro after insertion. | |||
| 750 | Some inserter macros, such as `srecode-template-inserter-include-wrap' | 750 | Some inserter macros, such as `srecode-template-inserter-include-wrap' |
| 751 | will place text at the ^ macro from the included macro.") | 751 | will place text at the ^ macro from the included macro.") |
| 752 | 752 | ||
| 753 | (defmethod srecode-inserter-prin-example :STATIC ((ins srecode-template-inserter-point) | 753 | (cl-defmethod srecode-inserter-prin-example ((ins (subclass srecode-template-inserter-point)) |
| 754 | escape-start escape-end) | 754 | escape-start escape-end) |
| 755 | "Insert an example using inserter INS. | 755 | "Insert an example using inserter INS. |
| 756 | Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." | 756 | Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." |
| @@ -761,7 +761,7 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." | |||
| 761 | (terpri) | 761 | (terpri) |
| 762 | ) | 762 | ) |
| 763 | 763 | ||
| 764 | (defmethod srecode-insert-method ((sti srecode-template-inserter-point) | 764 | (cl-defmethod srecode-insert-method ((sti srecode-template-inserter-point) |
| 765 | dictionary) | 765 | dictionary) |
| 766 | "Insert the STI inserter. | 766 | "Insert the STI inserter. |
| 767 | Save point in the class allocated 'point' slot. | 767 | Save point in the class allocated 'point' slot. |
| @@ -787,11 +787,11 @@ generalized marker will do something else. See | |||
| 787 | "Wrap a section of a template under the control of a macro." | 787 | "Wrap a section of a template under the control of a macro." |
| 788 | :abstract t) | 788 | :abstract t) |
| 789 | 789 | ||
| 790 | (defmethod srecode-inserter-prin-example :STATIC ((ins srecode-template-inserter-subtemplate) | 790 | (cl-defmethod srecode-inserter-prin-example ((ins (subclass srecode-template-inserter-subtemplate)) |
| 791 | escape-start escape-end) | 791 | escape-start escape-end) |
| 792 | "Insert an example using inserter INS. | 792 | "Insert an example using inserter INS. |
| 793 | Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." | 793 | Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." |
| 794 | (call-next-method) | 794 | (cl-call-next-method) |
| 795 | (princ " Template Text to control") | 795 | (princ " Template Text to control") |
| 796 | (terpri) | 796 | (terpri) |
| 797 | (princ " ") | 797 | (princ " ") |
| @@ -801,7 +801,7 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." | |||
| 801 | (terpri) | 801 | (terpri) |
| 802 | ) | 802 | ) |
| 803 | 803 | ||
| 804 | (defmethod srecode-insert-subtemplate ((sti srecode-template-inserter-subtemplate) | 804 | (cl-defmethod srecode-insert-subtemplate ((sti srecode-template-inserter-subtemplate) |
| 805 | dict slot) | 805 | dict slot) |
| 806 | "Insert a subtemplate for the inserter STI with dictionary DICT." | 806 | "Insert a subtemplate for the inserter STI with dictionary DICT." |
| 807 | ;; Make sure that only dictionaries are used. | 807 | ;; Make sure that only dictionaries are used. |
| @@ -814,7 +814,7 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." | |||
| 814 | ;; Output the code from the sub-template. | 814 | ;; Output the code from the sub-template. |
| 815 | (srecode-insert-method (slot-value sti slot) dict)) | 815 | (srecode-insert-method (slot-value sti slot) dict)) |
| 816 | 816 | ||
| 817 | (defmethod srecode-insert-method-helper ((sti srecode-template-inserter-subtemplate) | 817 | (cl-defmethod srecode-insert-method-helper ((sti srecode-template-inserter-subtemplate) |
| 818 | dictionary slot) | 818 | dictionary slot) |
| 819 | "Do the work for inserting the STI inserter. | 819 | "Do the work for inserting the STI inserter. |
| 820 | Loops over the embedded CODE which was saved here during compilation. | 820 | Loops over the embedded CODE which was saved here during compilation. |
| @@ -837,7 +837,7 @@ The template to insert is stored in SLOT." | |||
| 837 | (srecode-insert-subtemplate sti (car dicts) slot) | 837 | (srecode-insert-subtemplate sti (car dicts) slot) |
| 838 | (setq dicts (cdr dicts))))) | 838 | (setq dicts (cdr dicts))))) |
| 839 | 839 | ||
| 840 | (defmethod srecode-insert-method ((sti srecode-template-inserter-subtemplate) | 840 | (cl-defmethod srecode-insert-method ((sti srecode-template-inserter-subtemplate) |
| 841 | dictionary) | 841 | dictionary) |
| 842 | "Insert the STI inserter. | 842 | "Insert the STI inserter. |
| 843 | Calls back to `srecode-insert-method-helper' for this class." | 843 | Calls back to `srecode-insert-method-helper' for this class." |
| @@ -858,7 +858,7 @@ The dictionary saved at the named dictionary entry will be | |||
| 858 | applied to the text between the section start and the | 858 | applied to the text between the section start and the |
| 859 | `srecode-template-inserter-section-end' macro.") | 859 | `srecode-template-inserter-section-end' macro.") |
| 860 | 860 | ||
| 861 | (defmethod srecode-parse-input ((ins srecode-template-inserter-section-start) | 861 | (cl-defmethod srecode-parse-input ((ins srecode-template-inserter-section-start) |
| 862 | tag input STATE) | 862 | tag input STATE) |
| 863 | "For the section inserter INS, parse INPUT. | 863 | "For the section inserter INS, parse INPUT. |
| 864 | Shorten input until the END token is found. | 864 | Shorten input until the END token is found. |
| @@ -872,9 +872,9 @@ Return the remains of INPUT." | |||
| 872 | :code (cdr out))) | 872 | :code (cdr out))) |
| 873 | (car out))) | 873 | (car out))) |
| 874 | 874 | ||
| 875 | (defmethod srecode-dump ((ins srecode-template-inserter-section-start) indent) | 875 | (cl-defmethod srecode-dump ((ins srecode-template-inserter-section-start) indent) |
| 876 | "Dump the state of the SRecode template inserter INS." | 876 | "Dump the state of the SRecode template inserter INS." |
| 877 | (call-next-method) | 877 | (cl-call-next-method) |
| 878 | (princ "\n") | 878 | (princ "\n") |
| 879 | (srecode-dump-code-list (oref (oref ins template) code) | 879 | (srecode-dump-code-list (oref (oref ins template) code) |
| 880 | (concat indent " ")) | 880 | (concat indent " ")) |
| @@ -889,12 +889,12 @@ Return the remains of INPUT." | |||
| 889 | "All template segments between the section-start and section-end | 889 | "All template segments between the section-start and section-end |
| 890 | are treated specially.") | 890 | are treated specially.") |
| 891 | 891 | ||
| 892 | (defmethod srecode-insert-method ((sti srecode-template-inserter-section-end) | 892 | (cl-defmethod srecode-insert-method ((sti srecode-template-inserter-section-end) |
| 893 | dictionary) | 893 | dictionary) |
| 894 | "Insert the STI inserter." | 894 | "Insert the STI inserter." |
| 895 | ) | 895 | ) |
| 896 | 896 | ||
| 897 | (defmethod srecode-match-end ((ins srecode-template-inserter-section-end) name) | 897 | (cl-defmethod srecode-match-end ((ins srecode-template-inserter-section-end) name) |
| 898 | 898 | ||
| 899 | "For the template inserter INS, do I end a section called NAME?" | 899 | "For the template inserter INS, do I end a section called NAME?" |
| 900 | (string= name (oref ins :object-name))) | 900 | (string= name (oref ins :object-name))) |
| @@ -912,7 +912,7 @@ are treated specially.") | |||
| 912 | The included template will have additional dictionary entries from the subdictionary | 912 | The included template will have additional dictionary entries from the subdictionary |
| 913 | stored specified by this macro.") | 913 | stored specified by this macro.") |
| 914 | 914 | ||
| 915 | (defmethod srecode-inserter-prin-example :STATIC ((ins srecode-template-inserter-include) | 915 | (cl-defmethod srecode-inserter-prin-example ((ins (subclass srecode-template-inserter-include)) |
| 916 | escape-start escape-end) | 916 | escape-start escape-end) |
| 917 | "Insert an example using inserter INS. | 917 | "Insert an example using inserter INS. |
| 918 | Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." | 918 | Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." |
| @@ -923,7 +923,7 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." | |||
| 923 | (terpri) | 923 | (terpri) |
| 924 | ) | 924 | ) |
| 925 | 925 | ||
| 926 | (defmethod srecode-insert-include-lookup ((sti srecode-template-inserter-include) | 926 | (cl-defmethod srecode-insert-include-lookup ((sti srecode-template-inserter-include) |
| 927 | dictionary) | 927 | dictionary) |
| 928 | "For the template inserter STI, lookup the template to include. | 928 | "For the template inserter STI, lookup the template to include. |
| 929 | Finds the template with this macro function part and stores it in | 929 | Finds the template with this macro function part and stores it in |
| @@ -981,7 +981,7 @@ this template instance." | |||
| 981 | "No template \"%s\" found for include macro `%s'" | 981 | "No template \"%s\" found for include macro `%s'" |
| 982 | templatenamepart (oref sti :object-name))))) | 982 | templatenamepart (oref sti :object-name))))) |
| 983 | 983 | ||
| 984 | (defmethod srecode-insert-method ((sti srecode-template-inserter-include) | 984 | (cl-defmethod srecode-insert-method ((sti srecode-template-inserter-include) |
| 985 | dictionary) | 985 | dictionary) |
| 986 | "Insert the STI inserter. | 986 | "Insert the STI inserter. |
| 987 | Finds the template with this macro function part, and inserts it | 987 | Finds the template with this macro function part, and inserts it |
| @@ -1017,7 +1017,7 @@ stored specified by this macro. If the included macro includes a ^ macro, | |||
| 1017 | then the text between this macro and the end macro will be inserted at | 1017 | then the text between this macro and the end macro will be inserted at |
| 1018 | the ^ macro.") | 1018 | the ^ macro.") |
| 1019 | 1019 | ||
| 1020 | (defmethod srecode-inserter-prin-example :STATIC ((ins srecode-template-inserter-include-wrap) | 1020 | (cl-defmethod srecode-inserter-prin-example ((ins (subclass srecode-template-inserter-include-wrap)) |
| 1021 | escape-start escape-end) | 1021 | escape-start escape-end) |
| 1022 | "Insert an example using inserter INS. | 1022 | "Insert an example using inserter INS. |
| 1023 | Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." | 1023 | Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." |
| @@ -1035,7 +1035,7 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." | |||
| 1035 | (terpri) | 1035 | (terpri) |
| 1036 | ) | 1036 | ) |
| 1037 | 1037 | ||
| 1038 | (defmethod srecode-insert-method ((sti srecode-template-inserter-include-wrap) | 1038 | (cl-defmethod srecode-insert-method ((sti srecode-template-inserter-include-wrap) |
| 1039 | dictionary) | 1039 | dictionary) |
| 1040 | "Insert the template STI. | 1040 | "Insert the template STI. |
| 1041 | This will first insert the include part via inheritance, then | 1041 | This will first insert the include part via inheritance, then |
| @@ -1067,7 +1067,7 @@ template where a ^ inserter occurs." | |||
| 1067 | inserter1 dict 'template)))))))) | 1067 | inserter1 dict 'template)))))))) |
| 1068 | ;; Do a regular insertion for an include, but with our override in | 1068 | ;; Do a regular insertion for an include, but with our override in |
| 1069 | ;; place. | 1069 | ;; place. |
| 1070 | (call-next-method))) | 1070 | (cl-call-next-method))) |
| 1071 | 1071 | ||
| 1072 | (provide 'srecode/insert) | 1072 | (provide 'srecode/insert) |
| 1073 | 1073 | ||
diff --git a/lisp/cedet/srecode/map.el b/lisp/cedet/srecode/map.el index cc0c4ae4427..71ed835e4ff 100644 --- a/lisp/cedet/srecode/map.el +++ b/lisp/cedet/srecode/map.el | |||
| @@ -67,11 +67,11 @@ Each app keys to an alist of files and modes (as above.)") | |||
| 67 | ) | 67 | ) |
| 68 | "A map of srecode templates.") | 68 | "A map of srecode templates.") |
| 69 | 69 | ||
| 70 | (defmethod srecode-map-entry-for-file ((map srecode-map) file) | 70 | (cl-defmethod srecode-map-entry-for-file ((map srecode-map) file) |
| 71 | "Return the entry in MAP for FILE." | 71 | "Return the entry in MAP for FILE." |
| 72 | (assoc file (oref map files))) | 72 | (assoc file (oref map files))) |
| 73 | 73 | ||
| 74 | (defmethod srecode-map-entries-for-mode ((map srecode-map) mode) | 74 | (cl-defmethod srecode-map-entries-for-mode ((map srecode-map) mode) |
| 75 | "Return the entries in MAP for major MODE." | 75 | "Return the entries in MAP for major MODE." |
| 76 | (let ((ans nil)) | 76 | (let ((ans nil)) |
| 77 | (dolist (f (oref map files)) | 77 | (dolist (f (oref map files)) |
| @@ -79,12 +79,12 @@ Each app keys to an alist of files and modes (as above.)") | |||
| 79 | (setq ans (cons f ans)))) | 79 | (setq ans (cons f ans)))) |
| 80 | ans)) | 80 | ans)) |
| 81 | 81 | ||
| 82 | (defmethod srecode-map-entry-for-app ((map srecode-map) app) | 82 | (cl-defmethod srecode-map-entry-for-app ((map srecode-map) app) |
| 83 | "Return the entry in MAP for APP." | 83 | "Return the entry in MAP for APP." |
| 84 | (assoc app (oref map apps)) | 84 | (assoc app (oref map apps)) |
| 85 | ) | 85 | ) |
| 86 | 86 | ||
| 87 | (defmethod srecode-map-entries-for-app-and-mode ((map srecode-map) app mode) | 87 | (cl-defmethod srecode-map-entries-for-app-and-mode ((map srecode-map) app mode) |
| 88 | "Return the entries in MAP for major MODE." | 88 | "Return the entries in MAP for major MODE." |
| 89 | (let ((ans nil) | 89 | (let ((ans nil) |
| 90 | (appentry (srecode-map-entry-for-app map app))) | 90 | (appentry (srecode-map-entry-for-app map app))) |
| @@ -93,7 +93,7 @@ Each app keys to an alist of files and modes (as above.)") | |||
| 93 | (setq ans (cons f ans)))) | 93 | (setq ans (cons f ans)))) |
| 94 | ans)) | 94 | ans)) |
| 95 | 95 | ||
| 96 | (defmethod srecode-map-entry-for-file-anywhere ((map srecode-map) file) | 96 | (cl-defmethod srecode-map-entry-for-file-anywhere ((map srecode-map) file) |
| 97 | "Search in all entry points in MAP for FILE. | 97 | "Search in all entry points in MAP for FILE. |
| 98 | Return a list ( APP . FILE-ASSOC ) where APP is nil | 98 | Return a list ( APP . FILE-ASSOC ) where APP is nil |
| 99 | in the global map." | 99 | in the global map." |
| @@ -112,13 +112,13 @@ in the global map." | |||
| 112 | ;; Other? | 112 | ;; Other? |
| 113 | )) | 113 | )) |
| 114 | 114 | ||
| 115 | (defmethod srecode-map-delete-file-entry ((map srecode-map) file) | 115 | (cl-defmethod srecode-map-delete-file-entry ((map srecode-map) file) |
| 116 | "Update MAP to exclude FILE from the file list." | 116 | "Update MAP to exclude FILE from the file list." |
| 117 | (let ((entry (srecode-map-entry-for-file map file))) | 117 | (let ((entry (srecode-map-entry-for-file map file))) |
| 118 | (when entry | 118 | (when entry |
| 119 | (object-remove-from-list map 'files entry)))) | 119 | (object-remove-from-list map 'files entry)))) |
| 120 | 120 | ||
| 121 | (defmethod srecode-map-update-file-entry ((map srecode-map) file mode) | 121 | (cl-defmethod srecode-map-update-file-entry ((map srecode-map) file mode) |
| 122 | "Update a MAP entry for FILE to be used with MODE. | 122 | "Update a MAP entry for FILE to be used with MODE. |
| 123 | Return non-nil if the MAP was changed." | 123 | Return non-nil if the MAP was changed." |
| 124 | (let ((entry (srecode-map-entry-for-file map file)) | 124 | (let ((entry (srecode-map-entry-for-file map file)) |
| @@ -136,14 +136,14 @@ Return non-nil if the MAP was changed." | |||
| 136 | )) | 136 | )) |
| 137 | dirty)) | 137 | dirty)) |
| 138 | 138 | ||
| 139 | (defmethod srecode-map-delete-file-entry-from-app ((map srecode-map) file app) | 139 | (cl-defmethod srecode-map-delete-file-entry-from-app ((map srecode-map) file app) |
| 140 | "Delete from MAP the FILE entry within the APP." | 140 | "Delete from MAP the FILE entry within the APP." |
| 141 | (let* ((appe (srecode-map-entry-for-app map app)) | 141 | (let* ((appe (srecode-map-entry-for-app map app)) |
| 142 | (fentry (assoc file (cdr appe)))) | 142 | (fentry (assoc file (cdr appe)))) |
| 143 | (setcdr appe (delete fentry (cdr appe)))) | 143 | (setcdr appe (delete fentry (cdr appe)))) |
| 144 | ) | 144 | ) |
| 145 | 145 | ||
| 146 | (defmethod srecode-map-update-app-file-entry ((map srecode-map) file mode app) | 146 | (cl-defmethod srecode-map-update-app-file-entry ((map srecode-map) file mode app) |
| 147 | "Update the MAP entry for FILE to be used with MODE within APP. | 147 | "Update the MAP entry for FILE to be used with MODE within APP. |
| 148 | Return non-nil if the map was changed." | 148 | Return non-nil if the map was changed." |
| 149 | (let* ((appentry (srecode-map-entry-for-app map app)) | 149 | (let* ((appentry (srecode-map-entry-for-app map app)) |
diff --git a/lisp/cedet/srecode/semantic.el b/lisp/cedet/srecode/semantic.el index 2313fa73b73..0ea2ab4a5ff 100644 --- a/lisp/cedet/srecode/semantic.el +++ b/lisp/cedet/srecode/semantic.el | |||
| @@ -55,7 +55,7 @@ | |||
| 55 | "Wrap up a collection of semantic tag information. | 55 | "Wrap up a collection of semantic tag information. |
| 56 | This class will be used to derive dictionary values.") | 56 | This class will be used to derive dictionary values.") |
| 57 | 57 | ||
| 58 | (defmethod srecode-compound-toString((cp srecode-semantic-tag) | 58 | (cl-defmethod srecode-compound-toString((cp srecode-semantic-tag) |
| 59 | function | 59 | function |
| 60 | dictionary) | 60 | dictionary) |
| 61 | "Convert the compound dictionary value CP to a string. | 61 | "Convert the compound dictionary value CP to a string. |
diff --git a/lisp/cedet/srecode/table.el b/lisp/cedet/srecode/table.el index b4f20a9f35f..a2baa7b231f 100644 --- a/lisp/cedet/srecode/table.el +++ b/lisp/cedet/srecode/table.el | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | ;; | 26 | ;; |
| 27 | 27 | ||
| 28 | (require 'eieio) | 28 | (require 'eieio) |
| 29 | (require 'cl-generic) | ||
| 29 | (require 'eieio-base) | 30 | (require 'eieio-base) |
| 30 | (require 'mode-local) | 31 | (require 'mode-local) |
| 31 | (require 'srecode) | 32 | (require 'srecode) |
| @@ -172,7 +173,7 @@ calculate all inherited templates from parent modes." | |||
| 172 | 173 | ||
| 173 | new)))) | 174 | new)))) |
| 174 | 175 | ||
| 175 | (defmethod srecode-mode-table-find ((mt srecode-mode-table) file) | 176 | (cl-defmethod srecode-mode-table-find ((mt srecode-mode-table) file) |
| 176 | "Look in the mode table MT for a template table from FILE. | 177 | "Look in the mode table MT for a template table from FILE. |
| 177 | Return nil if there was none." | 178 | Return nil if there was none." |
| 178 | (object-assoc file 'file (oref mt modetables))) | 179 | (object-assoc file 'file (oref mt modetables))) |
| @@ -235,7 +236,7 @@ Use PREDICATE is the same as for the `sort' function." | |||
| 235 | (srecode-dump tmp)) | 236 | (srecode-dump tmp)) |
| 236 | ))) | 237 | ))) |
| 237 | 238 | ||
| 238 | (defmethod srecode-dump ((tab srecode-mode-table)) | 239 | (cl-defmethod srecode-dump ((tab srecode-mode-table)) |
| 239 | "Dump the contents of the SRecode mode table TAB." | 240 | "Dump the contents of the SRecode mode table TAB." |
| 240 | (princ "MODE TABLE FOR ") | 241 | (princ "MODE TABLE FOR ") |
| 241 | (princ (oref tab :major-mode)) | 242 | (princ (oref tab :major-mode)) |
| @@ -248,7 +249,7 @@ Use PREDICATE is the same as for the `sort' function." | |||
| 248 | (setq subtab (cdr subtab))) | 249 | (setq subtab (cdr subtab))) |
| 249 | )) | 250 | )) |
| 250 | 251 | ||
| 251 | (defmethod srecode-dump ((tab srecode-template-table)) | 252 | (cl-defmethod srecode-dump ((tab srecode-template-table)) |
| 252 | "Dump the contents of the SRecode template table TAB." | 253 | "Dump the contents of the SRecode template table TAB." |
| 253 | (princ "Template Table for ") | 254 | (princ "Template Table for ") |
| 254 | (princ (eieio-object-name-string tab)) | 255 | (princ (eieio-object-name-string tab)) |