Commit | Line | Data |
---|---|---|
b2b35d56 CY |
1 | ;;; cedet.el --- Setup CEDET environment |
2 | ||
acaf905b | 3 | ;; Copyright (C) 2002-2012 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 | ||
62a81506 | 38 | (defconst cedet-version "1.1" |
b2b35d56 CY |
39 | "Current version of CEDET.") |
40 | ||
b2b35d56 CY |
41 | (defconst cedet-packages |
42 | `( | |
62a81506 CY |
43 | ;;PACKAGE MIN-VERSION INSTALLDIR DOCDIR |
44 | (cedet ,cedet-version "common" "common" ) | |
45 | (eieio "1.4" nil "eieio" ) | |
46 | (semantic "2.1" nil "semantic/doc") | |
47 | (srecode "1.1" nil "srecode" ) | |
48 | (ede "1.1" nil "ede" ) | |
49 | (speedbar "1.0.4" nil "speedbar" ) | |
50 | (cogre "1.1" nil "cogre" ) | |
51 | (cedet-contrib "1.1" "contrib" nil ) | |
52 | ) | |
53 | "Table of CEDET packages to install.") | |
b2b35d56 | 54 | |
715f35a5 CY |
55 | (defvar cedet-menu-map ;(make-sparse-keymap "CEDET menu") |
56 | (let ((map (make-sparse-keymap "CEDET menu"))) | |
57 | (define-key map [semantic-force-refresh] 'undefined) | |
58 | (define-key map [semantic-edit-menu] 'undefined) | |
59 | (define-key map [navigate-menu] 'undefined) | |
60 | (define-key map [semantic-options-separator] 'undefined) | |
61 | (define-key map [global-semantic-highlight-func-mode] 'undefined) | |
62 | (define-key map [global-semantic-highlight-func-mode] 'undefined) | |
63 | (define-key map [global-semantic-decoration-mode] 'undefined) | |
64 | (define-key map [global-semantic-idle-completions-mode] 'undefined) | |
65 | (define-key map [global-semantic-idle-summary-mode] 'undefined) | |
715f35a5 | 66 | (define-key map [global-semantic-idle-scheduler-mode] 'undefined) |
725bff06 | 67 | (define-key map [global-semanticdb-minor-mode] 'undefined) |
715f35a5 | 68 | (define-key map [cedet-menu-separator] 'undefined) |
715f35a5 CY |
69 | (define-key map [ede-find-file] 'undefined) |
70 | (define-key map [ede-speedbar] 'undefined) | |
71 | (define-key map [ede] 'undefined) | |
72 | (define-key map [ede-new] 'undefined) | |
73 | (define-key map [ede-target-options] 'undefined) | |
74 | (define-key map [ede-project-options] 'undefined) | |
75 | (define-key map [ede-build-forms-menu] 'undefined) | |
76 | map) | |
77 | "Menu keymap for the CEDET package. | |
78 | This is used by `semantic-mode' and `global-ede-mode'.") | |
b2b35d56 CY |
79 | |
80 | (defun cedet-version () | |
cd1181db | 81 | "Display all active versions of CEDET and dependent packages. |
b2b35d56 CY |
82 | |
83 | The PACKAGE column is the name of a given package from CEDET. | |
84 | ||
85 | REQUESTED VERSION is the version requested by the CEDET load script. | |
86 | See `cedet-packages' for details. | |
87 | ||
88 | FILE VERSION is the version number found in the source file | |
bd2afec2 | 89 | for the specified PACKAGE. |
b2b35d56 | 90 | |
cd1181db | 91 | LOADED VERSION is the version of PACKAGE currently loaded in Emacs |
b2b35d56 CY |
92 | memory and (presumably) running in this Emacs instance. Value is X |
93 | if the package has not been loaded." | |
94 | (interactive) | |
95 | (require 'inversion) | |
96 | (with-output-to-temp-buffer "*CEDET*" | |
97 | (princ "CEDET Version:\t") (princ cedet-version) | |
98 | (princ "\n \t\t\tRequested\tFile\t\tLoaded") | |
99 | (princ "\n Package\t\tVersion\t\tVersion\t\tVersion") | |
100 | (princ "\n ----------------------------------------------------------") | |
101 | (let ((p cedet-packages)) | |
102 | (while p | |
103 | (let ((sym (symbol-name (car (car p))))) | |
104 | (princ "\n ") | |
105 | (princ sym) | |
106 | (princ ":\t") | |
107 | (if (< (length sym) 5) | |
108 | (princ "\t")) | |
109 | (if (< (length sym) 13) | |
110 | (princ "\t")) | |
111 | (let ((reqver (nth 1 (car p))) | |
112 | (filever (car (inversion-find-version sym))) | |
113 | (loadver (when (featurep (car (car p))) | |
114 | (symbol-value (intern-soft (concat sym "-version")))))) | |
115 | (princ reqver) | |
116 | (if (< (length reqver) 8) (princ "\t")) | |
117 | (princ "\t") | |
118 | (if (string= filever reqver) | |
119 | ;; I tried the words "check" and "match", but that | |
120 | ;; just looked lame. | |
121 | (princ "ok\t") | |
122 | (princ filever) | |
123 | (if (< (length filever) 8) (princ "\t"))) | |
124 | (princ "\t") | |
125 | (if loadver | |
126 | (if (string= loadver reqver) | |
127 | (princ "ok") | |
128 | (princ loadver)) | |
129 | (princ "Not Loaded")) | |
130 | )) | |
131 | (setq p (cdr p)))) | |
132 | (princ "\n\n\nC-h f cedet-version RET\n for details on output format.") | |
133 | )) | |
134 | ||
135 | (provide 'cedet) | |
136 | ||
137 | ;;; cedet.el ends here |