* net/tramp-compat.el (tramp-compat-temporary-file-directory):
[emacs.git] / lisp / cedet / cedet.el
blob6da3b5de547d575ad87be0a07e4f689df0b60f0d
1 ;;; cedet.el --- Setup CEDET environment
3 ;; Copyright (C) 2002-2012 Free Software Foundation, Inc.
5 ;; Author: David Ponce <david@dponce.com>
6 ;; Maintainer: Eric M. Ludlam <zappo@gnu.org>
7 ;; Version: 1.0pre7
8 ;; Keywords: OO, lisp
10 ;; This file is part of GNU Emacs.
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.
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.
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/>.
25 ;;; Commentary:
27 ;;; Code:
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.
33 (eval-when-compile
34 (require 'cl))
36 (declare-function inversion-find-version "inversion")
38 (defconst cedet-version "1.0"
39 "Current version of CEDET.")
41 (defconst cedet-packages
43 ;;PACKAGE MIN-VERSION
44 (cedet ,cedet-version)
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.")
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)
63 (define-key map [global-semantic-idle-scheduler-mode] 'undefined)
64 (define-key map [global-semanticdb-minor-mode] 'undefined)
65 (define-key map [cedet-menu-separator] 'undefined)
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'.")
77 (defun cedet-version ()
78 "Display all active versions of CEDET and dependent packages.
80 The PACKAGE column is the name of a given package from CEDET.
82 REQUESTED VERSION is the version requested by the CEDET load script.
83 See `cedet-packages' for details.
85 FILE VERSION is the version number found in the source file
86 for the specified PACKAGE.
88 LOADED VERSION is the version of PACKAGE currently loaded in Emacs
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"))
128 (setq p (cdr p))))
129 (princ "\n\n\nC-h f cedet-version RET\n for details on output format.")
132 (provide 'cedet)
134 ;;; cedet.el ends here