diff options
| author | David Engster | 2013-03-22 20:31:15 +0100 |
|---|---|---|
| committer | David Engster | 2013-03-22 20:31:15 +0100 |
| commit | b886708cc640958efcf6bd68ed1674af124a2565 (patch) | |
| tree | 44c10edd72de972c7150c6df3a350f9486795d69 | |
| parent | 9bb0d8227e104a549232b78197e0e8ca2d20371c (diff) | |
| parent | e8cc7880c3eead07c1d4fd93c0396edc3861b080 (diff) | |
| download | emacs-b886708cc640958efcf6bd68ed1674af124a2565.tar.gz emacs-b886708cc640958efcf6bd68ed1674af124a2565.zip | |
Merge with CEDET upstream (rev. 8499).
48 files changed, 625 insertions, 220 deletions
diff --git a/etc/ChangeLog b/etc/ChangeLog index 6eed4c3173a..3468e70386d 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,19 @@ | |||
| 1 | 2013-03-21 Eric Ludlam <zappo@gnu.org> | ||
| 2 | |||
| 3 | * srecode/ede-autoconf.srt: Change Copyright to FSF. | ||
| 4 | (ede-empty): Change AC_INIT to use PROJECT_NAME, and | ||
| 5 | PROJECT_VERSION. | ||
| 6 | |||
| 7 | * srecode/ede-make.srt (ede-empty): Add a dependency on :project. | ||
| 8 | Add header comment specifying the project's relative path. | ||
| 9 | |||
| 10 | * srecode/c.srt (header_guard): Upcase the filename symbol. | ||
| 11 | |||
| 12 | 2013-03-21 Vladimir Kazanov <vkazanov@inbox.ru> | ||
| 13 | |||
| 14 | * srecode/java.srt (empty-main): New. | ||
| 15 | (class-tag): Decapitalize class. | ||
| 16 | |||
| 1 | 2013-03-18 Paul Eggert <eggert@cs.ucla.edu> | 17 | 2013-03-18 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 18 | ||
| 3 | Emacs crashes with ImageMagick 6.8.2-3 through 6.8.3-9 (Bug#13867). | 19 | Emacs crashes with ImageMagick 6.8.2-3 through 6.8.3-9 (Bug#13867). |
diff --git a/etc/srecode/c.srt b/etc/srecode/c.srt index 6c7139f3184..479f5c9b33d 100644 --- a/etc/srecode/c.srt +++ b/etc/srecode/c.srt | |||
| @@ -46,12 +46,12 @@ template empty :time :user :file :c | |||
| 46 | 46 | ||
| 47 | template header_guard :file :blank | 47 | template header_guard :file :blank |
| 48 | ---- | 48 | ---- |
| 49 | #ifndef {{FILENAME_SYMBOL}} | 49 | #ifndef {{FILENAME_SYMBOL:upcase}} |
| 50 | #define {{FILENAME_SYMBOL}} 1 | 50 | #define {{FILENAME_SYMBOL:upcase}} 1 |
| 51 | 51 | ||
| 52 | {{^}} | 52 | {{^}} |
| 53 | 53 | ||
| 54 | #endif // {{FILENAME_SYMBOL}} | 54 | #endif // {{FILENAME_SYMBOL:upcase}} |
| 55 | ---- | 55 | ---- |
| 56 | 56 | ||
| 57 | context misc | 57 | context misc |
diff --git a/etc/srecode/ede-autoconf.srt b/etc/srecode/ede-autoconf.srt index d2ec61a0a93..b3aaa75d2c2 100644 --- a/etc/srecode/ede-autoconf.srt +++ b/etc/srecode/ede-autoconf.srt | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;; ede/templates/autoconf.srt --- Templates for autoconf used by EDE. | 1 | ;; ede/templates/autoconf.srt --- Templates for autoconf used by EDE. |
| 2 | ;; | 2 | ;; |
| 3 | ;; Copyright (C) 2010 Eric M. Ludlam | 3 | ;; Copyright (C) 2010, 2013 Free Software Foundation, Inc. |
| 4 | ;; | 4 | ;; |
| 5 | ;; Author: Eric M. Ludlam <eric@siege-engine.com> | 5 | ;; Author: Eric M. Ludlam <eric@siege-engine.com> |
| 6 | ;; | 6 | ;; |
| @@ -26,7 +26,7 @@ set application "ede" | |||
| 26 | 26 | ||
| 27 | context file | 27 | context file |
| 28 | 28 | ||
| 29 | template ede-empty | 29 | template ede-empty :project |
| 30 | "Start a new EDE generated configure.in/ac file." | 30 | "Start a new EDE generated configure.in/ac file." |
| 31 | ---- | 31 | ---- |
| 32 | {{comment_prefix}} Automatically Generated/Maintained {{FILE}} by EDE. | 32 | {{comment_prefix}} Automatically Generated/Maintained {{FILE}} by EDE. |
| @@ -40,7 +40,7 @@ template ede-empty | |||
| 40 | {{comment_prefix}} | 40 | {{comment_prefix}} |
| 41 | {{comment_prefix}} Process this file with autoconf to produce a configure script | 41 | {{comment_prefix}} Process this file with autoconf to produce a configure script |
| 42 | 42 | ||
| 43 | AC_INIT({{TEST_FILE}}) | 43 | AC_INIT({{PROJECT_NAME}}, {{PROJECT_VERSION}}) |
| 44 | AM_INIT_AUTOMAKE([{{PROGRAM}}], 0) | 44 | AM_INIT_AUTOMAKE([{{PROGRAM}}], 0) |
| 45 | AM_CONFIG_HEADER(config.h) | 45 | AM_CONFIG_HEADER(config.h) |
| 46 | 46 | ||
diff --git a/etc/srecode/ede-make.srt b/etc/srecode/ede-make.srt index f12744e89b7..36bae085cc9 100644 --- a/etc/srecode/ede-make.srt +++ b/etc/srecode/ede-make.srt | |||
| @@ -26,10 +26,11 @@ set application "ede" | |||
| 26 | 26 | ||
| 27 | context file | 27 | context file |
| 28 | 28 | ||
| 29 | template ede-empty :file | 29 | template ede-empty :file :project |
| 30 | ---- | 30 | ---- |
| 31 | # Automatically Generated {{FILE}} by EDE. | 31 | # Automatically Generated {{FILE}} by EDE. |
| 32 | # For use with: {{MAKETYPE}} | 32 | # For use with: {{MAKETYPE}} |
| 33 | # Relative File Name: {{PROJECT_FILENAME}} | ||
| 33 | # | 34 | # |
| 34 | # DO NOT MODIFY THIS FILE OR YOUR CHANGES MAY BE LOST. | 35 | # DO NOT MODIFY THIS FILE OR YOUR CHANGES MAY BE LOST. |
| 35 | # EDE is the Emacs Development Environment. | 36 | # EDE is the Emacs Development Environment. |
diff --git a/etc/srecode/java.srt b/etc/srecode/java.srt index a4a6fc2e863..e1fbb50eff6 100644 --- a/etc/srecode/java.srt +++ b/etc/srecode/java.srt | |||
| @@ -43,6 +43,23 @@ package {{FILENAME_AS_PACKAGE}}; | |||
| 43 | ---- | 43 | ---- |
| 44 | bind "e" | 44 | bind "e" |
| 45 | 45 | ||
| 46 | template empty-main :file :user :time :java :indent | ||
| 47 | "Fill out an empty file with a class having a static main method" | ||
| 48 | sectiondictionary "CLASSSECTION" | ||
| 49 | set NAME macro "FILENAME_AS_CLASS" | ||
| 50 | ---- | ||
| 51 | {{>:filecomment}} | ||
| 52 | |||
| 53 | package {{FILENAME_AS_PACKAGE}}; | ||
| 54 | |||
| 55 | {{<CLASSSECTION:declaration:class}} | ||
| 56 | public static void main(String args[]) { | ||
| 57 | {{^}} | ||
| 58 | } | ||
| 59 | {{/CLASSSECTION}} | ||
| 60 | ---- | ||
| 61 | bind "l" | ||
| 62 | |||
| 46 | context declaration | 63 | context declaration |
| 47 | 64 | ||
| 48 | template import :blank :indent | 65 | template import :blank :indent |
| @@ -74,8 +91,8 @@ Override this to affect applications, or the outer class structure for | |||
| 74 | the user-facing template." | 91 | the user-facing template." |
| 75 | ---- | 92 | ---- |
| 76 | {{>:declaration:javadoc-class}} | 93 | {{>:declaration:javadoc-class}} |
| 77 | public Class {{?NAME}} {{#PARENTS}}{{#FIRST}}extends {{/FIRST}}{{#NOTFIRST}}implements {{/NOTFIRST}}{{NAME}}{{/PARENTS}} | 94 | public class {{?NAME}} {{#PARENTS}}{{#FIRST}}extends {{/FIRST}}{{#NOTFIRST}}implements {{/NOTFIRST}}{{NAME}}{{/PARENTS}} |
| 78 | { | 95 | { |
| 79 | {{^}} | 96 | {{^}} |
| 80 | }; | 97 | }; |
| 81 | ---- | 98 | ---- |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ef14fd4a077..1c955e303fb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-03-21 Eric Ludlam <zappo@gnu.org> | ||
| 2 | |||
| 3 | * eieio/eieio-datadebug.el (data-debug/eieio-insert-slots): | ||
| 4 | Inhibit read only while inserting objects. | ||
| 5 | |||
| 1 | 2013-03-22 Teodor Zlatanov <tzz@lifelogs.com> | 6 | 2013-03-22 Teodor Zlatanov <tzz@lifelogs.com> |
| 2 | 7 | ||
| 3 | * progmodes/cfengine.el: Update docs to mention | 8 | * progmodes/cfengine.el: Update docs to mention |
diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index 2ccce8bb01d..3991a98d3f4 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog | |||
| @@ -1,3 +1,175 @@ | |||
| 1 | 2013-03-21 Eric Ludlam <zappo@gnu.org> | ||
| 2 | |||
| 3 | * semantic.el (navigate-menu): Yank Tag :enable. Make sure | ||
| 4 | `senator-tag-ring' is bound. | ||
| 5 | (semantic-parse-region-default): Stop reversing the output of | ||
| 6 | parse-whole-stream. | ||
| 7 | (semantic-repeat-parse-whole-stream): Append returned tags | ||
| 8 | differently, so they come out in the right order. | ||
| 9 | |||
| 10 | * semantic/sb.el (semantic-sb-filter-tags-of-class): New option. | ||
| 11 | (semantic-sb-fetch-tag-table): Filter tags being bucketed to | ||
| 12 | exclude tags belonging to above filtered classes. | ||
| 13 | |||
| 14 | * semantic/find.el (semantic-filter-tags-by-class): New function. | ||
| 15 | |||
| 16 | * semantic/tag-ls.el (semantic-tag-similar-p-default): Add | ||
| 17 | short-circuit in case tag1 and 2 are identical. | ||
| 18 | |||
| 19 | * semantic/analyze/fcn.el | ||
| 20 | (semantic-analyze-dereference-metatype-stack): Use | ||
| 21 | `semantic-tag-similar-p' instead of 'eq' when comparing two tags | ||
| 22 | during metatype evaluation in case they are the same, but not the | ||
| 23 | same node. (Tweaked patch from Tomasz Gajewski) (Tiny change) | ||
| 24 | |||
| 25 | * semantic/db-find.el (semanticdb-partial-synchronize): Fix | ||
| 26 | require to semantic/db-typecache to be correct. | ||
| 27 | (semanticdb-find-tags-external-children-of-type): Make this a | ||
| 28 | brutish search by default. | ||
| 29 | |||
| 30 | * semantic/sort.el | ||
| 31 | (semantic-tag-external-member-children-default): When calling | ||
| 32 | `semanticdb-find-tags-external-children-of-type', pass in the | ||
| 33 | input tag as the place to start searching for externally defined | ||
| 34 | methods. | ||
| 35 | |||
| 36 | * semantic/db-file.el (semanticdb-default-save-directory): Doc | ||
| 37 | fix: Add ref to default value. | ||
| 38 | |||
| 39 | * semantic/complete.el (semantic-complete-post-command-hook): When | ||
| 40 | detecting if cursor is outside completion area, do so if cursor | ||
| 41 | moves before start of overlay, or the original starting location | ||
| 42 | of the overlay (i.e., if user deletes past beginning of the | ||
| 43 | overlay region). | ||
| 44 | (semantic-complete-inline-tag-engine): Initialize original start | ||
| 45 | of `semantic-complete-inline-overlay'. | ||
| 46 | |||
| 47 | * semantic/bovine/c.el (semantic-c-describe-environment): Update | ||
| 48 | some section titles. Test semanticdb table before printing it. | ||
| 49 | (semantic-c-reset-preprocessor-symbol-map): Update | ||
| 50 | `semantic-lex-spp-macro-symbol-obarray' outside the loop over all | ||
| 51 | the files contributing to its value. | ||
| 52 | (semantic-c-describe-environment): If there is an EDE project but | ||
| 53 | no spp symbols from it, say so. | ||
| 54 | |||
| 55 | * srecode/args.el (srecode-semantic-handle-:project): New argument | ||
| 56 | handler. Provide variable values if not in an EDE project. | ||
| 57 | |||
| 58 | * srecode/srt-mode.el (srecode-template-mode): Fix typo on srecode | ||
| 59 | name. | ||
| 60 | |||
| 61 | * srecode/cpp.el (srecode-semantic-handle-:c): Replace all | ||
| 62 | characters in FILENAME_SYMBOL that aren't valid CPP symbol chars. | ||
| 63 | |||
| 64 | * srecode/map.el (srecode-map-validate-file-for-mode): Force | ||
| 65 | semantic to load if it is not active in the template being added | ||
| 66 | to the map. | ||
| 67 | |||
| 68 | * srecode/srt.el: Add local variables for setting the autoload | ||
| 69 | file name. | ||
| 70 | (srecode-semantic-handle-:srt): New autoload cookie | ||
| 71 | |||
| 72 | * ede.el (ede-apply-preprocessor-map): Apply map to | ||
| 73 | `semantic-lex-spp-project-macro-symbol-obarray' instead of the | ||
| 74 | system one. Add require for semantic. | ||
| 75 | |||
| 76 | * ede/proj-elisp.el (ede-update-version-in-source): In case a file | ||
| 77 | has both a version variable and a Version: comment, always use | ||
| 78 | `call-next-method'. | ||
| 79 | |||
| 80 | * ede/cpp-root.el (ede-set-project-variables): Deleted. | ||
| 81 | `ede-preprocessor-map' does the job this function was attempting | ||
| 82 | to do with :spp-table. | ||
| 83 | (ede-preprocessor-map): Update file tests to provide better | ||
| 84 | messages. Do not try to get symbols from a file that is the file | ||
| 85 | in the current buffer. | ||
| 86 | |||
| 87 | * ede/base.el (ede-project-placeholder): Add more documentation to | ||
| 88 | :file slot. | ||
| 89 | (ede-load-cache): Use `insert-file-contents' instead of | ||
| 90 | `find-file-noselect' in order to avoid activating other tools. | ||
| 91 | |||
| 92 | 2013-03-21 David Engster <deng@randomsample.de> | ||
| 93 | |||
| 94 | * semantic/bovine/c.el (semantic-get-local-variables): Also add a | ||
| 95 | new variable 'this' if we are in an inline member function. For | ||
| 96 | detecting this, we check overlays at point if there is a class | ||
| 97 | spanning the current function. Also, the variable 'this' has to | ||
| 98 | be a pointer. | ||
| 99 | |||
| 100 | * semantic/bovine/gcc.el (semantic-gcc-setup): Fail gracefully | ||
| 101 | when querying g++ for defines returns an error. | ||
| 102 | |||
| 103 | * srecode/srt-mode.el: | ||
| 104 | * srecode/compile.el: | ||
| 105 | * semantic/elp.el: | ||
| 106 | * semantic/db-el.el: | ||
| 107 | * semantic/complete.el: | ||
| 108 | * ede.el: | ||
| 109 | * cogre.el: | ||
| 110 | * srecode/table.el: | ||
| 111 | * srecode/mode.el: | ||
| 112 | * srecode/insert.el: | ||
| 113 | * srecode/compile.el: | ||
| 114 | * semantic/decorate/include.el: | ||
| 115 | * semantic/db.el: | ||
| 116 | * semantic/adebug.el: | ||
| 117 | * ede/auto.el: | ||
| 118 | * srecode/dictionary.el: | ||
| 119 | * semantic/ede-grammar.el: | ||
| 120 | * semantic/db.el: | ||
| 121 | * semantic/db-find.el: | ||
| 122 | * semantic/db-file.el: | ||
| 123 | * semantic/complete.el: | ||
| 124 | * semantic/bovine/c.el: | ||
| 125 | * semantic/analyze.el: | ||
| 126 | * ede/util.el: | ||
| 127 | * ede/proj.el: | ||
| 128 | * ede/proj-elisp.el: | ||
| 129 | * ede/pconf.el: | ||
| 130 | * ede/locate.el: | ||
| 131 | * ede.el: Adapt to EIEIO namespace cleanup: Rename `object-name' | ||
| 132 | to `eieio-object-name', `object-set-name-string' to | ||
| 133 | `eieio-object-set-name-string', `object-class' to | ||
| 134 | `eieio-object-class', `class-parent' to `eieio-class-parent', | ||
| 135 | `class-parents' to `eieio-class-parents', `class-children' to | ||
| 136 | `eieio-class-children', `object-name-string' to | ||
| 137 | `eieio-object-name-string', `object-class-fast' to | ||
| 138 | `eieio--object-class'. Also replace direct access with new | ||
| 139 | accessor functions. | ||
| 140 | |||
| 141 | 2013-03-21 Tomasz Gajewski <tomga@wp.pl> (tiny change) | ||
| 142 | |||
| 143 | * ede/cpp-root.el (ede-project-autoload, initialize-instance): Fix | ||
| 144 | EDE file symbol to match rename. Fix ede-cpp-root symbol to | ||
| 145 | include -project in name. | ||
| 146 | |||
| 147 | 2013-03-21 Alex Ott <alexott@gmail.com> | ||
| 148 | |||
| 149 | * cedet-files.el (cedet-files-list-recursively): New. Recursively | ||
| 150 | find files whose names are matching to given regex | ||
| 151 | |||
| 152 | * ede.el (ede-current-project): Rewrite to avoid imperative style. | ||
| 153 | |||
| 154 | * ede/files.el (ede-find-file): Simplify code. | ||
| 155 | |||
| 156 | * ede/base.el (ede-normalize-file/directory): Add function to | ||
| 157 | normalize :file or :directory slots if they are missing. | ||
| 158 | |||
| 159 | * ede/cpp-root.el (ede-cpp-root-project): Add compile-command | ||
| 160 | slot. | ||
| 161 | (project-compile-project): Compiles project using value specified | ||
| 162 | in :compule-command slot or in compile-command local variable. | ||
| 163 | Value of slot or local variable could be string or function that | ||
| 164 | receives project and should return string that will be invoked as | ||
| 165 | command. | ||
| 166 | (project-compile-target): Invokes compilation of whole project | ||
| 167 | |||
| 168 | * ede/files.el (ede-find-project-root): New function to | ||
| 169 | find root of project that contains specific file. | ||
| 170 | (ede-files-find-existing): New function which checks presence of | ||
| 171 | given directory in the list of registered projects. | ||
| 172 | |||
| 1 | 2013-03-04 Paul Eggert <eggert@cs.ucla.edu> | 173 | 2013-03-04 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 174 | ||
| 3 | * semantic/wisent/wisent.el (wisent): Stick to ASCII in the ASCII art. | 175 | * semantic/wisent/wisent.el (wisent): Stick to ASCII in the ASCII art. |
diff --git a/lisp/cedet/cedet-files.el b/lisp/cedet/cedet-files.el index 36561090bd2..236040befb8 100644 --- a/lisp/cedet/cedet-files.el +++ b/lisp/cedet/cedet-files.el | |||
| @@ -88,6 +88,24 @@ specific conversions during tests." | |||
| 88 | (setq file (concat "//" (substring file 1))))) | 88 | (setq file (concat "//" (substring file 1))))) |
| 89 | file)) | 89 | file)) |
| 90 | 90 | ||
| 91 | (defun cedet-files-list-recursively (dir re) | ||
| 92 | "Returns list of files in directory matching to given regex" | ||
| 93 | (when (file-accessible-directory-p dir) | ||
| 94 | (let ((files (directory-files dir t)) | ||
| 95 | matched) | ||
| 96 | (dolist (file files matched) | ||
| 97 | (let ((fname (file-name-nondirectory file))) | ||
| 98 | (cond | ||
| 99 | ((or (string= fname ".") | ||
| 100 | (string= fname "..")) nil) | ||
| 101 | ((and (file-regular-p file) | ||
| 102 | (string-match re fname)) | ||
| 103 | (setq matched (cons file matched))) | ||
| 104 | ((file-directory-p file) | ||
| 105 | (let ((tfiles (cedet-files-list-recursively file re))) | ||
| 106 | (when tfiles (setq matched (append matched tfiles))))))))))) | ||
| 107 | |||
| 108 | |||
| 91 | (provide 'cedet-files) | 109 | (provide 'cedet-files) |
| 92 | 110 | ||
| 93 | ;;; cedet-files.el ends here | 111 | ;;; cedet-files.el ends here |
diff --git a/lisp/cedet/ede.el b/lisp/cedet/ede.el index 3867f628b93..5fecd8b994f 100644 --- a/lisp/cedet/ede.el +++ b/lisp/cedet/ede.el | |||
| @@ -330,14 +330,14 @@ Argument MENU-DEF is the menu definition to use." | |||
| 330 | (easy-menu-create-menu | 330 | (easy-menu-create-menu |
| 331 | "Project Forms" | 331 | "Project Forms" |
| 332 | (let* ((obj (ede-current-project)) | 332 | (let* ((obj (ede-current-project)) |
| 333 | (class (if obj (object-class obj))) | 333 | (class (if obj (eieio-object-class obj))) |
| 334 | (menu nil)) | 334 | (menu nil)) |
| 335 | (condition-case err | 335 | (condition-case err |
| 336 | (progn | 336 | (progn |
| 337 | (while (and class (slot-exists-p class 'menu)) | 337 | (while (and class (slot-exists-p class 'menu)) |
| 338 | ;;(message "Looking at class %S" class) | 338 | ;;(message "Looking at class %S" class) |
| 339 | (setq menu (append menu (oref class menu)) | 339 | (setq menu (append menu (oref class menu)) |
| 340 | class (class-parent class)) | 340 | class (eieio-class-parent class)) |
| 341 | (if (listp class) (setq class (car class)))) | 341 | (if (listp class) (setq class (car class)))) |
| 342 | (append | 342 | (append |
| 343 | '( [ "Add Target" ede-new-target (ede-current-project) ] | 343 | '( [ "Add Target" ede-new-target (ede-current-project) ] |
| @@ -382,7 +382,7 @@ but can also be used interactively." | |||
| 382 | (oref proj configuration-default))))) | 382 | (oref proj configuration-default))))) |
| 383 | (oset (ede-current-project) configuration-default newconfig) | 383 | (oset (ede-current-project) configuration-default newconfig) |
| 384 | (message "%s will now build in %s mode." | 384 | (message "%s will now build in %s mode." |
| 385 | (object-name (ede-current-project)) | 385 | (eieio-object-name (ede-current-project)) |
| 386 | newconfig)) | 386 | newconfig)) |
| 387 | 387 | ||
| 388 | (defun ede-customize-forms-menu (menu-def) | 388 | (defun ede-customize-forms-menu (menu-def) |
| @@ -727,7 +727,7 @@ Optional argument NAME is the name to give this project." | |||
| 727 | 'name | 727 | 'name |
| 728 | (let* ((l ede-project-class-files) | 728 | (let* ((l ede-project-class-files) |
| 729 | (cp (ede-current-project)) | 729 | (cp (ede-current-project)) |
| 730 | (cs (when cp (object-class cp))) | 730 | (cs (when cp (eieio-object-class cp))) |
| 731 | (r nil)) | 731 | (r nil)) |
| 732 | (while l | 732 | (while l |
| 733 | (if cs | 733 | (if cs |
| @@ -779,7 +779,7 @@ Optional argument NAME is the name to give this project." | |||
| 779 | :targets nil))) | 779 | :targets nil))) |
| 780 | (inits (oref obj initializers))) | 780 | (inits (oref obj initializers))) |
| 781 | ;; Force the name to match for new objects. | 781 | ;; Force the name to match for new objects. |
| 782 | (object-set-name-string nobj (oref nobj :name)) | 782 | (eieio-object-set-name-string nobj (oref nobj :name)) |
| 783 | ;; Handle init args. | 783 | ;; Handle init args. |
| 784 | (while inits | 784 | (while inits |
| 785 | (eieio-oset nobj (car inits) (car (cdr inits))) | 785 | (eieio-oset nobj (car inits) (car (cdr inits))) |
| @@ -885,7 +885,7 @@ a string \"y\" or \"n\", which answers the y/n question done interactively." | |||
| 885 | (when (not ede-object) | 885 | (when (not ede-object) |
| 886 | (error "Can't add %s to target %s: Wrong file type" | 886 | (error "Can't add %s to target %s: Wrong file type" |
| 887 | (file-name-nondirectory (buffer-file-name)) | 887 | (file-name-nondirectory (buffer-file-name)) |
| 888 | (object-name target))) | 888 | (eieio-object-name target))) |
| 889 | (ede-apply-target-options)) | 889 | (ede-apply-target-options)) |
| 890 | 890 | ||
| 891 | (defun ede-remove-file (&optional force) | 891 | (defun ede-remove-file (&optional force) |
| @@ -979,12 +979,12 @@ Argument PROMPT is the prompt to use when querying the user for a target." | |||
| 979 | (defmethod project-add-file ((ot ede-target) file) | 979 | (defmethod project-add-file ((ot ede-target) file) |
| 980 | "Add the current buffer into project project target OT. | 980 | "Add the current buffer into project project target OT. |
| 981 | Argument FILE is the file to add." | 981 | Argument FILE is the file to add." |
| 982 | (error "add-file not supported by %s" (object-name ot))) | 982 | (error "add-file not supported by %s" (eieio-object-name ot))) |
| 983 | 983 | ||
| 984 | (defmethod project-remove-file ((ot ede-target) fnnd) | 984 | (defmethod project-remove-file ((ot ede-target) fnnd) |
| 985 | "Remove the current buffer from project target OT. | 985 | "Remove the current buffer from project target OT. |
| 986 | Argument FNND is an argument." | 986 | Argument FNND is an argument." |
| 987 | (error "remove-file not supported by %s" (object-name ot))) | 987 | (error "remove-file not supported by %s" (eieio-object-name ot))) |
| 988 | 988 | ||
| 989 | (defmethod project-edit-file-target ((ot ede-target)) | 989 | (defmethod project-edit-file-target ((ot ede-target)) |
| 990 | "Edit the target OT associated with this file." | 990 | "Edit the target OT associated with this file." |
| @@ -992,45 +992,45 @@ Argument FNND is an argument." | |||
| 992 | 992 | ||
| 993 | (defmethod project-new-target ((proj ede-project) &rest args) | 993 | (defmethod project-new-target ((proj ede-project) &rest args) |
| 994 | "Create a new target. It is up to the project PROJ to get the name." | 994 | "Create a new target. It is up to the project PROJ to get the name." |
| 995 | (error "new-target not supported by %s" (object-name proj))) | 995 | (error "new-target not supported by %s" (eieio-object-name proj))) |
| 996 | 996 | ||
| 997 | (defmethod project-new-target-custom ((proj ede-project)) | 997 | (defmethod project-new-target-custom ((proj ede-project)) |
| 998 | "Create a new target. It is up to the project PROJ to get the name." | 998 | "Create a new target. It is up to the project PROJ to get the name." |
| 999 | (error "New-target-custom not supported by %s" (object-name proj))) | 999 | (error "New-target-custom not supported by %s" (eieio-object-name proj))) |
| 1000 | 1000 | ||
| 1001 | (defmethod project-delete-target ((ot ede-target)) | 1001 | (defmethod project-delete-target ((ot ede-target)) |
| 1002 | "Delete the current target OT from its parent project." | 1002 | "Delete the current target OT from its parent project." |
| 1003 | (error "add-file not supported by %s" (object-name ot))) | 1003 | (error "add-file not supported by %s" (eieio-object-name ot))) |
| 1004 | 1004 | ||
| 1005 | (defmethod project-compile-project ((obj ede-project) &optional command) | 1005 | (defmethod project-compile-project ((obj ede-project) &optional command) |
| 1006 | "Compile the entire current project OBJ. | 1006 | "Compile the entire current project OBJ. |
| 1007 | Argument COMMAND is the command to use when compiling." | 1007 | Argument COMMAND is the command to use when compiling." |
| 1008 | (error "compile-project not supported by %s" (object-name obj))) | 1008 | (error "compile-project not supported by %s" (eieio-object-name obj))) |
| 1009 | 1009 | ||
| 1010 | (defmethod project-compile-target ((obj ede-target) &optional command) | 1010 | (defmethod project-compile-target ((obj ede-target) &optional command) |
| 1011 | "Compile the current target OBJ. | 1011 | "Compile the current target OBJ. |
| 1012 | Argument COMMAND is the command to use for compiling the target." | 1012 | Argument COMMAND is the command to use for compiling the target." |
| 1013 | (error "compile-target not supported by %s" (object-name obj))) | 1013 | (error "compile-target not supported by %s" (eieio-object-name obj))) |
| 1014 | 1014 | ||
| 1015 | (defmethod project-debug-target ((obj ede-target)) | 1015 | (defmethod project-debug-target ((obj ede-target)) |
| 1016 | "Run the current project target OBJ in a debugger." | 1016 | "Run the current project target OBJ in a debugger." |
| 1017 | (error "debug-target not supported by %s" (object-name obj))) | 1017 | (error "debug-target not supported by %s" (eieio-object-name obj))) |
| 1018 | 1018 | ||
| 1019 | (defmethod project-run-target ((obj ede-target)) | 1019 | (defmethod project-run-target ((obj ede-target)) |
| 1020 | "Run the current project target OBJ." | 1020 | "Run the current project target OBJ." |
| 1021 | (error "run-target not supported by %s" (object-name obj))) | 1021 | (error "run-target not supported by %s" (eieio-object-name obj))) |
| 1022 | 1022 | ||
| 1023 | (defmethod project-make-dist ((this ede-project)) | 1023 | (defmethod project-make-dist ((this ede-project)) |
| 1024 | "Build a distribution for the project based on THIS project." | 1024 | "Build a distribution for the project based on THIS project." |
| 1025 | (error "Make-dist not supported by %s" (object-name this))) | 1025 | (error "Make-dist not supported by %s" (eieio-object-name this))) |
| 1026 | 1026 | ||
| 1027 | (defmethod project-dist-files ((this ede-project)) | 1027 | (defmethod project-dist-files ((this ede-project)) |
| 1028 | "Return a list of files that constitute a distribution of THIS project." | 1028 | "Return a list of files that constitute a distribution of THIS project." |
| 1029 | (error "Dist-files is not supported by %s" (object-name this))) | 1029 | (error "Dist-files is not supported by %s" (eieio-object-name this))) |
| 1030 | 1030 | ||
| 1031 | (defmethod project-rescan ((this ede-project)) | 1031 | (defmethod project-rescan ((this ede-project)) |
| 1032 | "Rescan the EDE project THIS." | 1032 | "Rescan the EDE project THIS." |
| 1033 | (error "Rescanning a project is not supported by %s" (object-name this))) | 1033 | (error "Rescanning a project is not supported by %s" (eieio-object-name this))) |
| 1034 | 1034 | ||
| 1035 | (defun ede-ecb-project-paths () | 1035 | (defun ede-ecb-project-paths () |
| 1036 | "Return a list of all paths for all active EDE projects. | 1036 | "Return a list of all paths for all active EDE projects. |
| @@ -1157,18 +1157,15 @@ Optional argument OBJ is an object to find the parent of." | |||
| 1157 | (defun ede-current-project (&optional dir) | 1157 | (defun ede-current-project (&optional dir) |
| 1158 | "Return the current project file. | 1158 | "Return the current project file. |
| 1159 | If optional DIR is provided, get the project for DIR instead." | 1159 | If optional DIR is provided, get the project for DIR instead." |
| 1160 | (let ((ans nil)) | 1160 | ;; If it matches the current directory, do we have a pre-existing project? |
| 1161 | ;; If it matches the current directory, do we have a pre-existing project? | 1161 | (let ((proj (when (and (or (not dir) (string= dir default-directory)) |
| 1162 | (when (and (or (not dir) (string= dir default-directory)) | 1162 | ede-object-project) |
| 1163 | ede-object-project) | 1163 | ede-object-project))) |
| 1164 | (setq ans ede-object-project) | ||
| 1165 | ) | ||
| 1166 | ;; No current project. | 1164 | ;; No current project. |
| 1167 | (when (not ans) | 1165 | (if proj |
| 1166 | proj | ||
| 1168 | (let* ((ldir (or dir default-directory))) | 1167 | (let* ((ldir (or dir default-directory))) |
| 1169 | (setq ans (ede-directory-get-open-project ldir)))) | 1168 | (ede-directory-get-open-project ldir))))) |
| 1170 | ;; Return what we found. | ||
| 1171 | ans)) | ||
| 1172 | 1169 | ||
| 1173 | (defun ede-buffer-object (&optional buffer projsym) | 1170 | (defun ede-buffer-object (&optional buffer projsym) |
| 1174 | "Return the target object for BUFFER. | 1171 | "Return the target object for BUFFER. |
| @@ -1372,20 +1369,24 @@ and <root>/doc for doc sources." | |||
| 1372 | ;; C/C++ | 1369 | ;; C/C++ |
| 1373 | (defun ede-apply-preprocessor-map () | 1370 | (defun ede-apply-preprocessor-map () |
| 1374 | "Apply preprocessor tables onto the current buffer." | 1371 | "Apply preprocessor tables onto the current buffer." |
| 1372 | ;; TODO - what if semantic-mode isn't enabled? | ||
| 1373 | ;; what if we never want to load a C mode? Does this matter? | ||
| 1374 | ;; Note: This require is needed for the case where EDE ends up | ||
| 1375 | ;; in the hook order before Semantic based hooks. | ||
| 1376 | (require 'semantic/lex-spp) | ||
| 1375 | (when (and ede-object | 1377 | (when (and ede-object |
| 1376 | (boundp 'semantic-lex-spp-macro-symbol-obarray) | 1378 | (boundp 'semantic-lex-spp-project-macro-symbol-obarray)) |
| 1377 | semantic-lex-spp-macro-symbol-obarray) | ||
| 1378 | (let* ((objs ede-object) | 1379 | (let* ((objs ede-object) |
| 1379 | (map (ede-preprocessor-map (if (consp objs) | 1380 | (map (ede-preprocessor-map (if (consp objs) |
| 1380 | (car objs) | 1381 | (car objs) |
| 1381 | objs)))) | 1382 | objs)))) |
| 1382 | (when map | 1383 | (when map |
| 1383 | ;; We can't do a require for the below symbol. | 1384 | ;; We can't do a require for the below symbol. |
| 1384 | (setq semantic-lex-spp-macro-symbol-obarray | 1385 | (setq semantic-lex-spp-project-macro-symbol-obarray |
| 1385 | (semantic-lex-make-spp-table map))) | 1386 | (semantic-lex-make-spp-table map))) |
| 1386 | (when (consp objs) | 1387 | (when (consp objs) |
| 1387 | (message "Choosing preprocessor syms for project %s" | 1388 | (message "Choosing preprocessor syms for project %s" |
| 1388 | (object-name (car objs))))))) | 1389 | (eieio-object-name (car objs))))))) |
| 1389 | 1390 | ||
| 1390 | (defmethod ede-system-include-path ((this ede-project)) | 1391 | (defmethod ede-system-include-path ((this ede-project)) |
| 1391 | "Get the system include path used by project THIS." | 1392 | "Get the system include path used by project THIS." |
diff --git a/lisp/cedet/ede/auto.el b/lisp/cedet/ede/auto.el index 22fce372e24..c0baf0fc8f8 100644 --- a/lisp/cedet/ede/auto.el +++ b/lisp/cedet/ede/auto.el | |||
| @@ -199,8 +199,8 @@ added. Possible values are: | |||
| 199 | front of the list so more generic projects don't get priority." | 199 | front of the list so more generic projects don't get priority." |
| 200 | ;; First, can we identify PROJAUTO as already in the list? If so, replace. | 200 | ;; First, can we identify PROJAUTO as already in the list? If so, replace. |
| 201 | (let ((projlist ede-project-class-files) | 201 | (let ((projlist ede-project-class-files) |
| 202 | (projname (object-name-string projauto))) | 202 | (projname (eieio-object-name-string projauto))) |
| 203 | (while (and projlist (not (string= (object-name-string (car projlist)) projname))) | 203 | (while (and projlist (not (string= (eieio-object-name-string (car projlist)) projname))) |
| 204 | (setq projlist (cdr projlist))) | 204 | (setq projlist (cdr projlist))) |
| 205 | 205 | ||
| 206 | (if projlist | 206 | (if projlist |
diff --git a/lisp/cedet/ede/base.el b/lisp/cedet/ede/base.el index 1368ea348a0..5302ac3207a 100644 --- a/lisp/cedet/ede/base.el +++ b/lisp/cedet/ede/base.el | |||
| @@ -135,7 +135,9 @@ other desired outcome.") | |||
| 135 | (dirinode :documentation "The inode id for :directory.") | 135 | (dirinode :documentation "The inode id for :directory.") |
| 136 | (file :type string | 136 | (file :type string |
| 137 | :initarg :file | 137 | :initarg :file |
| 138 | :documentation "File name where this project is stored.") | 138 | :documentation "The File uniquely tagging this project instance. |
| 139 | For some project types, this will be the file that stores the project configuration. | ||
| 140 | In other projects types, this file is merely a unique identifier to this type of project.") | ||
| 139 | (rootproject ; :initarg - no initarg, don't save this slot! | 141 | (rootproject ; :initarg - no initarg, don't save this slot! |
| 140 | :initform nil | 142 | :initform nil |
| 141 | :type (or null ede-project-placeholder-child) | 143 | :type (or null ede-project-placeholder-child) |
| @@ -350,12 +352,12 @@ All specific project types must derive from this project." | |||
| 350 | (defun ede-load-cache () | 352 | (defun ede-load-cache () |
| 351 | "Load the cache of EDE projects." | 353 | "Load the cache of EDE projects." |
| 352 | (save-excursion | 354 | (save-excursion |
| 353 | (let ((cachebuffer nil)) | 355 | (let ((cachebuffer (get-buffer-create "*ede cache*"))) |
| 354 | (condition-case nil | 356 | (condition-case nil |
| 355 | (progn | 357 | (with-current-buffer cachebuffer |
| 356 | (setq cachebuffer | 358 | (erase-buffer) |
| 357 | (find-file-noselect ede-project-placeholder-cache-file t)) | 359 | (when (file-exists-p ede-project-placeholder-cache-file) |
| 358 | (set-buffer cachebuffer) | 360 | (insert-file-contents ede-project-placeholder-cache-file)) |
| 359 | (goto-char (point-min)) | 361 | (goto-char (point-min)) |
| 360 | (let ((c (read (current-buffer))) | 362 | (let ((c (read (current-buffer))) |
| 361 | (new nil) | 363 | (new nil) |
| @@ -610,6 +612,28 @@ instead of the current project." | |||
| 610 | cp))))) | 612 | cp))))) |
| 611 | 613 | ||
| 612 | 614 | ||
| 615 | ;;; Utility functions | ||
| 616 | ;; | ||
| 617 | |||
| 618 | (defun ede-normalize-file/directory (this project-file-name) | ||
| 619 | "Fills :directory or :file slots if they're missing in project THIS. | ||
| 620 | The other slot will be used to calculate values. | ||
| 621 | PROJECT-FILE-NAME is a name of project file (short name, like 'pom.xml', etc." | ||
| 622 | (when (and (or (not (slot-boundp this :file)) | ||
| 623 | (not (oref this :file))) | ||
| 624 | (slot-boundp this :directory) | ||
| 625 | (oref this :directory)) | ||
| 626 | (oset this :file (expand-file-name project-file-name (oref this :directory)))) | ||
| 627 | (when (and (or (not (slot-boundp this :directory)) | ||
| 628 | (not (oref this :directory))) | ||
| 629 | (slot-boundp this :file) | ||
| 630 | (oref this :file)) | ||
| 631 | (oset this :directory (file-name-directory (oref this :file)))) | ||
| 632 | ) | ||
| 633 | |||
| 634 | |||
| 635 | |||
| 636 | |||
| 613 | ;;; Hooks & Autoloads | 637 | ;;; Hooks & Autoloads |
| 614 | ;; | 638 | ;; |
| 615 | ;; These let us watch various activities, and respond appropriately. | 639 | ;; These let us watch various activities, and respond appropriately. |
diff --git a/lisp/cedet/ede/cpp-root.el b/lisp/cedet/ede/cpp-root.el index d31ede723cc..cf2009ced30 100644 --- a/lisp/cedet/ede/cpp-root.el +++ b/lisp/cedet/ede/cpp-root.el | |||
| @@ -242,11 +242,11 @@ ROOTPROJ is nil, since there is only one project." | |||
| 242 | (ede-add-project-autoload | 242 | (ede-add-project-autoload |
| 243 | (ede-project-autoload "cpp-root" | 243 | (ede-project-autoload "cpp-root" |
| 244 | :name "CPP ROOT" | 244 | :name "CPP ROOT" |
| 245 | :file 'ede-cpp-root | 245 | :file 'ede/cpp-root |
| 246 | :proj-file 'ede-cpp-root-project-file-for-dir | 246 | :proj-file 'ede-cpp-root-project-file-for-dir |
| 247 | :proj-root 'ede-cpp-root-project-root | 247 | :proj-root 'ede-cpp-root-project-root |
| 248 | :load-type 'ede-cpp-root-load | 248 | :load-type 'ede-cpp-root-load |
| 249 | :class-sym 'ede-cpp-root | 249 | :class-sym 'ede-cpp-root-project |
| 250 | :new-p nil | 250 | :new-p nil |
| 251 | :safe-p t) | 251 | :safe-p t) |
| 252 | ;; When a user creates one of these, it should override any other project | 252 | ;; When a user creates one of these, it should override any other project |
| @@ -272,10 +272,12 @@ ROOTPROJ is nil, since there is only one project." | |||
| 272 | ;; level include paths, and PreProcessor macro tables. | 272 | ;; level include paths, and PreProcessor macro tables. |
| 273 | 273 | ||
| 274 | (defclass ede-cpp-root-target (ede-target) | 274 | (defclass ede-cpp-root-target (ede-target) |
| 275 | () | 275 | ((project :initform nil |
| 276 | :initarg :project)) | ||
| 276 | "EDE cpp-root project target. | 277 | "EDE cpp-root project target. |
| 277 | All directories need at least one target.") | 278 | All directories need at least one target.") |
| 278 | 279 | ||
| 280 | ;;;###autoload | ||
| 279 | (defclass ede-cpp-root-project (ede-project eieio-instance-tracker) | 281 | (defclass ede-cpp-root-project (ede-project eieio-instance-tracker) |
| 280 | ((tracking-symbol :initform 'ede-cpp-root-project-list) | 282 | ((tracking-symbol :initform 'ede-cpp-root-project-list) |
| 281 | (include-path :initarg :include-path | 283 | (include-path :initarg :include-path |
| @@ -339,6 +341,15 @@ The function symbol must take two arguments: | |||
| 339 | It should return the fully qualified file name passed in from NAME. If that file does not | 341 | It should return the fully qualified file name passed in from NAME. If that file does not |
| 340 | exist, it should return nil." | 342 | exist, it should return nil." |
| 341 | ) | 343 | ) |
| 344 | (compile-command :initarg :compile-command | ||
| 345 | :initform nil | ||
| 346 | :type (or null string function) | ||
| 347 | :documentation | ||
| 348 | "Compilation command that will be used for this project. | ||
| 349 | It could be string or function that will accept proj argument and should return string. | ||
| 350 | The string will be passed to 'compuile' function that will be issued in root | ||
| 351 | directory of project." | ||
| 352 | ) | ||
| 342 | ) | 353 | ) |
| 343 | "EDE cpp-root project class. | 354 | "EDE cpp-root project class. |
| 344 | Each directory needs a project file to control it.") | 355 | Each directory needs a project file to control it.") |
| @@ -366,7 +377,7 @@ Each directory needs a project file to control it.") | |||
| 366 | (when (or (not (file-exists-p f)) | 377 | (when (or (not (file-exists-p f)) |
| 367 | (file-directory-p f)) | 378 | (file-directory-p f)) |
| 368 | (delete-instance this) | 379 | (delete-instance this) |
| 369 | (error ":file for ede-cpp-root must be a file")) | 380 | (error ":file for ede-cpp-root-project must be a file")) |
| 370 | (oset this :file f) | 381 | (oset this :file f) |
| 371 | (oset this :directory (file-name-directory f)) | 382 | (oset this :directory (file-name-directory f)) |
| 372 | (ede-project-directory-remove-hash (file-name-directory f)) | 383 | (ede-project-directory-remove-hash (file-name-directory f)) |
| @@ -404,7 +415,8 @@ If one doesn't exist, create a new one for this directory." | |||
| 404 | :name (file-name-nondirectory | 415 | :name (file-name-nondirectory |
| 405 | (directory-file-name dir)) | 416 | (directory-file-name dir)) |
| 406 | :path dir | 417 | :path dir |
| 407 | :source nil)) | 418 | :source nil |
| 419 | :project proj)) | ||
| 408 | (object-add-to-list proj :targets ans) | 420 | (object-add-to-list proj :targets ans) |
| 409 | ) | 421 | ) |
| 410 | ans)) | 422 | ans)) |
| @@ -481,15 +493,6 @@ This is for project include paths and spp source files." | |||
| 481 | 493 | ||
| 482 | filename)) | 494 | filename)) |
| 483 | 495 | ||
| 484 | (defmethod ede-set-project-variables ((project ede-cpp-root-project) &optional buffer) | ||
| 485 | "Set variables local to PROJECT in BUFFER. | ||
| 486 | Also set up the lexical preprocessor map." | ||
| 487 | (call-next-method) | ||
| 488 | (when (and (featurep 'semantic/bovine/c) (featurep 'semantic/lex-spp)) | ||
| 489 | (setq semantic-lex-spp-project-macro-symbol-obarray | ||
| 490 | (semantic-lex-make-spp-table (oref project spp-table))) | ||
| 491 | )) | ||
| 492 | |||
| 493 | (defmethod ede-system-include-path ((this ede-cpp-root-project)) | 496 | (defmethod ede-system-include-path ((this ede-cpp-root-project)) |
| 494 | "Get the system include path used by project THIS." | 497 | "Get the system include path used by project THIS." |
| 495 | (oref this system-include-path)) | 498 | (oref this system-include-path)) |
| @@ -506,11 +509,18 @@ Also set up the lexical preprocessor map." | |||
| 506 | (table (when expfile | 509 | (table (when expfile |
| 507 | (semanticdb-file-table-object expfile))) | 510 | (semanticdb-file-table-object expfile))) |
| 508 | ) | 511 | ) |
| 509 | (if (not table) | 512 | (cond |
| 510 | (message "Cannot find file %s in project." F) | 513 | ((not (file-exists-p expfile)) |
| 514 | (message "Cannot find file %s in project." F)) | ||
| 515 | ((string= expfile (buffer-file-name)) | ||
| 516 | ;; Don't include this file in it's own spp table. | ||
| 517 | ) | ||
| 518 | ((not table) | ||
| 519 | (message "No db table available for %s." expfile)) | ||
| 520 | (t | ||
| 511 | (when (semanticdb-needs-refresh-p table) | 521 | (when (semanticdb-needs-refresh-p table) |
| 512 | (semanticdb-refresh-table table)) | 522 | (semanticdb-refresh-table table)) |
| 513 | (setq spp (append spp (oref table lexical-table)))))) | 523 | (setq spp (append spp (oref table lexical-table))))))) |
| 514 | (oref this spp-files)) | 524 | (oref this spp-files)) |
| 515 | spp)) | 525 | spp)) |
| 516 | 526 | ||
| @@ -522,6 +532,29 @@ Also set up the lexical preprocessor map." | |||
| 522 | "Get the pre-processor map for project THIS." | 532 | "Get the pre-processor map for project THIS." |
| 523 | (ede-preprocessor-map (ede-target-parent this))) | 533 | (ede-preprocessor-map (ede-target-parent this))) |
| 524 | 534 | ||
| 535 | (defmethod project-compile-project ((proj ede-cpp-root-project) &optional command) | ||
| 536 | "Compile the entire current project PROJ. | ||
| 537 | Argument COMMAND is the command to use when compiling." | ||
| 538 | ;; we need to be in the proj root dir for this to work | ||
| 539 | (let* ((cmd (oref proj :compile-command)) | ||
| 540 | (ov (oref proj :local-variables)) | ||
| 541 | (lcmd (when ov (cdr (assoc 'compile-command ov)))) | ||
| 542 | (cmd-str (cond | ||
| 543 | ((stringp cmd) cmd) | ||
| 544 | ((functionp cmd) (funcall cmd proj)) | ||
| 545 | ((stringp lcmd) lcmd) | ||
| 546 | ((functionp lcmd) (funcall lcmd proj))))) | ||
| 547 | (when cmd-str | ||
| 548 | (let ((default-directory (ede-project-root-directory proj))) | ||
| 549 | (compile cmd-str))))) | ||
| 550 | |||
| 551 | (defmethod project-compile-target ((obj ede-cpp-root-target) &optional command) | ||
| 552 | "Compile the current target OBJ. | ||
| 553 | Argument COMMAND is the command to use for compiling the target." | ||
| 554 | (when (oref obj :project) | ||
| 555 | (project-compile-project (oref obj :project) command))) | ||
| 556 | |||
| 557 | |||
| 525 | ;;; Quick Hack | 558 | ;;; Quick Hack |
| 526 | (defun ede-create-lots-of-projects-under-dir (dir projfile &rest attributes) | 559 | (defun ede-create-lots-of-projects-under-dir (dir projfile &rest attributes) |
| 527 | "Create a bunch of projects under directory DIR. | 560 | "Create a bunch of projects under directory DIR. |
diff --git a/lisp/cedet/ede/emacs.el b/lisp/cedet/ede/emacs.el index 925730c8121..f5a85f4a01b 100644 --- a/lisp/cedet/ede/emacs.el +++ b/lisp/cedet/ede/emacs.el | |||
| @@ -59,7 +59,7 @@ DIR is the directory to search from." | |||
| 59 | "Get the root directory for DIR." | 59 | "Get the root directory for DIR." |
| 60 | (when (not dir) (setq dir default-directory)) | 60 | (when (not dir) (setq dir default-directory)) |
| 61 | (let ((case-fold-search t) | 61 | (let ((case-fold-search t) |
| 62 | (proj (ede-emacs-file-existing dir))) | 62 | (proj (ede-files-find-existing dir ede-emacs-project-list))) |
| 63 | (if proj | 63 | (if proj |
| 64 | (ede-up-directory (file-name-directory | 64 | (ede-up-directory (file-name-directory |
| 65 | (oref proj :file))) | 65 | (oref proj :file))) |
| @@ -134,7 +134,7 @@ m4_define(\\[SXEM4CS_BETA_VERSION\\], \\[\\([0-9]+\\)\\])") | |||
| 134 | Return nil if there isn't one. | 134 | Return nil if there isn't one. |
| 135 | Argument DIR is the directory it is created for. | 135 | Argument DIR is the directory it is created for. |
| 136 | ROOTPROJ is nil, since there is only one project." | 136 | ROOTPROJ is nil, since there is only one project." |
| 137 | (or (ede-emacs-file-existing dir) | 137 | (or (ede-files-find-existing dir ede-emacs-project-list) |
| 138 | ;; Doesn't already exist, so let's make one. | 138 | ;; Doesn't already exist, so let's make one. |
| 139 | (let* ((vertuple (ede-emacs-version dir)) | 139 | (let* ((vertuple (ede-emacs-version dir)) |
| 140 | (proj (ede-emacs-project | 140 | (proj (ede-emacs-project |
diff --git a/lisp/cedet/ede/files.el b/lisp/cedet/ede/files.el index 015f4fd9663..91433add7b0 100644 --- a/lisp/cedet/ede/files.el +++ b/lisp/cedet/ede/files.el | |||
| @@ -50,12 +50,13 @@ | |||
| 50 | There is no completion at the prompt. FILE is searched for within | 50 | There is no completion at the prompt. FILE is searched for within |
| 51 | the current EDE project." | 51 | the current EDE project." |
| 52 | (interactive "sFile: ") | 52 | (interactive "sFile: ") |
| 53 | (let ((fname (ede-expand-filename (ede-current-project) file)) | 53 | (let* ((proj (ede-current-project)) |
| 54 | (fname (ede-expand-filename proj file)) | ||
| 54 | ) | 55 | ) |
| 55 | (unless fname | 56 | (unless fname |
| 56 | (error "Could not find %s in %s" | 57 | (error "Could not find %s in %s" |
| 57 | file | 58 | file |
| 58 | (ede-project-root-directory (ede-current-project)))) | 59 | (ede-project-root-directory proj))) |
| 59 | (find-file fname))) | 60 | (find-file fname))) |
| 60 | 61 | ||
| 61 | (defun ede-flush-project-hash () | 62 | (defun ede-flush-project-hash () |
| @@ -508,6 +509,26 @@ Argument DIR is the directory to trim upwards." | |||
| 508 | nil | 509 | nil |
| 509 | fnd))) | 510 | fnd))) |
| 510 | 511 | ||
| 512 | (defun ede-find-project-root (prj-file-name &optional dir) | ||
| 513 | "Tries to find directory with given project file" | ||
| 514 | (let ((prj-dir (locate-dominating-file (or dir default-directory) | ||
| 515 | prj-file-name))) | ||
| 516 | (when prj-dir | ||
| 517 | (expand-file-name prj-dir)))) | ||
| 518 | |||
| 519 | (defun ede-files-find-existing (dir prj-list) | ||
| 520 | "Find a project in the list of projects stored in given variable. | ||
| 521 | DIR is the directory to search from." | ||
| 522 | (let ((projs prj-list) | ||
| 523 | (ans nil)) | ||
| 524 | (while (and projs (not ans)) | ||
| 525 | (let ((root (ede-project-root-directory (car projs)))) | ||
| 526 | (when (string-match (concat "^" (regexp-quote root)) dir) | ||
| 527 | (setq ans (car projs)))) | ||
| 528 | (setq projs (cdr projs))) | ||
| 529 | ans)) | ||
| 530 | |||
| 531 | |||
| 511 | (provide 'ede/files) | 532 | (provide 'ede/files) |
| 512 | 533 | ||
| 513 | ;; Local variables: | 534 | ;; Local variables: |
diff --git a/lisp/cedet/ede/locate.el b/lisp/cedet/ede/locate.el index 072e2c2666a..3dbe3153680 100644 --- a/lisp/cedet/ede/locate.el +++ b/lisp/cedet/ede/locate.el | |||
| @@ -163,7 +163,7 @@ that created this EDE locate object." | |||
| 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" |
| 166 | (object-name loc))) | 166 | (eieio-object-name loc))) |
| 167 | 167 | ||
| 168 | ;;; LOCATE | 168 | ;;; LOCATE |
| 169 | ;; | 169 | ;; |
diff --git a/lisp/cedet/ede/pconf.el b/lisp/cedet/ede/pconf.el index 310014a0b64..a29e3720ea2 100644 --- a/lisp/cedet/ede/pconf.el +++ b/lisp/cedet/ede/pconf.el | |||
| @@ -152,7 +152,7 @@ don't do it. A value of nil means to just do it.") | |||
| 152 | (defmethod ede-proj-configure-recreate ((this ede-proj-project)) | 152 | (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" (object-name this))) | 155 | (error "Could not determine configure.ac for %S" (eieio-object-name this))) |
| 156 | (let ((b (get-file-buffer (ede-proj-configure-file this)))) | 156 | (let ((b (get-file-buffer (ede-proj-configure-file this)))) |
| 157 | ;; Destroy all evidence of the old configure.ac | 157 | ;; Destroy all evidence of the old configure.ac |
| 158 | (delete-file (ede-proj-configure-file this)) | 158 | (delete-file (ede-proj-configure-file this)) |
diff --git a/lisp/cedet/ede/proj-elisp.el b/lisp/cedet/ede/proj-elisp.el index 8b426aa183f..d7720f25681 100644 --- a/lisp/cedet/ede/proj-elisp.el +++ b/lisp/cedet/ede/proj-elisp.el | |||
| @@ -170,7 +170,7 @@ Bonus: Return a cons cell: (COMPILED . UPTODATE)." | |||
| 170 | (setq utd (1+ utd))))))) | 170 | (setq utd (1+ utd))))))) |
| 171 | 171 | ||
| 172 | (oref obj source)) | 172 | (oref obj source)) |
| 173 | (message "All Emacs Lisp sources are up to date in %s" (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 | (defmethod ede-update-version-in-source ((this ede-proj-target-elisp) version) |
| @@ -194,7 +194,8 @@ is found, such as a `-version' variable, or the standard header." | |||
| 194 | (goto-char (match-beginning 1)) | 194 | (goto-char (match-beginning 1)) |
| 195 | (insert version))))) | 195 | (insert version))))) |
| 196 | (setq vs (cdr vs))) | 196 | (setq vs (cdr vs))) |
| 197 | (if (not match) (call-next-method))))) | 197 | ;; The next method will include comments such as "Version:" |
| 198 | (call-next-method)))) | ||
| 198 | 199 | ||
| 199 | 200 | ||
| 200 | ;;; Makefile generation functions | 201 | ;;; Makefile generation functions |
diff --git a/lisp/cedet/ede/proj.el b/lisp/cedet/ede/proj.el index 2da2737d377..702e35f0b1f 100644 --- a/lisp/cedet/ede/proj.el +++ b/lisp/cedet/ede/proj.el | |||
| @@ -512,11 +512,11 @@ Optional argument COMMAND is the s the alternate command to use." | |||
| 512 | 512 | ||
| 513 | (defmethod project-debug-target ((obj ede-proj-target)) | 513 | (defmethod project-debug-target ((obj ede-proj-target)) |
| 514 | "Run the current project target OBJ in a debugger." | 514 | "Run the current project target OBJ in a debugger." |
| 515 | (error "Debug-target not supported by %s" (object-name obj))) | 515 | (error "Debug-target not supported by %s" (eieio-object-name obj))) |
| 516 | 516 | ||
| 517 | (defmethod project-run-target ((obj ede-proj-target)) | 517 | (defmethod project-run-target ((obj ede-proj-target)) |
| 518 | "Run the current project target OBJ." | 518 | "Run the current project target OBJ." |
| 519 | (error "Run-target not supported by %s" (object-name obj))) | 519 | (error "Run-target not supported by %s" (eieio-object-name obj))) |
| 520 | 520 | ||
| 521 | (defmethod ede-proj-makefile-target-name ((this ede-proj-target)) | 521 | (defmethod ede-proj-makefile-target-name ((this ede-proj-target)) |
| 522 | "Return the name of the main target for THIS target." | 522 | "Return the name of the main target for THIS target." |
diff --git a/lisp/cedet/ede/util.el b/lisp/cedet/ede/util.el index 88a3e0a4512..71a79a1b706 100644 --- a/lisp/cedet/ede/util.el +++ b/lisp/cedet/ede/util.el | |||
| @@ -49,7 +49,7 @@ Argument NEWVERSION is the version number to use in the current project." | |||
| 49 | (defmethod project-update-version ((ot ede-project)) | 49 | (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" (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 | (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. |
diff --git a/lisp/cedet/semantic.el b/lisp/cedet/semantic.el index edf2d0cb21a..3c93a8794b1 100644 --- a/lisp/cedet/semantic.el +++ b/lisp/cedet/semantic.el | |||
| @@ -466,11 +466,10 @@ unterminated syntax." | |||
| 466 | (widen) | 466 | (widen) |
| 467 | (when (or (< end start) (> end (point-max))) | 467 | (when (or (< end start) (> end (point-max))) |
| 468 | (error "Invalid parse region bounds %S, %S" start end)) | 468 | (error "Invalid parse region bounds %S, %S" start end)) |
| 469 | (nreverse | 469 | (semantic-repeat-parse-whole-stream |
| 470 | (semantic-repeat-parse-whole-stream | ||
| 471 | (or (cdr (assq start semantic-lex-block-streams)) | 470 | (or (cdr (assq start semantic-lex-block-streams)) |
| 472 | (semantic-lex start end depth)) | 471 | (semantic-lex start end depth)) |
| 473 | nonterminal returnonerror)))) | 472 | nonterminal returnonerror))) |
| 474 | 473 | ||
| 475 | ;;; Parsing functions | 474 | ;;; Parsing functions |
| 476 | ;; | 475 | ;; |
| @@ -756,7 +755,7 @@ This function returns semantic tags without overlays." | |||
| 756 | tag 'reparse-symbol nonterm)) | 755 | tag 'reparse-symbol nonterm)) |
| 757 | tag) | 756 | tag) |
| 758 | (semantic--tag-expand tag)) | 757 | (semantic--tag-expand tag)) |
| 759 | result (append tag result)) | 758 | result (append result tag)) |
| 760 | ;; No error in this case, a purposeful nil means don't | 759 | ;; No error in this case, a purposeful nil means don't |
| 761 | ;; store anything. | 760 | ;; store anything. |
| 762 | ) | 761 | ) |
| @@ -934,7 +933,8 @@ Throw away all the old tags, and recreate the tag database." | |||
| 934 | '("--")) | 933 | '("--")) |
| 935 | (define-key edit-menu [senator-yank-tag] | 934 | (define-key edit-menu [senator-yank-tag] |
| 936 | '(menu-item "Yank Tag" senator-yank-tag | 935 | '(menu-item "Yank Tag" senator-yank-tag |
| 937 | :enable (not (ring-empty-p senator-tag-ring)) | 936 | :enable (and (boundp 'senator-tag-ring) |
| 937 | (not (ring-empty-p senator-tag-ring))) | ||
| 938 | :help "Yank the head of the tag ring into the buffer")) | 938 | :help "Yank the head of the tag ring into the buffer")) |
| 939 | (define-key edit-menu [senator-copy-tag-to-register] | 939 | (define-key edit-menu [senator-copy-tag-to-register] |
| 940 | '(menu-item "Copy Tag To Register" senator-copy-tag-to-register | 940 | '(menu-item "Copy Tag To Register" senator-copy-tag-to-register |
diff --git a/lisp/cedet/semantic/analyze.el b/lisp/cedet/semantic/analyze.el index d1476111403..000193d4a55 100644 --- a/lisp/cedet/semantic/analyze.el +++ b/lisp/cedet/semantic/analyze.el | |||
| @@ -800,7 +800,7 @@ CONTEXT's content is described in `semantic-analyze-current-context'." | |||
| 800 | (semantic-analyze-pulse context) | 800 | (semantic-analyze-pulse context) |
| 801 | (with-output-to-temp-buffer "*Semantic Context Analysis*" | 801 | (with-output-to-temp-buffer "*Semantic Context Analysis*" |
| 802 | (princ "Context Type: ") | 802 | (princ "Context Type: ") |
| 803 | (princ (object-name context)) | 803 | (princ (eieio-object-name context)) |
| 804 | (princ "\n") | 804 | (princ "\n") |
| 805 | (princ "Bounds: ") | 805 | (princ "Bounds: ") |
| 806 | (princ (oref context bounds)) | 806 | (princ (oref context bounds)) |
diff --git a/lisp/cedet/semantic/analyze/fcn.el b/lisp/cedet/semantic/analyze/fcn.el index 6ee85b298a2..42bc482a1df 100644 --- a/lisp/cedet/semantic/analyze/fcn.el +++ b/lisp/cedet/semantic/analyze/fcn.el | |||
| @@ -255,7 +255,7 @@ Optional argument TYPE-DECLARATION is how TYPE was found referenced." | |||
| 255 | (nexttype (semantic-analyze-dereference-metatype type scope type-declaration)) | 255 | (nexttype (semantic-analyze-dereference-metatype type scope type-declaration)) |
| 256 | (idx 0)) | 256 | (idx 0)) |
| 257 | (catch 'metatype-recursion | 257 | (catch 'metatype-recursion |
| 258 | (while (and nexttype (not (eq (car nexttype) lasttype))) | 258 | (while (and nexttype (not (semantic-tag-similar-p (car nexttype) lasttype))) |
| 259 | (setq lasttype (car nexttype) | 259 | (setq lasttype (car nexttype) |
| 260 | lasttypedeclaration (cadr nexttype)) | 260 | lasttypedeclaration (cadr nexttype)) |
| 261 | (setq nexttype (semantic-analyze-dereference-metatype lasttype scope lasttypedeclaration)) | 261 | (setq nexttype (semantic-analyze-dereference-metatype lasttype scope lasttypedeclaration)) |
diff --git a/lisp/cedet/semantic/bovine/c.el b/lisp/cedet/semantic/bovine/c.el index 7aa93a0c942..2f8cf08af3e 100644 --- a/lisp/cedet/semantic/bovine/c.el +++ b/lisp/cedet/semantic/bovine/c.el | |||
| @@ -155,15 +155,16 @@ part of the preprocessor map.") | |||
| 155 | ;; not be in a buffer. | 155 | ;; not be in a buffer. |
| 156 | (semanticdb-refresh-table table t) | 156 | (semanticdb-refresh-table table t) |
| 157 | (error (message "Error updating tables for %S" | 157 | (error (message "Error updating tables for %S" |
| 158 | (object-name table))))) | 158 | (eieio-object-name table))))) |
| 159 | (setq filemap (append filemap (oref table lexical-table))) | 159 | (setq filemap (append filemap (oref table lexical-table))) |
| 160 | ;; Update symbol obarray | 160 | ))))) |
| 161 | (setq-mode-local c-mode | 161 | ;; Update symbol obarray |
| 162 | semantic-lex-spp-macro-symbol-obarray | 162 | (setq-mode-local c-mode |
| 163 | (semantic-lex-make-spp-table | 163 | semantic-lex-spp-macro-symbol-obarray |
| 164 | (append semantic-lex-c-preprocessor-symbol-map-builtin | 164 | (semantic-lex-make-spp-table |
| 165 | semantic-lex-c-preprocessor-symbol-map | 165 | (append semantic-lex-c-preprocessor-symbol-map-builtin |
| 166 | filemap))))))))))) | 166 | semantic-lex-c-preprocessor-symbol-map |
| 167 | filemap)))))) | ||
| 167 | 168 | ||
| 168 | ;; Make sure the preprocessor symbols are set up when mode-local kicks | 169 | ;; Make sure the preprocessor symbols are set up when mode-local kicks |
| 169 | ;; in. | 170 | ;; in. |
| @@ -1946,15 +1947,17 @@ have to be wrapped in that namespace." | |||
| 1946 | "Do what `semantic-get-local-variables' does, plus add `this' if needed." | 1947 | "Do what `semantic-get-local-variables' does, plus add `this' if needed." |
| 1947 | (let* ((origvar (semantic-get-local-variables-default)) | 1948 | (let* ((origvar (semantic-get-local-variables-default)) |
| 1948 | (ct (semantic-current-tag)) | 1949 | (ct (semantic-current-tag)) |
| 1949 | (p (semantic-tag-function-parent ct))) | 1950 | (p (when (semantic-tag-of-class-p ct 'function) |
| 1951 | (or (semantic-tag-function-parent ct) | ||
| 1952 | (car-safe (semantic-find-tags-by-type | ||
| 1953 | "class" (semantic-find-tag-by-overlay))))))) | ||
| 1950 | ;; If we have a function parent, then that implies we can | 1954 | ;; If we have a function parent, then that implies we can |
| 1951 | (if (and p (semantic-tag-of-class-p ct 'function)) | 1955 | (if p |
| 1952 | ;; Append a new tag THIS into our space. | 1956 | ;; Append a new tag THIS into our space. |
| 1953 | (cons (semantic-tag-new-variable "this" p nil) | 1957 | (cons (semantic-tag-new-variable "this" p nil :pointer 1) |
| 1954 | origvar) | 1958 | origvar) |
| 1955 | ;; No parent, just return the usual | 1959 | ;; No parent, just return the usual |
| 1956 | origvar) | 1960 | origvar))) |
| 1957 | )) | ||
| 1958 | 1961 | ||
| 1959 | (define-mode-local-override semantic-idle-summary-current-symbol-info | 1962 | (define-mode-local-override semantic-idle-summary-current-symbol-info |
| 1960 | c-mode () | 1963 | c-mode () |
| @@ -2151,14 +2154,18 @@ actually in their parent which is not accessible.") | |||
| 2151 | (princ "\n"))) | 2154 | (princ "\n"))) |
| 2152 | 2155 | ||
| 2153 | (princ "\n\nMacro Summary:\n") | 2156 | (princ "\n\nMacro Summary:\n") |
| 2157 | |||
| 2154 | (when semantic-lex-c-preprocessor-symbol-file | 2158 | (when semantic-lex-c-preprocessor-symbol-file |
| 2155 | (princ "\n Your CPP table is primed from these files:\n") | 2159 | (princ "\n Your CPP table is primed from these system files:\n") |
| 2156 | (dolist (file semantic-lex-c-preprocessor-symbol-file) | 2160 | (dolist (file semantic-lex-c-preprocessor-symbol-file) |
| 2157 | (princ " ") | 2161 | (princ " ") |
| 2158 | (princ file) | 2162 | (princ file) |
| 2159 | (princ "\n") | 2163 | (princ "\n") |
| 2160 | (princ " in table: ") | 2164 | (princ " in table: ") |
| 2161 | (princ (object-print (semanticdb-file-table-object file))) | 2165 | (let ((fto (semanticdb-file-table-object file))) |
| 2166 | (if fto | ||
| 2167 | (princ (object-print fto)) | ||
| 2168 | (princ "No Table"))) | ||
| 2162 | (princ "\n") | 2169 | (princ "\n") |
| 2163 | )) | 2170 | )) |
| 2164 | 2171 | ||
| @@ -2173,7 +2180,7 @@ actually in their parent which is not accessible.") | |||
| 2173 | )) | 2180 | )) |
| 2174 | 2181 | ||
| 2175 | (when semantic-lex-c-preprocessor-symbol-map | 2182 | (when semantic-lex-c-preprocessor-symbol-map |
| 2176 | (princ "\n User symbol map:\n") | 2183 | (princ "\n User symbol map (primed from system files):\n") |
| 2177 | (dolist (S semantic-lex-c-preprocessor-symbol-map) | 2184 | (dolist (S semantic-lex-c-preprocessor-symbol-map) |
| 2178 | (princ " ") | 2185 | (princ " ") |
| 2179 | (princ (car S)) | 2186 | (princ (car S)) |
| @@ -2183,25 +2190,27 @@ actually in their parent which is not accessible.") | |||
| 2183 | )) | 2190 | )) |
| 2184 | 2191 | ||
| 2185 | (when (and (boundp 'ede-object) | 2192 | (when (and (boundp 'ede-object) |
| 2186 | ede-object | 2193 | ede-object) |
| 2187 | (arrayp semantic-lex-spp-project-macro-symbol-obarray)) | ||
| 2188 | (princ "\n Project symbol map:\n") | 2194 | (princ "\n Project symbol map:\n") |
| 2189 | (when (and (boundp 'ede-object) ede-object) | 2195 | (when (and (boundp 'ede-object) ede-object) |
| 2190 | (princ " Your project symbol map is derived from the EDE object:\n ") | 2196 | (princ " Your project symbol map is also derived from the EDE object:\n ") |
| 2191 | (princ (object-print ede-object))) | 2197 | (princ (object-print ede-object))) |
| 2192 | (princ "\n\n") | 2198 | (princ "\n\n") |
| 2193 | (let ((macros nil)) | 2199 | (if (arrayp semantic-lex-spp-project-macro-symbol-obarray) |
| 2194 | (mapatoms | 2200 | (let ((macros nil)) |
| 2195 | #'(lambda (symbol) | 2201 | (mapatoms |
| 2196 | (setq macros (cons symbol macros))) | 2202 | #'(lambda (symbol) |
| 2197 | semantic-lex-spp-project-macro-symbol-obarray) | 2203 | (setq macros (cons symbol macros))) |
| 2198 | (dolist (S macros) | 2204 | semantic-lex-spp-project-macro-symbol-obarray) |
| 2199 | (princ " ") | 2205 | (dolist (S macros) |
| 2200 | (princ (symbol-name S)) | 2206 | (princ " ") |
| 2201 | (princ " = ") | 2207 | (princ (symbol-name S)) |
| 2202 | (princ (symbol-value S)) | 2208 | (princ " = ") |
| 2203 | (princ "\n") | 2209 | (princ (symbol-value S)) |
| 2204 | ))) | 2210 | (princ "\n") |
| 2211 | )) | ||
| 2212 | ;; Else, not map | ||
| 2213 | (princ " No Symbols.\n"))) | ||
| 2205 | 2214 | ||
| 2206 | (princ "\n\n Use: M-x semantic-lex-spp-describe RET\n") | 2215 | (princ "\n\n Use: M-x semantic-lex-spp-describe RET\n") |
| 2207 | (princ "\n to see the complete macro table.\n") | 2216 | (princ "\n to see the complete macro table.\n") |
diff --git a/lisp/cedet/semantic/bovine/gcc.el b/lisp/cedet/semantic/bovine/gcc.el index 82876adb37e..7beb8ff3203 100644 --- a/lisp/cedet/semantic/bovine/gcc.el +++ b/lisp/cedet/semantic/bovine/gcc.el | |||
| @@ -157,7 +157,11 @@ It should also include other symbols GCC was compiled with.") | |||
| 157 | ;; `cpp' command in `semantic-gcc-setup' doesn't work on | 157 | ;; `cpp' command in `semantic-gcc-setup' doesn't work on |
| 158 | ;; Mac, try `gcc'. | 158 | ;; Mac, try `gcc'. |
| 159 | (apply 'semantic-gcc-query "gcc" cpp-options)))) | 159 | (apply 'semantic-gcc-query "gcc" cpp-options)))) |
| 160 | (defines (semantic-cpp-defs query)) | 160 | (defines (if (stringp query) |
| 161 | (semantic-cpp-defs query) | ||
| 162 | (message (concat "Could not query gcc for defines. " | ||
| 163 | "Maybe g++ is not installed.")) | ||
| 164 | nil)) | ||
| 161 | (ver (cdr (assoc 'version fields))) | 165 | (ver (cdr (assoc 'version fields))) |
| 162 | (host (or (cdr (assoc 'target fields)) | 166 | (host (or (cdr (assoc 'target fields)) |
| 163 | (cdr (assoc '--target fields)) | 167 | (cdr (assoc '--target fields)) |
diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el index 194e0ee5f66..1c2ddf45c9d 100644 --- a/lisp/cedet/semantic/complete.el +++ b/lisp/cedet/semantic/complete.el | |||
| @@ -678,7 +678,8 @@ a reasonable distance." | |||
| 678 | ;;(message "Inline Hook installed, but overlay deleted.") | 678 | ;;(message "Inline Hook installed, but overlay deleted.") |
| 679 | (semantic-complete-inline-exit)) | 679 | (semantic-complete-inline-exit)) |
| 680 | ;; Exit if commands caused us to exit the area of interest | 680 | ;; Exit if commands caused us to exit the area of interest |
| 681 | (let ((s (semantic-overlay-start semantic-complete-inline-overlay)) | 681 | (let ((os (semantic-overlay-get semantic-complete-inline-overlay 'semantic-original-start)) |
| 682 | (s (semantic-overlay-start semantic-complete-inline-overlay)) | ||
| 682 | (e (semantic-overlay-end semantic-complete-inline-overlay)) | 683 | (e (semantic-overlay-end semantic-complete-inline-overlay)) |
| 683 | (b (semantic-overlay-buffer semantic-complete-inline-overlay)) | 684 | (b (semantic-overlay-buffer semantic-complete-inline-overlay)) |
| 684 | (txt nil) | 685 | (txt nil) |
| @@ -686,8 +687,10 @@ a reasonable distance." | |||
| 686 | (cond | 687 | (cond |
| 687 | ;; EXIT when we are no longer in a good place. | 688 | ;; EXIT when we are no longer in a good place. |
| 688 | ((or (not (eq b (current-buffer))) | 689 | ((or (not (eq b (current-buffer))) |
| 689 | (<= (point) s) | 690 | (< (point) s) |
| 690 | (> (point) e)) | 691 | (< (point) os) |
| 692 | (> (point) e) | ||
| 693 | ) | ||
| 691 | ;;(message "Exit: %S %S %S" s e (point)) | 694 | ;;(message "Exit: %S %S %S" s e (point)) |
| 692 | (semantic-complete-inline-exit) | 695 | (semantic-complete-inline-exit) |
| 693 | ) | 696 | ) |
| @@ -710,7 +713,6 @@ a reasonable distance." | |||
| 710 | (t | 713 | (t |
| 711 | ;; Else, show completions now | 714 | ;; Else, show completions now |
| 712 | (semantic-complete-inline-force-display) | 715 | (semantic-complete-inline-force-display) |
| 713 | |||
| 714 | )))) | 716 | )))) |
| 715 | ;; If something goes terribly wrong, clean up after ourselves. | 717 | ;; If something goes terribly wrong, clean up after ourselves. |
| 716 | (error (semantic-complete-inline-exit)))) | 718 | (error (semantic-complete-inline-exit)))) |
| @@ -761,6 +763,10 @@ END is at the end of the current symbol being completed." | |||
| 761 | (semantic-overlay-put semantic-complete-inline-overlay | 763 | (semantic-overlay-put semantic-complete-inline-overlay |
| 762 | 'window-config-start | 764 | 'window-config-start |
| 763 | (current-window-configuration)) | 765 | (current-window-configuration)) |
| 766 | ;; Save the original start. We need to exit completion if START | ||
| 767 | ;; moves. | ||
| 768 | (semantic-overlay-put semantic-complete-inline-overlay | ||
| 769 | 'semantic-original-start start) | ||
| 764 | ;; Install our command hooks | 770 | ;; Install our command hooks |
| 765 | (add-hook 'pre-command-hook 'semantic-complete-pre-command-hook) | 771 | (add-hook 'pre-command-hook 'semantic-complete-pre-command-hook) |
| 766 | (add-hook 'post-command-hook 'semantic-complete-post-command-hook) | 772 | (add-hook 'post-command-hook 'semantic-complete-post-command-hook) |
| @@ -1171,7 +1177,7 @@ These collectors track themselves on a per-buffer basis." | |||
| 1171 | (let ((old nil) | 1177 | (let ((old nil) |
| 1172 | (bl semantic-collector-per-buffer-list)) | 1178 | (bl semantic-collector-per-buffer-list)) |
| 1173 | (while (and bl (null old)) | 1179 | (while (and bl (null old)) |
| 1174 | (if (eq (object-class (car bl)) this) | 1180 | (if (eq (eieio-object-class (car bl)) this) |
| 1175 | (setq old (car bl)))) | 1181 | (setq old (car bl)))) |
| 1176 | (unless old | 1182 | (unless old |
| 1177 | (let ((new (call-next-method))) | 1183 | (let ((new (call-next-method))) |
| @@ -1510,7 +1516,7 @@ one in the source buffer." | |||
| 1510 | (insert (semantic-format-tag-summarize tag nil t) "\n\n") | 1516 | (insert (semantic-format-tag-summarize tag nil t) "\n\n") |
| 1511 | (when table | 1517 | (when table |
| 1512 | (insert "From table: \n") | 1518 | (insert "From table: \n") |
| 1513 | (insert (object-name table) "\n\n")) | 1519 | (insert (eieio-object-name table) "\n\n")) |
| 1514 | (when buf | 1520 | (when buf |
| 1515 | (insert "In buffer: \n\n") | 1521 | (insert "In buffer: \n\n") |
| 1516 | (insert (format "%S" buf))) | 1522 | (insert (format "%S" buf))) |
diff --git a/lisp/cedet/semantic/db-el.el b/lisp/cedet/semantic/db-el.el index 260f964c191..1b0f3292ad3 100644 --- a/lisp/cedet/semantic/db-el.el +++ b/lisp/cedet/semantic/db-el.el | |||
| @@ -216,9 +216,8 @@ TOKTYPE is a hint to the type of tag desired." | |||
| 216 | (symbol-name sym) | 216 | (symbol-name sym) |
| 217 | "class" | 217 | "class" |
| 218 | (semantic-elisp-desymbolify | 218 | (semantic-elisp-desymbolify |
| 219 | (aref (class-v semanticdb-project-database) | 219 | (eieio--class-public-a (class-v semanticdb-project-database))) ;; slots |
| 220 | class-public-a)) ;; slots | 220 | (semantic-elisp-desymbolify (eieio-class-parents sym)) ;; parents |
| 221 | (semantic-elisp-desymbolify (class-parents sym)) ;; parents | ||
| 222 | )) | 221 | )) |
| 223 | ((not toktype) | 222 | ((not toktype) |
| 224 | ;; Figure it out on our own. | 223 | ;; Figure it out on our own. |
diff --git a/lisp/cedet/semantic/db-file.el b/lisp/cedet/semantic/db-file.el index 269ff264126..2ef4fba1288 100644 --- a/lisp/cedet/semantic/db-file.el +++ b/lisp/cedet/semantic/db-file.el | |||
| @@ -44,6 +44,8 @@ | |||
| 44 | (defcustom semanticdb-default-save-directory | 44 | (defcustom semanticdb-default-save-directory |
| 45 | (locate-user-emacs-file "semanticdb" ".semanticdb") | 45 | (locate-user-emacs-file "semanticdb" ".semanticdb") |
| 46 | "Directory name where semantic cache files are stored. | 46 | "Directory name where semantic cache files are stored. |
| 47 | By default, it is either ~/.emacs.d/semanticdb, or ~/.semanticdb depending | ||
| 48 | on which exists. | ||
| 47 | If this value is nil, files are saved in the current directory. If the value | 49 | If this value is nil, files are saved in the current directory. If the value |
| 48 | is a valid directory, then it overrides `semanticdb-default-file-name' and | 50 | is a valid directory, then it overrides `semanticdb-default-file-name' and |
| 49 | stores caches in a coded file name in this directory." | 51 | stores caches in a coded file name in this directory." |
| @@ -316,7 +318,7 @@ Argument OBJ is the object to write." | |||
| 316 | (data-debug-new-buffer (concat "*SEMANTICDB ERROR*")) | 318 | (data-debug-new-buffer (concat "*SEMANTICDB ERROR*")) |
| 317 | (data-debug-insert-thing obj "*" "") | 319 | (data-debug-insert-thing obj "*" "") |
| 318 | (setq semanticdb-data-debug-on-write-error nil)) | 320 | (setq semanticdb-data-debug-on-write-error nil)) |
| 319 | (message "Error Writing Table: %s" (object-name obj)) | 321 | (message "Error Writing Table: %s" (eieio-object-name obj)) |
| 320 | (error "%S" (car (cdr tableerror))))) | 322 | (error "%S" (car (cdr tableerror))))) |
| 321 | 323 | ||
| 322 | ;; Clear the dirty bit. | 324 | ;; Clear the dirty bit. |
diff --git a/lisp/cedet/semantic/db-find.el b/lisp/cedet/semantic/db-find.el index 77fd10fc7aa..2e4ca319a9d 100644 --- a/lisp/cedet/semantic/db-find.el +++ b/lisp/cedet/semantic/db-find.el | |||
| @@ -244,7 +244,7 @@ This class will cache data derived during various searches.") | |||
| 244 | (let ((tab-idx (semanticdb-get-table-index tab))) | 244 | (let ((tab-idx (semanticdb-get-table-index tab))) |
| 245 | ;; Not a full reset? | 245 | ;; Not a full reset? |
| 246 | (when (oref tab-idx type-cache) | 246 | (when (oref tab-idx type-cache) |
| 247 | (require 'db-typecache) | 247 | (require 'semantic/db-typecache) |
| 248 | (semanticdb-typecache-notify-reset | 248 | (semanticdb-typecache-notify-reset |
| 249 | (oref tab-idx type-cache))) | 249 | (oref tab-idx type-cache))) |
| 250 | ))) | 250 | ))) |
| @@ -919,7 +919,7 @@ but should be good enough for debugging assertions." | |||
| 919 | (if (< (length result) 2) | 919 | (if (< (length result) 2) |
| 920 | (concat "#<FIND RESULT " | 920 | (concat "#<FIND RESULT " |
| 921 | (mapconcat (lambda (a) | 921 | (mapconcat (lambda (a) |
| 922 | (concat "(" (object-name (car a) ) " . " | 922 | (concat "(" (eieio-object-name (car a) ) " . " |
| 923 | "#<TAG LIST " (number-to-string (length (cdr a))) ">)")) | 923 | "#<TAG LIST " (number-to-string (length (cdr a))) ">)")) |
| 924 | result | 924 | result |
| 925 | " ") | 925 | " ") |
| @@ -1285,7 +1285,7 @@ associated with that tag should be loaded into a buffer." | |||
| 1285 | (semanticdb-find-tags-collector | 1285 | (semanticdb-find-tags-collector |
| 1286 | (lambda (table tags) | 1286 | (lambda (table tags) |
| 1287 | (semanticdb-find-tags-external-children-of-type-method table type tags)) | 1287 | (semanticdb-find-tags-external-children-of-type-method table type tags)) |
| 1288 | path find-file-match)) | 1288 | path find-file-match t)) |
| 1289 | 1289 | ||
| 1290 | (defun semanticdb-find-tags-subclasses-of-type | 1290 | (defun semanticdb-find-tags-subclasses-of-type |
| 1291 | (type &optional path find-file-match) | 1291 | (type &optional path find-file-match) |
diff --git a/lisp/cedet/semantic/db.el b/lisp/cedet/semantic/db.el index a6088231c61..e8784c4f85c 100644 --- a/lisp/cedet/semantic/db.el +++ b/lisp/cedet/semantic/db.el | |||
| @@ -190,7 +190,7 @@ If one doesn't exist, create it." | |||
| 190 | (oref obj index) | 190 | (oref obj index) |
| 191 | (let ((idx nil)) | 191 | (let ((idx nil)) |
| 192 | (setq idx (funcall semanticdb-default-find-index-class | 192 | (setq idx (funcall semanticdb-default-find-index-class |
| 193 | (concat (object-name obj) " index") | 193 | (concat (eieio-object-name obj) " index") |
| 194 | ;; Fill in the defaults | 194 | ;; Fill in the defaults |
| 195 | :table obj | 195 | :table obj |
| 196 | )) | 196 | )) |
| @@ -469,7 +469,7 @@ other than :table." | |||
| 469 | (let ((cache (oref table cache)) | 469 | (let ((cache (oref table cache)) |
| 470 | (obj nil)) | 470 | (obj nil)) |
| 471 | (while (and (not obj) cache) | 471 | (while (and (not obj) cache) |
| 472 | (if (eq (object-class-fast (car cache)) desired-class) | 472 | (if (eq (eieio--object-class (car cache)) desired-class) |
| 473 | (setq obj (car cache))) | 473 | (setq obj (car cache))) |
| 474 | (setq cache (cdr cache))) | 474 | (setq cache (cdr cache))) |
| 475 | (if obj | 475 | (if obj |
| @@ -520,7 +520,7 @@ other than :table." | |||
| 520 | (let ((cache (oref db cache)) | 520 | (let ((cache (oref db cache)) |
| 521 | (obj nil)) | 521 | (obj nil)) |
| 522 | (while (and (not obj) cache) | 522 | (while (and (not obj) cache) |
| 523 | (if (eq (object-class-fast (car cache)) desired-class) | 523 | (if (eq (eieio--object-class (car cache)) desired-class) |
| 524 | (setq obj (car cache))) | 524 | (setq obj (car cache))) |
| 525 | (setq cache (cdr cache))) | 525 | (setq cache (cdr cache))) |
| 526 | (if obj | 526 | (if obj |
diff --git a/lisp/cedet/semantic/decorate/include.el b/lisp/cedet/semantic/decorate/include.el index 3a08db2b0d0..0451ad44fe8 100644 --- a/lisp/cedet/semantic/decorate/include.el +++ b/lisp/cedet/semantic/decorate/include.el | |||
| @@ -797,7 +797,7 @@ Argument EVENT describes the event that caused this function to be called." | |||
| 797 | (dolist (p path) | 797 | (dolist (p path) |
| 798 | (if (slot-boundp p 'tags) | 798 | (if (slot-boundp p 'tags) |
| 799 | (princ (format "\n %s :\t%d tags, %d are includes. %s" | 799 | (princ (format "\n %s :\t%d tags, %d are includes. %s" |
| 800 | (object-name-string p) | 800 | (eieio-object-name-string p) |
| 801 | (length (oref p tags)) | 801 | (length (oref p tags)) |
| 802 | (length (semantic-find-tags-by-class | 802 | (length (semantic-find-tags-by-class |
| 803 | 'include p)) | 803 | 'include p)) |
| @@ -810,7 +810,7 @@ Argument EVENT describes the event that caused this function to be called." | |||
| 810 | " Needs to be parsed.") | 810 | " Needs to be parsed.") |
| 811 | (t "")))) | 811 | (t "")))) |
| 812 | (princ (format "\n %s :\tUnparsed" | 812 | (princ (format "\n %s :\tUnparsed" |
| 813 | (object-name-string p)))) | 813 | (eieio-object-name-string p)))) |
| 814 | ))) | 814 | ))) |
| 815 | ))) | 815 | ))) |
| 816 | 816 | ||
diff --git a/lisp/cedet/semantic/ede-grammar.el b/lisp/cedet/semantic/ede-grammar.el index 094832a8258..cb2a1faaac0 100644 --- a/lisp/cedet/semantic/ede-grammar.el +++ b/lisp/cedet/semantic/ede-grammar.el | |||
| @@ -162,7 +162,7 @@ Lays claim to all -by.el, and -wy.el files." | |||
| 162 | (setq comp (1+ comp)) | 162 | (setq comp (1+ comp)) |
| 163 | (setq utd (1+ utd)))))))) | 163 | (setq utd (1+ utd)))))))) |
| 164 | (oref obj source)) | 164 | (oref obj source)) |
| 165 | (message "All Semantic Grammar sources are up to date in %s" (object-name obj)) | 165 | (message "All Semantic Grammar sources are up to date in %s" (eieio-object-name obj)) |
| 166 | (cons comp utd))) | 166 | (cons comp utd))) |
| 167 | 167 | ||
| 168 | ;;; Makefile generation functions | 168 | ;;; Makefile generation functions |
diff --git a/lisp/cedet/semantic/find.el b/lisp/cedet/semantic/find.el index aa42a77725e..f660c69ec3d 100644 --- a/lisp/cedet/semantic/find.el +++ b/lisp/cedet/semantic/find.el | |||
| @@ -313,6 +313,15 @@ TABLE is a tag table. See `semantic-something-to-tag-table'." | |||
| 313 | (eq ,class (semantic-tag-class (car tags))) | 313 | (eq ,class (semantic-tag-class (car tags))) |
| 314 | ,table)) | 314 | ,table)) |
| 315 | 315 | ||
| 316 | (defmacro semantic-filter-tags-by-class (class &optional table) | ||
| 317 | "Find all tags of class not in the list CLASS in TABLE. | ||
| 318 | CLASS is a list of symbols representing the class of the token, | ||
| 319 | such as 'variable, of 'function.. | ||
| 320 | TABLE is a tag table. See `semantic-something-to-tag-table'." | ||
| 321 | `(semantic--find-tags-by-macro | ||
| 322 | (not (memq (semantic-tag-class (car tags)) ,class)) | ||
| 323 | ,table)) | ||
| 324 | |||
| 316 | (defmacro semantic-find-tags-by-type (type &optional table) | 325 | (defmacro semantic-find-tags-by-type (type &optional table) |
| 317 | "Find all tags of with a type TYPE in TABLE. | 326 | "Find all tags of with a type TYPE in TABLE. |
| 318 | TYPE is a string or tag representing a data type as defined in the | 327 | TYPE is a string or tag representing a data type as defined in the |
diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el index ba4570e692b..9cb0f60b80a 100644 --- a/lisp/cedet/semantic/grammar.el +++ b/lisp/cedet/semantic/grammar.el | |||
| @@ -51,6 +51,9 @@ | |||
| 51 | (declare-function semantic-grammar-wy--install-parser | 51 | (declare-function semantic-grammar-wy--install-parser |
| 52 | "semantic/gram-wy-fallback") | 52 | "semantic/gram-wy-fallback") |
| 53 | 53 | ||
| 54 | (declare-function semantic-grammar-wy--install-parser | ||
| 55 | "semantic/gram-wy-fallback") | ||
| 56 | |||
| 54 | 57 | ||
| 55 | ;;;; | 58 | ;;;; |
| 56 | ;;;; Set up lexer | 59 | ;;;; Set up lexer |
diff --git a/lisp/cedet/semantic/sb.el b/lisp/cedet/semantic/sb.el index e2d143b529e..32117da1af5 100644 --- a/lisp/cedet/semantic/sb.el +++ b/lisp/cedet/semantic/sb.el | |||
| @@ -43,6 +43,11 @@ This will replace the named bucket that would have usually occurred here." | |||
| 43 | :group 'speedbar | 43 | :group 'speedbar |
| 44 | :type 'integer) | 44 | :type 'integer) |
| 45 | 45 | ||
| 46 | (defvar semantic-sb-filter-tags-of-class '(code) | ||
| 47 | "Tags classes to not display in speedbar. | ||
| 48 | Make this buffer local for modes that have different types of tags | ||
| 49 | that should be ignored.") | ||
| 50 | |||
| 46 | (defcustom semantic-sb-button-format-tag-function 'semantic-format-tag-abbreviate | 51 | (defcustom semantic-sb-button-format-tag-function 'semantic-format-tag-abbreviate |
| 47 | "*Function called to create the text for a but from a token." | 52 | "*Function called to create the text for a but from a token." |
| 48 | :group 'speedbar | 53 | :group 'speedbar |
| @@ -405,7 +410,12 @@ Returns the tag list, or t for an error." | |||
| 405 | (setq out (semantic-adopt-external-members out)) | 410 | (setq out (semantic-adopt-external-members out)) |
| 406 | ;; Dump all the tokens into buckets. | 411 | ;; Dump all the tokens into buckets. |
| 407 | (semantic-sb-with-tag-buffer (car out) | 412 | (semantic-sb-with-tag-buffer (car out) |
| 408 | (semantic-bucketize out))) | 413 | (semantic-bucketize out nil |
| 414 | (lambda (tagsin) | ||
| 415 | ;; Remove all boring tags. | ||
| 416 | (semantic-filter-tags-by-class | ||
| 417 | semantic-sb-filter-tags-of-class | ||
| 418 | tagsin))))) | ||
| 409 | (error t)) | 419 | (error t)) |
| 410 | t))) | 420 | t))) |
| 411 | 421 | ||
diff --git a/lisp/cedet/semantic/sort.el b/lisp/cedet/semantic/sort.el index 6b58689524c..b32e11290ac 100644 --- a/lisp/cedet/semantic/sort.el +++ b/lisp/cedet/semantic/sort.el | |||
| @@ -522,7 +522,7 @@ See `semantic-tag-external-member-children' for details." | |||
| 522 | (semanticdb-minor-mode-p) | 522 | (semanticdb-minor-mode-p) |
| 523 | (require 'semantic/db-find)) | 523 | (require 'semantic/db-find)) |
| 524 | (let ((m (semanticdb-find-tags-external-children-of-type | 524 | (let ((m (semanticdb-find-tags-external-children-of-type |
| 525 | (semantic-tag-name tag)))) | 525 | (semantic-tag-name tag) tag))) |
| 526 | (if m (apply #'append (mapcar #'cdr m)))) | 526 | (if m (apply #'append (mapcar #'cdr m)))) |
| 527 | (semantic--find-tags-by-function | 527 | (semantic--find-tags-by-function |
| 528 | `(lambda (tok) | 528 | `(lambda (tok) |
diff --git a/lisp/cedet/semantic/tag-ls.el b/lisp/cedet/semantic/tag-ls.el index 7e5913334ea..53da7b65661 100644 --- a/lisp/cedet/semantic/tag-ls.el +++ b/lisp/cedet/semantic/tag-ls.el | |||
| @@ -146,36 +146,42 @@ are the same. | |||
| 146 | IGNORABLE-ATTRIBUTES are tag attributes that can be ignored. | 146 | IGNORABLE-ATTRIBUTES are tag attributes that can be ignored. |
| 147 | 147 | ||
| 148 | See `semantic-tag-similar-p' for details." | 148 | See `semantic-tag-similar-p' for details." |
| 149 | (let* ((ignore (append ignorable-attributes semantic-tag-similar-ignorable-attributes)) | 149 | (or |
| 150 | (A1 (and (semantic--tag-similar-names-p tag1 tag2 (memq :name ignore)) | 150 | ;; Tags are similar if they have the exact same lisp object |
| 151 | (semantic--tag-similar-types-p tag1 tag2) | 151 | ;; Added for performance when testing a relatively common case in some uses |
| 152 | (semantic-tag-of-class-p tag1 (semantic-tag-class tag2)))) | 152 | ;; of this code. |
| 153 | (attr1 (semantic-tag-attributes tag1)) | 153 | (eq tag1 tag2) |
| 154 | (attr2 (semantic-tag-attributes tag2)) | 154 | ;; More complex similarness test. |
| 155 | (A2 t) | 155 | (let* ((ignore (append ignorable-attributes semantic-tag-similar-ignorable-attributes)) |
| 156 | (A3 t) | 156 | (A1 (and (semantic--tag-similar-names-p tag1 tag2 (memq :name ignore)) |
| 157 | ) | 157 | (semantic--tag-similar-types-p tag1 tag2) |
| 158 | ;; Test if there are non-ignorable attributes in A2 which are not present in A1 | 158 | (semantic-tag-of-class-p tag1 (semantic-tag-class tag2)))) |
| 159 | (while (and A2 attr2) | 159 | (attr1 (semantic-tag-attributes tag1)) |
| 160 | (let ((a (car attr2))) | 160 | (attr2 (semantic-tag-attributes tag2)) |
| 161 | (unless (or (eq a :type) (memq a ignore)) | 161 | (A2 t) |
| 162 | (setq A2 (semantic-tag-get-attribute tag1 a))) | 162 | (A3 t) |
| 163 | (setq attr2 (cdr (cdr attr2))))) | 163 | ) |
| 164 | (while (and A2 attr1 A3) | 164 | ;; Test if there are non-ignorable attributes in A2 which are not present in A1 |
| 165 | (let ((a (car attr1))) | 165 | (while (and A2 attr2) |
| 166 | 166 | (let ((a (car attr2))) | |
| 167 | (cond ((or (eq a :type) ;; already tested above. | 167 | (unless (or (eq a :type) (memq a ignore)) |
| 168 | (memq a ignore)) ;; Ignore them... | 168 | (setq A2 (semantic-tag-get-attribute tag1 a))) |
| 169 | nil) | 169 | (setq attr2 (cdr (cdr attr2))))) |
| 170 | 170 | (while (and A2 attr1 A3) | |
| 171 | (t | 171 | (let ((a (car attr1))) |
| 172 | (setq A3 | 172 | |
| 173 | (semantic--tag-attribute-similar-p | 173 | (cond ((or (eq a :type) ;; already tested above. |
| 174 | a (car (cdr attr1)) (semantic-tag-get-attribute tag2 a) | 174 | (memq a ignore)) ;; Ignore them... |
| 175 | ignorable-attributes))) | 175 | nil) |
| 176 | )) | 176 | |
| 177 | (setq attr1 (cdr (cdr attr1)))) | 177 | (t |
| 178 | (and A1 A2 A3))) | 178 | (setq A3 |
| 179 | (semantic--tag-attribute-similar-p | ||
| 180 | a (car (cdr attr1)) (semantic-tag-get-attribute tag2 a) | ||
| 181 | ignorable-attributes))) | ||
| 182 | )) | ||
| 183 | (setq attr1 (cdr (cdr attr1)))) | ||
| 184 | (and A1 A2 A3)))) | ||
| 179 | 185 | ||
| 180 | ;;; FULL NAMES | 186 | ;;; FULL NAMES |
| 181 | ;; | 187 | ;; |
diff --git a/lisp/cedet/srecode/args.el b/lisp/cedet/srecode/args.el index b91f96f611d..d6798f7523d 100644 --- a/lisp/cedet/srecode/args.el +++ b/lisp/cedet/srecode/args.el | |||
| @@ -157,6 +157,30 @@ do not contain any text from preceding or following text." | |||
| 157 | (srecode-dictionary-show-section dict "RCS") | 157 | (srecode-dictionary-show-section dict "RCS") |
| 158 | ))) | 158 | ))) |
| 159 | 159 | ||
| 160 | ;;; :project ARGUMENT HANDLING | ||
| 161 | ;; | ||
| 162 | ;; When the :project argument is required, fill the dictionary with | ||
| 163 | ;; information that the current project (from EDE) might know | ||
| 164 | (defun srecode-semantic-handle-:project (dict) | ||
| 165 | "Add macros into the dictionary DICT based on the current ede project." | ||
| 166 | (let* ((bfn (buffer-file-name)) | ||
| 167 | (dir (file-name-directory bfn))) | ||
| 168 | (if (ede-toplevel) | ||
| 169 | (let* ((projecttop (ede-toplevel-project default-directory)) | ||
| 170 | (relfname (file-relative-name bfn projecttop)) | ||
| 171 | (reldir (file-relative-name dir projecttop)) | ||
| 172 | ) | ||
| 173 | (srecode-dictionary-set-value dict "PROJECT_FILENAME" relfname) | ||
| 174 | (srecode-dictionary-set-value dict "PROJECT_DIRECTORY" reldir) | ||
| 175 | (srecode-dictionary-set-value dict "PROJECT_NAME" (ede-name (ede-toplevel))) | ||
| 176 | (srecode-dictionary-set-value dict "PROJECT_VERSION" (oref (ede-toplevel) :version)) | ||
| 177 | ) | ||
| 178 | ;; If there is no EDE project, then put in some base values. | ||
| 179 | (srecode-dictionary-set-value dict "PROJECT_FILENAME" bfn) | ||
| 180 | (srecode-dictionary-set-value dict "PROJECT_DIRECTORY" dir) | ||
| 181 | (srecode-dictionary-set-value dict "PROJECT_NAME" "N/A") | ||
| 182 | (srecode-dictionary-set-value dict "PROJECT_VERSION" "1.0")))) | ||
| 183 | |||
| 160 | ;;; :system ARGUMENT HANDLING | 184 | ;;; :system ARGUMENT HANDLING |
| 161 | ;; | 185 | ;; |
| 162 | ;; When a :system argument is required, fill the dictionary with | 186 | ;; When a :system argument is required, fill the dictionary with |
diff --git a/lisp/cedet/srecode/compile.el b/lisp/cedet/srecode/compile.el index 170b99c1fd2..0d68036c433 100644 --- a/lisp/cedet/srecode/compile.el +++ b/lisp/cedet/srecode/compile.el | |||
| @@ -510,12 +510,12 @@ to the inserter constructor." | |||
| 510 | ;;(message "Compile: %s %S" name props) | 510 | ;;(message "Compile: %s %S" name props) |
| 511 | (if (not key) | 511 | (if (not key) |
| 512 | (apply 'srecode-template-inserter-variable name props) | 512 | (apply 'srecode-template-inserter-variable name props) |
| 513 | (let ((classes (class-children srecode-template-inserter)) | 513 | (let ((classes (eieio-class-children srecode-template-inserter)) |
| 514 | (new nil)) | 514 | (new nil)) |
| 515 | ;; Loop over the various subclasses and | 515 | ;; Loop over the various subclasses and |
| 516 | ;; create the correct inserter. | 516 | ;; create the correct inserter. |
| 517 | (while (and (not new) classes) | 517 | (while (and (not new) classes) |
| 518 | (setq classes (append classes (class-children (car classes)))) | 518 | (setq classes (append classes (eieio-class-children (car classes)))) |
| 519 | ;; Do we have a match? | 519 | ;; Do we have a match? |
| 520 | (when (and (not (class-abstract-p (car classes))) | 520 | (when (and (not (class-abstract-p (car classes))) |
| 521 | (equal (oref (car classes) key) key)) | 521 | (equal (oref (car classes) key) key)) |
| @@ -594,7 +594,7 @@ A list of defined variables VARS provides a variable table." | |||
| 594 | (defmethod srecode-dump ((tmp srecode-template)) | 594 | (defmethod srecode-dump ((tmp srecode-template)) |
| 595 | "Dump the contents of the SRecode template tmp." | 595 | "Dump the contents of the SRecode template tmp." |
| 596 | (princ "== Template \"") | 596 | (princ "== Template \"") |
| 597 | (princ (object-name-string tmp)) | 597 | (princ (eieio-object-name-string tmp)) |
| 598 | (princ "\" in context ") | 598 | (princ "\" in context ") |
| 599 | (princ (oref tmp context)) | 599 | (princ (oref tmp context)) |
| 600 | (princ "\n") | 600 | (princ "\n") |
| @@ -640,12 +640,12 @@ Argument INDENT specifies the indentation level for the list." | |||
| 640 | (defmethod srecode-dump ((ins srecode-template-inserter) indent) | 640 | (defmethod srecode-dump ((ins srecode-template-inserter) indent) |
| 641 | "Dump the state of the SRecode template inserter INS." | 641 | "Dump the state of the SRecode template inserter INS." |
| 642 | (princ "INS: \"") | 642 | (princ "INS: \"") |
| 643 | (princ (object-name-string ins)) | 643 | (princ (eieio-object-name-string ins)) |
| 644 | (when (oref ins :secondname) | 644 | (when (oref ins :secondname) |
| 645 | (princ "\" : \"") | 645 | (princ "\" : \"") |
| 646 | (princ (oref ins :secondname))) | 646 | (princ (oref ins :secondname))) |
| 647 | (princ "\" type \"") | 647 | (princ "\" type \"") |
| 648 | (let* ((oc (symbol-name (object-class ins))) | 648 | (let* ((oc (symbol-name (eieio-object-class ins))) |
| 649 | (junk (string-match "srecode-template-inserter-" oc)) | 649 | (junk (string-match "srecode-template-inserter-" oc)) |
| 650 | (on (if junk | 650 | (on (if junk |
| 651 | (substring oc (match-end 0)) | 651 | (substring oc (match-end 0)) |
diff --git a/lisp/cedet/srecode/cpp.el b/lisp/cedet/srecode/cpp.el index 94b394a1631..fd500b6d9a3 100644 --- a/lisp/cedet/srecode/cpp.el +++ b/lisp/cedet/srecode/cpp.el | |||
| @@ -70,8 +70,7 @@ HEADER - Shown section if in a header file." | |||
| 70 | (srecode-dictionary-show-section dict "NOTHEADER")) | 70 | (srecode-dictionary-show-section dict "NOTHEADER")) |
| 71 | 71 | ||
| 72 | ;; Strip out bad characters | 72 | ;; Strip out bad characters |
| 73 | (while (string-match "\\.\\| " fsym) | 73 | (setq fsym (replace-regexp-in-string "[^a-zA-Z0-9_]" "_" fsym)) |
| 74 | (setq fsym (replace-match "_" t t fsym))) | ||
| 75 | (srecode-dictionary-set-value dict "FILENAME_SYMBOL" fsym) | 74 | (srecode-dictionary-set-value dict "FILENAME_SYMBOL" fsym) |
| 76 | ) | 75 | ) |
| 77 | ) | 76 | ) |
diff --git a/lisp/cedet/srecode/dictionary.el b/lisp/cedet/srecode/dictionary.el index bac05666726..bbc791f09d8 100644 --- a/lisp/cedet/srecode/dictionary.el +++ b/lisp/cedet/srecode/dictionary.el | |||
| @@ -175,7 +175,7 @@ associated with a buffer or parent." | |||
| 175 | ((srecode-dictionary-child-p buffer-or-parent) | 175 | ((srecode-dictionary-child-p buffer-or-parent) |
| 176 | (setq parent buffer-or-parent | 176 | (setq parent buffer-or-parent |
| 177 | buffer (oref buffer-or-parent buffer) | 177 | buffer (oref buffer-or-parent buffer) |
| 178 | origin (concat (object-name buffer-or-parent) " in " | 178 | origin (concat (eieio-object-name buffer-or-parent) " in " |
| 179 | (if buffer (buffer-name buffer) | 179 | (if buffer (buffer-name buffer) |
| 180 | "no buffer"))) | 180 | "no buffer"))) |
| 181 | (when buffer | 181 | (when buffer |
| @@ -454,12 +454,12 @@ If you subclass `srecode-dictionary-compound-value' then this | |||
| 454 | method could return nil, but if it does that, it must insert | 454 | method could return nil, but if it does that, it must insert |
| 455 | the value itself using `princ', or by detecting if the current | 455 | the value itself using `princ', or by detecting if the current |
| 456 | standard out is a buffer, and using `insert'." | 456 | standard out is a buffer, and using `insert'." |
| 457 | (object-name cp)) | 457 | (eieio-object-name cp)) |
| 458 | 458 | ||
| 459 | (defmethod srecode-dump ((cp srecode-dictionary-compound-value) | 459 | (defmethod srecode-dump ((cp srecode-dictionary-compound-value) |
| 460 | &optional indent) | 460 | &optional indent) |
| 461 | "Display information about this compound value." | 461 | "Display information about this compound value." |
| 462 | (princ (object-name cp)) | 462 | (princ (eieio-object-name cp)) |
| 463 | ) | 463 | ) |
| 464 | 464 | ||
| 465 | (defmethod srecode-compound-toString ((cp srecode-dictionary-compound-variable) | 465 | (defmethod srecode-compound-toString ((cp srecode-dictionary-compound-variable) |
| @@ -654,7 +654,7 @@ STATE is the current compiler state." | |||
| 654 | 4))) | 654 | 4))) |
| 655 | (while entry | 655 | (while entry |
| 656 | (princ " --> SUBDICTIONARY ") | 656 | (princ " --> SUBDICTIONARY ") |
| 657 | (princ (object-name dict)) | 657 | (princ (eieio-object-name dict)) |
| 658 | (princ "\n") | 658 | (princ "\n") |
| 659 | (srecode-dump (car entry) newindent) | 659 | (srecode-dump (car entry) newindent) |
| 660 | (setq entry (cdr entry)) | 660 | (setq entry (cdr entry)) |
diff --git a/lisp/cedet/srecode/insert.el b/lisp/cedet/srecode/insert.el index 466efae3b9c..0d647bb56c5 100644 --- a/lisp/cedet/srecode/insert.el +++ b/lisp/cedet/srecode/insert.el | |||
| @@ -809,7 +809,7 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." | |||
| 809 | (srecode-insert-report-error | 809 | (srecode-insert-report-error |
| 810 | dict | 810 | dict |
| 811 | "Only section dictionaries allowed for `%s'" | 811 | "Only section dictionaries allowed for `%s'" |
| 812 | (object-name-string sti))) | 812 | (eieio-object-name-string sti))) |
| 813 | 813 | ||
| 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)) |
| @@ -866,7 +866,7 @@ Return the remains of INPUT." | |||
| 866 | (let* ((out (srecode-compile-split-code tag input STATE | 866 | (let* ((out (srecode-compile-split-code tag input STATE |
| 867 | (oref ins :object-name)))) | 867 | (oref ins :object-name)))) |
| 868 | (oset ins template (srecode-template | 868 | (oset ins template (srecode-template |
| 869 | (object-name-string ins) | 869 | (eieio-object-name-string ins) |
| 870 | :context nil | 870 | :context nil |
| 871 | :args nil | 871 | :args nil |
| 872 | :code (cdr out))) | 872 | :code (cdr out))) |
diff --git a/lisp/cedet/srecode/java.el b/lisp/cedet/srecode/java.el index db4d2deee28..29a8465c45c 100644 --- a/lisp/cedet/srecode/java.el +++ b/lisp/cedet/srecode/java.el | |||
| @@ -42,9 +42,24 @@ FILENAME_AS_CLASS - file converted to a Java class name." | |||
| 42 | ) | 42 | ) |
| 43 | (while (string-match "\\.\\| " fpak) | 43 | (while (string-match "\\.\\| " fpak) |
| 44 | (setq fpak (replace-match "_" t t fpak))) | 44 | (setq fpak (replace-match "_" t t fpak))) |
| 45 | (if (string-match "src/" dir) | 45 | ;; We can extract package from: |
| 46 | (setq dir (substring dir (match-end 0))) | 46 | ;; 1) a java EDE project source paths, |
| 47 | (setq dir (file-name-nondirectory (directory-file-name dir)))) | 47 | (cond ((ede-current-project) |
| 48 | (let* ((proj (ede-current-project)) | ||
| 49 | (pths (ede-source-paths proj 'java-mode)) | ||
| 50 | (pth) | ||
| 51 | (res)) | ||
| 52 | (while (and (not res) | ||
| 53 | (setq pth (expand-file-name (car pths)))) | ||
| 54 | (when (string-match pth dir) | ||
| 55 | (setq res (substring dir (match-end 0)))) | ||
| 56 | (setq pths (cdr pths))) | ||
| 57 | (setq dir res))) | ||
| 58 | ;; 2) a simple heuristic | ||
| 59 | ((string-match "src/" dir) | ||
| 60 | (setq dir (substring dir (match-end 0)))) | ||
| 61 | ;; 3) outer directory as a fallback | ||
| 62 | (t (setq dir (file-name-nondirectory (directory-file-name dir))))) | ||
| 48 | (setq dir (directory-file-name dir)) | 63 | (setq dir (directory-file-name dir)) |
| 49 | (while (string-match "/" dir) | 64 | (while (string-match "/" dir) |
| 50 | (setq dir (replace-match "." t t dir))) | 65 | (setq dir (replace-match "." t t dir))) |
diff --git a/lisp/cedet/srecode/map.el b/lisp/cedet/srecode/map.el index cbe602f3299..1dd9ba4cf47 100644 --- a/lisp/cedet/srecode/map.el +++ b/lisp/cedet/srecode/map.el | |||
| @@ -363,6 +363,9 @@ Return non-nil if the map changed." | |||
| 363 | (let ((semantic-init-hook nil)) | 363 | (let ((semantic-init-hook nil)) |
| 364 | (semantic-new-buffer-fcn)) | 364 | (semantic-new-buffer-fcn)) |
| 365 | ) | 365 | ) |
| 366 | ;; Force semantic to be enabled in this buffer. | ||
| 367 | (unless (semantic-active-p) | ||
| 368 | (semantic-new-buffer-fcn)) | ||
| 366 | 369 | ||
| 367 | (semantic-fetch-tags) | 370 | (semantic-fetch-tags) |
| 368 | (let* ((mode-tag | 371 | (let* ((mode-tag |
diff --git a/lisp/cedet/srecode/mode.el b/lisp/cedet/srecode/mode.el index 8c4a53ec891..e8e1c78198e 100644 --- a/lisp/cedet/srecode/mode.el +++ b/lisp/cedet/srecode/mode.el | |||
| @@ -225,7 +225,7 @@ MENU-DEF is the menu to bind this into." | |||
| 225 | (ctxtcons (assoc ctxt alltabs)) | 225 | (ctxtcons (assoc ctxt alltabs)) |
| 226 | (bind (if (slot-boundp temp 'binding) | 226 | (bind (if (slot-boundp temp 'binding) |
| 227 | (oref temp binding))) | 227 | (oref temp binding))) |
| 228 | (name (object-name-string temp))) | 228 | (name (eieio-object-name-string temp))) |
| 229 | 229 | ||
| 230 | (when (not ctxtcons) | 230 | (when (not ctxtcons) |
| 231 | (if (string= context ctxt) | 231 | (if (string= context ctxt) |
diff --git a/lisp/cedet/srecode/srt-mode.el b/lisp/cedet/srecode/srt-mode.el index 455895c003d..2f43dc3872b 100644 --- a/lisp/cedet/srecode/srt-mode.el +++ b/lisp/cedet/srecode/srt-mode.el | |||
| @@ -187,7 +187,7 @@ we can tell font lock about them.") | |||
| 187 | "Keymap used in srecode mode.") | 187 | "Keymap used in srecode mode.") |
| 188 | 188 | ||
| 189 | ;;;###autoload | 189 | ;;;###autoload |
| 190 | (define-derived-mode srecode-template-mode fundamental-mode "SRecorder" | 190 | (define-derived-mode srecode-template-mode fundamental-mode "SRecode" |
| 191 | "Major-mode for writing SRecode macros." | 191 | "Major-mode for writing SRecode macros." |
| 192 | (set (make-local-variable 'comment-start) ";;") | 192 | (set (make-local-variable 'comment-start) ";;") |
| 193 | (set (make-local-variable 'comment-end) "") | 193 | (set (make-local-variable 'comment-end) "") |
| @@ -232,7 +232,7 @@ we can tell font lock about them.") | |||
| 232 | "Provide help for working with macros in a template." | 232 | "Provide help for working with macros in a template." |
| 233 | (interactive) | 233 | (interactive) |
| 234 | (let* ((root 'srecode-template-inserter) | 234 | (let* ((root 'srecode-template-inserter) |
| 235 | (chl (aref (class-v root) class-children)) | 235 | (chl (eieio--class-children (class-v root))) |
| 236 | (ess (srecode-template-get-escape-start)) | 236 | (ess (srecode-template-get-escape-start)) |
| 237 | (ees (srecode-template-get-escape-end)) | 237 | (ees (srecode-template-get-escape-end)) |
| 238 | ) | 238 | ) |
| @@ -248,7 +248,7 @@ we can tell font lock about them.") | |||
| 248 | (showexample t) | 248 | (showexample t) |
| 249 | ) | 249 | ) |
| 250 | (setq chl (cdr chl)) | 250 | (setq chl (cdr chl)) |
| 251 | (setq chl (append (aref (class-v C) class-children) chl)) | 251 | (setq chl (append (eieio--class-children (class-v C)) chl)) |
| 252 | 252 | ||
| 253 | (catch 'skip | 253 | (catch 'skip |
| 254 | (when (eq C 'srecode-template-inserter-section-end) | 254 | (when (eq C 'srecode-template-inserter-section-end) |
diff --git a/lisp/cedet/srecode/srt.el b/lisp/cedet/srecode/srt.el index 3875246cb37..1fad31dafd6 100644 --- a/lisp/cedet/srecode/srt.el +++ b/lisp/cedet/srecode/srt.el | |||
| @@ -69,6 +69,7 @@ DEFAULT is the default if RET is hit." | |||
| 69 | nil initial (or hist 'srecode-read-major-mode-history)) | 69 | nil initial (or hist 'srecode-read-major-mode-history)) |
| 70 | ) | 70 | ) |
| 71 | 71 | ||
| 72 | ;;;###autoload | ||
| 72 | (defun srecode-semantic-handle-:srt (dict) | 73 | (defun srecode-semantic-handle-:srt (dict) |
| 73 | "Add macros into the dictionary DICT based on the current SRT file. | 74 | "Add macros into the dictionary DICT based on the current SRT file. |
| 74 | Adds the following: | 75 | Adds the following: |
| @@ -104,4 +105,9 @@ MODE - The mode of this buffer. If not declared yet, guess." | |||
| 104 | 105 | ||
| 105 | (provide 'srecode/srt) | 106 | (provide 'srecode/srt) |
| 106 | 107 | ||
| 108 | ;; Local variables: | ||
| 109 | ;; generated-autoload-file: "loaddefs.el" | ||
| 110 | ;; generated-autoload-load-name: "srecode/srt" | ||
| 111 | ;; End: | ||
| 112 | |||
| 107 | ;;; srecode/srt.el ends here | 113 | ;;; srecode/srt.el ends here |
diff --git a/lisp/cedet/srecode/table.el b/lisp/cedet/srecode/table.el index 802740ba063..26163bd1e51 100644 --- a/lisp/cedet/srecode/table.el +++ b/lisp/cedet/srecode/table.el | |||
| @@ -251,7 +251,7 @@ Use PREDICATE is the same as for the `sort' function." | |||
| 251 | (defmethod srecode-dump ((tab srecode-template-table)) | 251 | (defmethod srecode-dump ((tab srecode-template-table)) |
| 252 | "Dump the contents of the SRecode template table TAB." | 252 | "Dump the contents of the SRecode template table TAB." |
| 253 | (princ "Template Table for ") | 253 | (princ "Template Table for ") |
| 254 | (princ (object-name-string tab)) | 254 | (princ (eieio-object-name-string tab)) |
| 255 | (princ "\nPriority: ") | 255 | (princ "\nPriority: ") |
| 256 | (prin1 (oref tab :priority)) | 256 | (prin1 (oref tab :priority)) |
| 257 | (when (oref tab :application) | 257 | (when (oref tab :application) |
diff --git a/lisp/emacs-lisp/eieio-datadebug.el b/lisp/emacs-lisp/eieio-datadebug.el index 7daa24257a1..d3ae8b191e1 100644 --- a/lisp/emacs-lisp/eieio-datadebug.el +++ b/lisp/emacs-lisp/eieio-datadebug.el | |||
| @@ -80,38 +80,39 @@ PREBUTTONTEXT is some text between PREFIX and the object button." | |||
| 80 | ;; Each object should have an opportunity to show stuff about itself. | 80 | ;; Each object should have an opportunity to show stuff about itself. |
| 81 | 81 | ||
| 82 | (defmethod data-debug/eieio-insert-slots ((obj eieio-default-superclass) | 82 | (defmethod data-debug/eieio-insert-slots ((obj eieio-default-superclass) |
| 83 | prefix) | 83 | prefix) |
| 84 | "Insert the slots of OBJ into the current DDEBUG buffer." | 84 | "Insert the slots of OBJ into the current DDEBUG buffer." |
| 85 | (data-debug-insert-thing (eieio-object-name-string obj) | 85 | (let ((inhibit-read-only t)) |
| 86 | prefix | 86 | (data-debug-insert-thing (eieio-object-name-string obj) |
| 87 | "Name: ") | 87 | prefix |
| 88 | (let* ((cl (eieio-object-class obj)) | 88 | "Name: ") |
| 89 | (cv (class-v cl))) | 89 | (let* ((cl (eieio-object-class obj)) |
| 90 | (data-debug-insert-thing (class-constructor cl) | 90 | (cv (class-v cl))) |
| 91 | prefix | 91 | (data-debug-insert-thing (class-constructor cl) |
| 92 | "Class: ") | 92 | prefix |
| 93 | ;; Loop over all the public slots | 93 | "Class: ") |
| 94 | (let ((publa (eieio--class-public-a cv)) | 94 | ;; Loop over all the public slots |
| 95 | ) | 95 | (let ((publa (eieio--class-public-a cv)) |
| 96 | (while publa | 96 | ) |
| 97 | (if (slot-boundp obj (car publa)) | 97 | (while publa |
| 98 | (let* ((i (class-slot-initarg cl (car publa))) | 98 | (if (slot-boundp obj (car publa)) |
| 99 | (v (eieio-oref obj (car publa)))) | 99 | (let* ((i (class-slot-initarg cl (car publa))) |
| 100 | (data-debug-insert-thing | 100 | (v (eieio-oref obj (car publa)))) |
| 101 | v prefix (concat | 101 | (data-debug-insert-thing |
| 102 | (if i (symbol-name i) | 102 | v prefix (concat |
| 103 | (symbol-name (car publa))) | 103 | (if i (symbol-name i) |
| 104 | " "))) | 104 | (symbol-name (car publa))) |
| 105 | ;; Unbound case | 105 | " "))) |
| 106 | (let ((i (class-slot-initarg cl (car publa)))) | 106 | ;; Unbound case |
| 107 | (data-debug-insert-custom | 107 | (let ((i (class-slot-initarg cl (car publa)))) |
| 108 | "#unbound" prefix | 108 | (data-debug-insert-custom |
| 109 | (concat (if i (symbol-name i) | 109 | "#unbound" prefix |
| 110 | (symbol-name (car publa))) | 110 | (concat (if i (symbol-name i) |
| 111 | " ") | 111 | (symbol-name (car publa))) |
| 112 | 'font-lock-keyword-face)) | 112 | " ") |
| 113 | ) | 113 | 'font-lock-keyword-face)) |
| 114 | (setq publa (cdr publa)))))) | 114 | ) |
| 115 | (setq publa (cdr publa))))))) | ||
| 115 | 116 | ||
| 116 | ;;; Augment the Data debug thing display list. | 117 | ;;; Augment the Data debug thing display list. |
| 117 | (data-debug-add-specialized-thing (lambda (thing) (object-p thing)) | 118 | (data-debug-add-specialized-thing (lambda (thing) (object-p thing)) |