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