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 /lisp/cedet/srecode/map.el | |
| 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'.
Diffstat (limited to 'lisp/cedet/srecode/map.el')
| -rw-r--r-- | lisp/cedet/srecode/map.el | 18 |
1 files changed, 9 insertions, 9 deletions
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)) |