Mercurial > emacs
annotate lisp/cedet/ede/dired.el @ 108716:bd3afd9376c5
Remove obsolete comment.
author | Juri Linkov <juri@jurta.org> |
---|---|
date | Fri, 21 May 2010 00:38:59 +0300 |
parents | 5143700578d0 |
children | b799d38f522a |
rev | line source |
---|---|
104496
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
1 ;;; ede/dired.el --- EDE extensions to dired. |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
2 |
106815 | 3 ;; Copyright (C) 1998, 1999, 2000, 2003, 2009, 2010 |
105292 | 4 ;; Free Software Foundation, Inc. |
104496
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
5 |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
6 ;; Author: Eric M. Ludlam <zappo@gnu.org> |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
7 ;; Version: 0.4 |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
8 ;; Keywords: project, make |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
9 |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
10 ;; This file is part of GNU Emacs. |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
11 |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
12 ;; GNU Emacs is free software: you can redistribute it and/or modify |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
13 ;; it under the terms of the GNU General Public License as published by |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
14 ;; the Free Software Foundation, either version 3 of the License, or |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
15 ;; (at your option) any later version. |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
16 |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
17 ;; GNU Emacs is distributed in the hope that it will be useful, |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
20 ;; GNU General Public License for more details. |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
21 |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
22 ;; You should have received a copy of the GNU General Public License |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
24 |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
25 ;;; Commentary: |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
26 ;; |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
27 ;; This provides a dired interface to EDE, allowing users to modify |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
28 ;; their project file by adding files (or whatever) directly from a |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
29 ;; dired buffer. |
108210
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
30 (eval-when-compile (require 'cl)) |
104496
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
31 (require 'easymenu) |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
32 (require 'dired) |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
33 (require 'ede) |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
34 |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
35 ;;; Code: |
108210
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
36 (defvar ede-dired-keymap |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
37 (let ((map (make-sparse-keymap))) |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
38 (define-key map ".a" 'ede-dired-add-to-target) |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
39 (define-key map ".t" 'ede-new-target) |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
40 (define-key map ".s" 'ede-speedbar) |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
41 (define-key map ".C" 'ede-compile-project) |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
42 (define-key map ".d" 'ede-make-dist) |
104496
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
43 |
108210
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
44 (easy-menu-define |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
45 ede-dired-menu map "EDE Dired Minor Mode Menu" |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
46 '("Project" |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
47 [ "Add files to target" ede-dired-add-to-target (ede-current-project) ] |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
48 ( "Build" :filter ede-build-forms-menu) |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
49 "-" |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
50 [ "Create Project" ede-new (not (ede-current-project)) ] |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
51 [ "Create Target" ede-new-target (ede-current-project) ] |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
52 "-" |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
53 ( "Customize Project" :filter ede-customize-forms-menu ) |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
54 [ "View Project Tree" ede-speedbar (ede-current-project) ] |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
55 )) |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
56 map) |
104496
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
57 "Keymap used for ede dired minor mode.") |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
58 |
108210
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
59 (define-minor-mode ede-dired-minor-mode |
104496
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
60 "A minor mode that should only be activated in DIRED buffers. |
108210
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
61 If ARG is nil or a positive number, force on, if |
104496
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
62 negative, force off." |
108210
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
63 :lighter " EDE" :keymap ede-dired-keymap |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
64 (unless (derived-mode-p 'dired-mode) |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
65 (setq ede-dired-minor-mode nil) |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
66 (error "Not in DIRED mode")) |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
67 (unless (or (ede-directory-project-p default-directory) |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
68 (interactive-p)) |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
69 (setq ede-dired-minor-mode nil))) |
104496
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
70 |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
71 (defun ede-dired-add-to-target (target) |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
72 "Add a file, or all marked files into a TARGET." |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
73 (interactive (list |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
74 (let ((ede-object (ede-current-project))) |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
75 (ede-invoke-method 'project-interactive-select-target |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
76 "Add files to Target: ")))) |
108210
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
77 (dolist (file (dired-get-marked-files t)) |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
78 (project-add-file target file) |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
79 ;; Find the buffer for this files, and set it's ede-object |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
80 (if (get-file-buffer file) |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
81 (with-current-buffer (get-file-buffer file) |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
82 (setq ede-object nil) |
5143700578d0
Use define-minor-mode in CEDET where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
83 (setq ede-object (ede-buffer-object (current-buffer))))))) |
104496
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
84 |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
85 (provide 'ede/dired) |
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
86 |
105377 | 87 ;; arch-tag: 95d3e0a7-a8b7-43a9-b7df-ba647e4c56f6 |
104496
8c4870c15962
* cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
88 ;;; ede/dired.el ends here |