Commit | Line | Data |
---|---|---|
b2b35d56 CY |
1 | ;;; cedet.el --- Setup CEDET environment |
2 | ||
5df4f04c | 3 | ;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 |
bd2afec2 | 4 | ;; Free Software Foundation, Inc. |
b2b35d56 CY |
5 | |
6 | ;; Author: David Ponce <david@dponce.com> | |
7 | ;; Maintainer: Eric M. Ludlam <zappo@gnu.org> | |
8 | ;; Version: 0.2 | |
9 | ;; Keywords: OO, lisp | |
10 | ||
11 | ;; This file is part of GNU Emacs. | |
12 | ||
13 | ;; GNU Emacs is free software: you can redistribute it and/or modify | |
14 | ;; it under the terms of the GNU General Public License as published by | |
15 | ;; the Free Software Foundation, either version 3 of the License, or | |
16 | ;; (at your option) any later version. | |
17 | ||
18 | ;; GNU Emacs is distributed in the hope that it will be useful, | |
19 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 | ;; GNU General Public License for more details. | |
22 | ||
23 | ;; You should have received a copy of the GNU General Public License | |
24 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | |
25 | ||
26 | ;;; Commentary: | |
a964f5e5 CY |
27 | |
28 | ;;; Code: | |
b2b35d56 | 29 | ;; |
826608a5 CY |
30 | ;; This file depends on the major components of CEDET, so that you can |
31 | ;; load them all by doing (require 'cedet). This is mostly for | |
32 | ;; compatibility with the upstream, stand-alone CEDET distribution. | |
b2b35d56 CY |
33 | |
34 | (eval-when-compile | |
35 | (require 'cl)) | |
36 | ||
715f35a5 CY |
37 | (declare-function inversion-find-version "inversion") |
38 | ||
b9749554 | 39 | (defconst cedet-version "1.0" |
b2b35d56 CY |
40 | "Current version of CEDET.") |
41 | ||
b2b35d56 CY |
42 | (defconst cedet-packages |
43 | `( | |
44 | ;;PACKAGE MIN-VERSION | |
45 | (cedet ,cedet-version) | |
b9749554 EL |
46 | (eieio "1.3") |
47 | (semantic "2.0") | |
48 | (srecode "1.0") | |
49 | (ede "1.0") | |
50 | (speedbar "1.0")) | |
51 | "Table of CEDET packages installed.") | |
b2b35d56 | 52 | |
715f35a5 CY |
53 | (defvar cedet-menu-map ;(make-sparse-keymap "CEDET menu") |
54 | (let ((map (make-sparse-keymap "CEDET menu"))) | |
55 | (define-key map [semantic-force-refresh] 'undefined) | |
56 | (define-key map [semantic-edit-menu] 'undefined) | |
57 | (define-key map [navigate-menu] 'undefined) | |
58 | (define-key map [semantic-options-separator] 'undefined) | |
59 | (define-key map [global-semantic-highlight-func-mode] 'undefined) | |
60 | (define-key map [global-semantic-highlight-func-mode] 'undefined) | |
61 | (define-key map [global-semantic-decoration-mode] 'undefined) | |
62 | (define-key map [global-semantic-idle-completions-mode] 'undefined) | |
63 | (define-key map [global-semantic-idle-summary-mode] 'undefined) | |
715f35a5 | 64 | (define-key map [global-semantic-idle-scheduler-mode] 'undefined) |
725bff06 | 65 | (define-key map [global-semanticdb-minor-mode] 'undefined) |
715f35a5 | 66 | (define-key map [cedet-menu-separator] 'undefined) |
715f35a5 CY |
67 | (define-key map [ede-find-file] 'undefined) |
68 | (define-key map [ede-speedbar] 'undefined) | |
69 | (define-key map [ede] 'undefined) | |
70 | (define-key map [ede-new] 'undefined) | |
71 | (define-key map [ede-target-options] 'undefined) | |
72 | (define-key map [ede-project-options] 'undefined) | |
73 | (define-key map [ede-build-forms-menu] 'undefined) | |
74 | map) | |
75 | "Menu keymap for the CEDET package. | |
76 | This is used by `semantic-mode' and `global-ede-mode'.") | |
b2b35d56 CY |
77 | |
78 | (defun cedet-version () | |
79 | "Display all active versions of CEDET and Dependant packages. | |
80 | ||
81 | The PACKAGE column is the name of a given package from CEDET. | |
82 | ||
83 | REQUESTED VERSION is the version requested by the CEDET load script. | |
84 | See `cedet-packages' for details. | |
85 | ||
86 | FILE VERSION is the version number found in the source file | |
bd2afec2 | 87 | for the specified PACKAGE. |
b2b35d56 CY |
88 | |
89 | LOADED VERSION is the version of PACKAGE current loaded in Emacs | |
90 | memory and (presumably) running in this Emacs instance. Value is X | |
91 | if the package has not been loaded." | |
92 | (interactive) | |
93 | (require 'inversion) | |
94 | (with-output-to-temp-buffer "*CEDET*" | |
95 | (princ "CEDET Version:\t") (princ cedet-version) | |
96 | (princ "\n \t\t\tRequested\tFile\t\tLoaded") | |
97 | (princ "\n Package\t\tVersion\t\tVersion\t\tVersion") | |
98 | (princ "\n ----------------------------------------------------------") | |
99 | (let ((p cedet-packages)) | |
100 | (while p | |
101 | (let ((sym (symbol-name (car (car p))))) | |
102 | (princ "\n ") | |
103 | (princ sym) | |
104 | (princ ":\t") | |
105 | (if (< (length sym) 5) | |
106 | (princ "\t")) | |
107 | (if (< (length sym) 13) | |
108 | (princ "\t")) | |
109 | (let ((reqver (nth 1 (car p))) | |
110 | (filever (car (inversion-find-version sym))) | |
111 | (loadver (when (featurep (car (car p))) | |
112 | (symbol-value (intern-soft (concat sym "-version")))))) | |
113 | (princ reqver) | |
114 | (if (< (length reqver) 8) (princ "\t")) | |
115 | (princ "\t") | |
116 | (if (string= filever reqver) | |
117 | ;; I tried the words "check" and "match", but that | |
118 | ;; just looked lame. | |
119 | (princ "ok\t") | |
120 | (princ filever) | |
121 | (if (< (length filever) 8) (princ "\t"))) | |
122 | (princ "\t") | |
123 | (if loadver | |
124 | (if (string= loadver reqver) | |
125 | (princ "ok") | |
126 | (princ loadver)) | |
127 | (princ "Not Loaded")) | |
128 | )) | |
129 | (setq p (cdr p)))) | |
130 | (princ "\n\n\nC-h f cedet-version RET\n for details on output format.") | |
131 | )) | |
132 | ||
133 | (provide 'cedet) | |
134 | ||
3999968a | 135 | ;; arch-tag: ad4b0b63-d1f9-4a41-b003-9bbb2feb5226 |
b2b35d56 | 136 | ;;; cedet.el ends here |