diff options
| author | Stefan Monnier | 2014-12-22 12:43:23 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2014-12-22 12:43:23 -0500 |
| commit | b11d8924b565bd96939537b10a70bb3c26532bed (patch) | |
| tree | ce1e395d94d9f148b507face545b2ca9e80f0f2d | |
| parent | b366b3bbf5ce0f6b47afec2eff0f7d27291e9a6f (diff) | |
| download | emacs-b11d8924b565bd96939537b10a70bb3c26532bed.tar.gz emacs-b11d8924b565bd96939537b10a70bb3c26532bed.zip | |
* lisp/cedet: Reduce reliance on EIEIO internals.
* lisp/cedet/ede/generic.el (ede-find-target): Prefer \` and \' to ^ and $.
* lisp/cedet/semantic/db-el.el (semanticdb-elisp-sym->tag): Prefer find-class over
class-v.
* lisp/cedet/semantic/db.el (semanticdb-cache-get): Prefer eieio-object-class over
eieio--object-class.
* lisp/cedet/srecode/srt-mode.el (srecode-macro-help): Use eieio-class-children.
| -rw-r--r-- | lisp/cedet/ChangeLog | 88 | ||||
| -rw-r--r-- | lisp/cedet/ede/generic.el | 2 | ||||
| -rw-r--r-- | lisp/cedet/semantic/db-el.el | 4 | ||||
| -rw-r--r-- | lisp/cedet/semantic/db.el | 4 | ||||
| -rw-r--r-- | lisp/cedet/srecode/srt-mode.el | 4 |
5 files changed, 58 insertions, 44 deletions
diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index 46296d3e39f..a43e94c5686 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog | |||
| @@ -1,9 +1,21 @@ | |||
| 1 | 2014-12-22 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * srecode/srt-mode.el (srecode-macro-help): Use eieio-class-children. | ||
| 4 | |||
| 5 | * semantic/db.el (semanticdb-cache-get): Prefer eieio-object-class over | ||
| 6 | eieio--object-class. | ||
| 7 | |||
| 8 | * semantic/db-el.el (semanticdb-elisp-sym->tag): Prefer find-class over | ||
| 9 | class-v. | ||
| 10 | |||
| 11 | * ede/generic.el (ede-find-target): Prefer \` and \' to ^ and $. | ||
| 12 | |||
| 1 | 2014-12-14 Dmitry Gutov <dgutov@yandex.ru> | 13 | 2014-12-14 Dmitry Gutov <dgutov@yandex.ru> |
| 2 | 14 | ||
| 3 | * semantic.el (semantic-analyze-completion-at-point-function) | 15 | * semantic.el (semantic-analyze-completion-at-point-function) |
| 4 | (semantic-analyze-notc-completion-at-point-function) | 16 | (semantic-analyze-notc-completion-at-point-function) |
| 5 | (semantic-analyze-nolongprefix-completion-at-point-function): Do | 17 | (semantic-analyze-nolongprefix-completion-at-point-function): |
| 6 | nothing if the current buffer is not using Semantic (bug#19077). | 18 | Do nothing if the current buffer is not using Semantic (bug#19077). |
| 7 | 19 | ||
| 8 | 2014-12-08 Matt Curtis <matt.r.curtis@gmail.com> (tiny change) | 20 | 2014-12-08 Matt Curtis <matt.r.curtis@gmail.com> (tiny change) |
| 9 | 21 | ||
| @@ -14,11 +26,11 @@ | |||
| 14 | 26 | ||
| 15 | * semantic.el (semantic-mode): Add/remove 3 | 27 | * semantic.el (semantic-mode): Add/remove 3 |
| 16 | completion-at-point-functions. | 28 | completion-at-point-functions. |
| 17 | (semantic-completion-at-point-function): Removed. | 29 | (semantic-completion-at-point-function): Remove. |
| 18 | (semantic-analyze-completion-at-point-function) | 30 | (semantic-analyze-completion-at-point-function) |
| 19 | (semantic-analyze-notc-completion-at-point-function) | 31 | (semantic-analyze-notc-completion-at-point-function) |
| 20 | (semantic-analyze-nolongprefix-completion-at-point-function): New | 32 | (semantic-analyze-nolongprefix-completion-at-point-function): |
| 21 | completion at point functions. | 33 | New completion at point functions. |
| 22 | 34 | ||
| 23 | * semantic/doc.el (semantic-doc-snarf-comment-for-tag): Fix case | 35 | * semantic/doc.el (semantic-doc-snarf-comment-for-tag): Fix case |
| 24 | when comment-end is empty string. | 36 | when comment-end is empty string. |
| @@ -62,18 +74,18 @@ | |||
| 62 | assignee now must be of class variable. | 74 | assignee now must be of class variable. |
| 63 | 75 | ||
| 64 | * semantic/analyze/complete.el | 76 | * semantic/analyze/complete.el |
| 65 | (semantic-analyze-possible-completions-default): Add | 77 | (semantic-analyze-possible-completions-default): |
| 66 | 'no-longprefix' flag. When used, the prefix and prefixtypes are | 78 | Add 'no-longprefix' flag. When used, the prefix and prefixtypes are |
| 67 | shortened to just the last symbol. | 79 | shortened to just the last symbol. |
| 68 | 80 | ||
| 69 | * semantic/bovine/c.el (semantic-c-do-lex-if): Catch errors from | 81 | * semantic/bovine/c.el (semantic-c-do-lex-if): Catch errors from |
| 70 | 'hideif', and push to the parser warning stack. | 82 | 'hideif', and push to the parser warning stack. |
| 71 | (semantic-lex-cpp-define): When a comment is at the end of a | 83 | (semantic-lex-cpp-define): When a comment is at the end of a |
| 72 | macro, do not subtract an extra 1 from the found position. Fixes | 84 | macro, do not subtract an extra 1 from the found position. |
| 73 | bug with: #define foo (a)/**/ adding an extra ')' to the stream. | 85 | Fixes bug with: #define foo (a)/**/ adding an extra ')' to the stream. |
| 74 | 86 | ||
| 75 | * semantic/bovine/scm.el (semantic-lex-scheme-symbol): Allow | 87 | * semantic/bovine/scm.el (semantic-lex-scheme-symbol): |
| 76 | symbols to be one char long. | 88 | Allow symbols to be one char long. |
| 77 | 89 | ||
| 78 | * semantic/bovine/grammar.el | 90 | * semantic/bovine/grammar.el |
| 79 | (bovine-grammar-calculate-source-on-path): New. | 91 | (bovine-grammar-calculate-source-on-path): New. |
| @@ -89,8 +101,8 @@ | |||
| 89 | (ede-check-project-query-fcn): New variable | 101 | (ede-check-project-query-fcn): New variable |
| 90 | (ede-check-project-directory): Use above when querying the user. | 102 | (ede-check-project-directory): Use above when querying the user. |
| 91 | Added to support unit testing of this security measure. | 103 | Added to support unit testing of this security measure. |
| 92 | (ede-initialize-state-current-buffer): Use | 104 | (ede-initialize-state-current-buffer): |
| 93 | `ede-directory-project-cons' instead of the -detect- fcn to take | 105 | Use `ede-directory-project-cons' instead of the -detect- fcn to take |
| 94 | advantage of the cache. Pass found project into | 106 | advantage of the cache. Pass found project into |
| 95 | `ede-load-project-file'. | 107 | `ede-load-project-file'. |
| 96 | (ede-load-project-file): Add new input DETECTIN. | 108 | (ede-load-project-file): Add new input DETECTIN. |
| @@ -103,18 +115,18 @@ | |||
| 103 | (ede-global-list-sanity-check): New Testing fcn. | 115 | (ede-global-list-sanity-check): New Testing fcn. |
| 104 | (ede-parent-project): Replace old code with call to faster | 116 | (ede-parent-project): Replace old code with call to faster |
| 105 | `ede-find-subproject-for-directory'. | 117 | `ede-find-subproject-for-directory'. |
| 106 | (ede-load-project-file): Use | 118 | (ede-load-project-file): |
| 107 | `ede-directory-get-toplevel-open-project' instead of above | 119 | Use `ede-directory-get-toplevel-open-project' instead of above |
| 108 | deleted. Rename "pfc" to "autoloader". Use | 120 | deleted. Rename "pfc" to "autoloader". |
| 109 | `ede-directory-project-cons' to detect a project. Delete no | 121 | Use `ede-directory-project-cons' to detect a project. Delete no |
| 110 | project found case where we search up the tree. | 122 | project found case where we search up the tree. |
| 111 | 123 | ||
| 112 | * ede/auto.el (ede-project-autoload): Fix doc typo. Add | 124 | * ede/auto.el (ede-project-autoload): Fix doc typo. |
| 113 | `:root-only' slot. | 125 | Add `:root-only' slot. |
| 114 | (ede-auto-load-project): Doc update: warn to not use. | 126 | (ede-auto-load-project): Doc update: warn to not use. |
| 115 | (ede-dir-to-projectfile): Deleted. | 127 | (ede-dir-to-projectfile): Delete. |
| 116 | (ede-project-autoload-dirmatch): Add subdir-only slot. Make | 128 | (ede-project-autoload-dirmatch): Add subdir-only slot. |
| 117 | configdatastash unbound by default. | 129 | Make configdatastash unbound by default. |
| 118 | (ede-do-dirmatch): If subdir-only is true, then don't allow exact | 130 | (ede-do-dirmatch): If subdir-only is true, then don't allow exact |
| 119 | matches. Account for configdatastash as unbound. Assume value of | 131 | matches. Account for configdatastash as unbound. Assume value of |
| 120 | nil means no tool installed. Make sure loaded path matches from | 132 | nil means no tool installed. Make sure loaded path matches from |
| @@ -122,7 +134,7 @@ | |||
| 122 | (ede-project-class-files): Note that makefile and automake are not | 134 | (ede-project-class-files): Note that makefile and automake are not |
| 123 | root only. | 135 | root only. |
| 124 | (ede-auto-detect-in-dir): New (for use with `ede/detect.el'). | 136 | (ede-auto-detect-in-dir): New (for use with `ede/detect.el'). |
| 125 | (ede-project-dirmatch-p): Deleted. | 137 | (ede-project-dirmatch-p): Delete. |
| 126 | (ede-project-root-directory): Remove body, return nil. | 138 | (ede-project-root-directory): Remove body, return nil. |
| 127 | (ede-project-autoload): :proj-root-dirmatch can be null & doc fix. | 139 | (ede-project-autoload): :proj-root-dirmatch can be null & doc fix. |
| 128 | (ede-auto-detect-in-dir): If there is no :proj-file, check for a | 140 | (ede-auto-detect-in-dir): If there is no :proj-file, check for a |
| @@ -140,8 +152,8 @@ | |||
| 140 | (ede-generic-config): Remove slots: c-include-path, | 152 | (ede-generic-config): Remove slots: c-include-path, |
| 141 | c-preprocessor-table, c-preprocessor-files, classpath, | 153 | c-preprocessor-table, c-preprocessor-files, classpath, |
| 142 | build-command, debug-command, run command. Inherit from | 154 | build-command, debug-command, run command. Inherit from |
| 143 | ede-extra-config-build, ede-extra-config-program. Make | 155 | ede-extra-config-build, ede-extra-config-program. |
| 144 | run-command :value match :custom so only strings are accepted. | 156 | Make run-command :value match :custom so only strings are accepted. |
| 145 | Add some more :group slot specifiers. | 157 | Add some more :group slot specifiers. |
| 146 | (ede-generic-project): Add mixins `ede-project-with-config-c' and | 158 | (ede-generic-project): Add mixins `ede-project-with-config-c' and |
| 147 | `ede-project-with-config-java'. Inherit from | 159 | `ede-project-with-config-java'. Inherit from |
| @@ -153,15 +165,15 @@ | |||
| 153 | (ede-generic-target-c-cpp): Add mixin `ede-target-with-config-c'. | 165 | (ede-generic-target-c-cpp): Add mixin `ede-target-with-config-c'. |
| 154 | (ede-generic-target-java): Add mixin `ede-target-with-config-java'. | 166 | (ede-generic-target-java): Add mixin `ede-target-with-config-java'. |
| 155 | (ede-preprocessor-map, ede-system-include-path) | 167 | (ede-preprocessor-map, ede-system-include-path) |
| 156 | (edejava-classpath): Deleted, moved to config.el. | 168 | (edejava-classpath): Delete, moved to config.el. |
| 157 | (project-compile-project, project-compile-target) | 169 | (project-compile-project, project-compile-target) |
| 158 | (project-debug-target, project-run-target): Deleted. | 170 | (project-debug-target, project-run-target): Delete. |
| 159 | (ede-generic-get-configuration, ede-generic-setup-configuration) | 171 | (ede-generic-get-configuration, ede-generic-setup-configuration) |
| 160 | (ede-commit-project, project-rescan) | 172 | (ede-commit-project, project-rescan) |
| 161 | (ede-generic-project::ede-customize) | 173 | (ede-generic-project::ede-customize) |
| 162 | (ede-generic-target::ede-customize) | 174 | (ede-generic-target::ede-customize) |
| 163 | (ede-generic-config::eieio-done-customizing) | 175 | (ede-generic-config::eieio-done-customizing) |
| 164 | (ede-generic-config::ede-commit): Deleted. Subsumed by new | 176 | (ede-generic-config::ede-commit): Delete. Subsumed by new |
| 165 | baseclass. | 177 | baseclass. |
| 166 | (ede-preprocessor-map, ede-system-include-path) | 178 | (ede-preprocessor-map, ede-system-include-path) |
| 167 | (project-debug-target, project-run-target): Call new | 179 | (project-debug-target, project-run-target): Call new |
| @@ -170,7 +182,7 @@ | |||
| 170 | 182 | ||
| 171 | * ede/files.el (ede-find-project-root) | 183 | * ede/files.el (ede-find-project-root) |
| 172 | (ede-files-find-existing) | 184 | (ede-files-find-existing) |
| 173 | (ede-directory-get-toplevel-open-project-new): Deleted. | 185 | (ede-directory-get-toplevel-open-project-new): Delete. |
| 174 | (ede-project-root-directory): Use `ede-project-root' first. | 186 | (ede-project-root-directory): Use `ede-project-root' first. |
| 175 | (ede-project-directory-remove-hash) | 187 | (ede-project-directory-remove-hash) |
| 176 | (ede--directory-project-from-hash) | 188 | (ede--directory-project-from-hash) |
| @@ -186,20 +198,20 @@ | |||
| 186 | projects. When doing directory name matching, save the 'short' | 198 | projects. When doing directory name matching, save the 'short' |
| 187 | version of an answer (non-exact match) and eventually select the | 199 | version of an answer (non-exact match) and eventually select the |
| 188 | shortest answer at the end. Expand the filename of tested | 200 | shortest answer at the end. Expand the filename of tested |
| 189 | projects. Better support for when inodes are disabled. Add | 201 | projects. Better support for when inodes are disabled. |
| 190 | 'exact' option so that it will return a project that is an exact | 202 | Add 'exact' option so that it will return a project that is an exact |
| 191 | match. | 203 | match. |
| 192 | (ede-find-subproject-for-directory): Small optimization to run | 204 | (ede-find-subproject-for-directory): Small optimization to run |
| 193 | `file-truename' less often. | 205 | `file-truename' less often. |
| 194 | (ede-directory-project-p): Move content, then use | 206 | (ede-directory-project-p): Move content, then use |
| 195 | `ede-directory-project-cons'. Use | 207 | `ede-directory-project-cons'. |
| 196 | `ede-detect-directory-for-project', replacing old detection loop. | 208 | Use `ede-detect-directory-for-project', replacing old detection loop. |
| 197 | (ede-directory-project-cons): New, from above. | 209 | (ede-directory-project-cons): New, from above. |
| 198 | (ede-toplevel-project): Toss old scanning code. Use | 210 | (ede-toplevel-project): Toss old scanning code. |
| 199 | `ede-detect-directory-for-project' instead. | 211 | Use `ede-detect-directory-for-project' instead. |
| 200 | (ede-directory-get-toplevel-open-project-new): New. | 212 | (ede-directory-get-toplevel-open-project-new): New. |
| 201 | 213 | ||
| 202 | * ede/linux.el (ede-linux-project-root): Deleted. | 214 | * ede/linux.el (ede-linux-project-root): Delete. |
| 203 | (ede-project-autoload): Remove dirmatch entry - it is no longer | 215 | (ede-project-autoload): Remove dirmatch entry - it is no longer |
| 204 | needed. | 216 | needed. |
| 205 | 217 | ||
| @@ -220,7 +232,7 @@ | |||
| 220 | * ede/linux.el (ede-linux-load): Do not add to global list here. | 232 | * ede/linux.el (ede-linux-load): Do not add to global list here. |
| 221 | Don't check for existing anymore. | 233 | Don't check for existing anymore. |
| 222 | (project-rescan): New. | 234 | (project-rescan): New. |
| 223 | (ede-linux-project-list, ede-linux-file-existing): Deleted. | 235 | (ede-linux-project-list, ede-linux-file-existing): Delete. |
| 224 | (ede-linux-project-root): Delete body. Need symbol for autoloads | 236 | (ede-linux-project-root): Delete body. Need symbol for autoloads |
| 225 | for now. | 237 | for now. |
| 226 | (ede-linux-project): No longer instance tracker. | 238 | (ede-linux-project): No longer instance tracker. |
| @@ -242,7 +254,7 @@ | |||
| 242 | (ede-cpp-root-file-existing) | 254 | (ede-cpp-root-file-existing) |
| 243 | (ede-cpp-root-project-file-for-dir) | 255 | (ede-cpp-root-project-file-for-dir) |
| 244 | (ede-cpp-root-count, ede-cpp-root-project-root, ede-cpp-root-load) | 256 | (ede-cpp-root-count, ede-cpp-root-project-root, ede-cpp-root-load) |
| 245 | (ede-project-autoload cpp-root): Deleted. | 257 | (ede-project-autoload cpp-root): Delete. |
| 246 | (ede-project-root-directory): Return :directory instead of | 258 | (ede-project-root-directory): Return :directory instead of |
| 247 | calculating from :file. | 259 | calculating from :file. |
| 248 | (project-rescan): New. | 260 | (project-rescan): New. |
diff --git a/lisp/cedet/ede/generic.el b/lisp/cedet/ede/generic.el index f0314cb7f22..6d4535323d0 100644 --- a/lisp/cedet/ede/generic.el +++ b/lisp/cedet/ede/generic.el | |||
| @@ -232,7 +232,7 @@ If one doesn't exist, create a new one for this directory." | |||
| 232 | (let* ((classsym (intern (car C))) | 232 | (let* ((classsym (intern (car C))) |
| 233 | (extreg (oref classsym extension))) | 233 | (extreg (oref classsym extension))) |
| 234 | (when (and (not (string= extreg "")) | 234 | (when (and (not (string= extreg "")) |
| 235 | (string-match (concat "^" extreg "$") ext)) | 235 | (string-match (concat "\\`\\(?:" extreg "\\)\\'") ext)) |
| 236 | (setq cls classsym))))) | 236 | (setq cls classsym))))) |
| 237 | (when (not cls) (setq cls 'ede-generic-target-misc)) | 237 | (when (not cls) (setq cls 'ede-generic-target-misc)) |
| 238 | ;; find a pre-existing matching target | 238 | ;; find a pre-existing matching target |
diff --git a/lisp/cedet/semantic/db-el.el b/lisp/cedet/semantic/db-el.el index 7ff1538dd2b..f37aa07ebe6 100644 --- a/lisp/cedet/semantic/db-el.el +++ b/lisp/cedet/semantic/db-el.el | |||
| @@ -223,7 +223,9 @@ TOKTYPE is a hint to the type of tag desired." | |||
| 223 | (symbol-name sym) | 223 | (symbol-name sym) |
| 224 | "class" | 224 | "class" |
| 225 | (semantic-elisp-desymbolify | 225 | (semantic-elisp-desymbolify |
| 226 | (eieio--class-public-a (class-v semanticdb-project-database))) ;; slots | 226 | ;; FIXME: This only gives the instance slots and ignores the |
| 227 | ;; class-allocated slots. | ||
| 228 | (eieio--class-public-a (find-class semanticdb-project-database))) ;; slots ;FIXME: eieio-- | ||
| 227 | (semantic-elisp-desymbolify (eieio-class-parents sym)) ;; parents | 229 | (semantic-elisp-desymbolify (eieio-class-parents sym)) ;; parents |
| 228 | )) | 230 | )) |
| 229 | ((not toktype) | 231 | ((not toktype) |
diff --git a/lisp/cedet/semantic/db.el b/lisp/cedet/semantic/db.el index 13e2d1b37d4..0732f225779 100644 --- a/lisp/cedet/semantic/db.el +++ b/lisp/cedet/semantic/db.el | |||
| @@ -481,7 +481,7 @@ other than :table." | |||
| 481 | (let ((cache (oref table cache)) | 481 | (let ((cache (oref table cache)) |
| 482 | (obj nil)) | 482 | (obj nil)) |
| 483 | (while (and (not obj) cache) | 483 | (while (and (not obj) cache) |
| 484 | (if (eq (eieio--object-class (car cache)) desired-class) | 484 | (if (eq (eieio-object-class (car cache)) desired-class) |
| 485 | (setq obj (car cache))) | 485 | (setq obj (car cache))) |
| 486 | (setq cache (cdr cache))) | 486 | (setq cache (cdr cache))) |
| 487 | (if obj | 487 | (if obj |
| @@ -532,7 +532,7 @@ other than :table." | |||
| 532 | (let ((cache (oref db cache)) | 532 | (let ((cache (oref db cache)) |
| 533 | (obj nil)) | 533 | (obj nil)) |
| 534 | (while (and (not obj) cache) | 534 | (while (and (not obj) cache) |
| 535 | (if (eq (eieio--object-class (car cache)) desired-class) | 535 | (if (eq (eieio-object-class (car cache)) desired-class) |
| 536 | (setq obj (car cache))) | 536 | (setq obj (car cache))) |
| 537 | (setq cache (cdr cache))) | 537 | (setq cache (cdr cache))) |
| 538 | (if obj | 538 | (if obj |
diff --git a/lisp/cedet/srecode/srt-mode.el b/lisp/cedet/srecode/srt-mode.el index 48a4865e176..dfc1df805af 100644 --- a/lisp/cedet/srecode/srt-mode.el +++ b/lisp/cedet/srecode/srt-mode.el | |||
| @@ -233,7 +233,7 @@ we can tell font lock about them.") | |||
| 233 | "Provide help for working with macros in a template." | 233 | "Provide help for working with macros in a template." |
| 234 | (interactive) | 234 | (interactive) |
| 235 | (let* ((root 'srecode-template-inserter) | 235 | (let* ((root 'srecode-template-inserter) |
| 236 | (chl (eieio--class-children (class-v root))) | 236 | (chl (eieio-class-children root)) |
| 237 | (ess (srecode-template-get-escape-start)) | 237 | (ess (srecode-template-get-escape-start)) |
| 238 | (ees (srecode-template-get-escape-end)) | 238 | (ees (srecode-template-get-escape-end)) |
| 239 | ) | 239 | ) |
| @@ -249,7 +249,7 @@ we can tell font lock about them.") | |||
| 249 | (showexample t) | 249 | (showexample t) |
| 250 | ) | 250 | ) |
| 251 | (setq chl (cdr chl)) | 251 | (setq chl (cdr chl)) |
| 252 | (setq chl (append (eieio--class-children (class-v C)) chl)) | 252 | (setq chl (append (eieio-class-children C) chl)) |
| 253 | 253 | ||
| 254 | (catch 'skip | 254 | (catch 'skip |
| 255 | (when (eq C 'srecode-template-inserter-section-end) | 255 | (when (eq C 'srecode-template-inserter-section-end) |