Mercurial > emacs
annotate lisp/epa-dired.el @ 112375:b7555c0e51fe
Merge from mainline.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Wed, 19 Jan 2011 15:02:04 -0800 |
parents | ef719132ddfa |
children |
rev | line source |
---|---|
91647 | 1 ;;; epa-dired.el --- the EasyPG Assistant, dired extension |
112218
376148b31b5e
Add 2011 to FSF/AIST copyright years.
Glenn Morris <rgm@gnu.org>
parents:
106815
diff
changeset
|
2 ;; Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. |
91647 | 3 |
4 ;; Author: Daiki Ueno <ueno@unixuser.org> | |
5 ;; Keywords: PGP, GnuPG | |
110015
280c8ae2476d
Add "Package:" file headers to denote built-in packages.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
6 ;; Package: epa |
91647 | 7 |
8 ;; This file is part of GNU Emacs. | |
9 | |
94678
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94417
diff
changeset
|
10 ;; GNU Emacs is free software: you can redistribute it and/or modify |
91647 | 11 ;; it under the terms of the GNU General Public License as published by |
94678
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94417
diff
changeset
|
12 ;; the Free Software Foundation, either version 3 of the License, or |
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94417
diff
changeset
|
13 ;; (at your option) any later version. |
91647 | 14 |
15 ;; GNU Emacs is distributed in the hope that it will be useful, | |
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 ;; GNU General Public License for more details. | |
19 | |
20 ;; You should have received a copy of the GNU General Public License | |
94678
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94417
diff
changeset
|
21 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
91647 | 22 |
23 ;;; Code: | |
24 | |
25 (require 'epa) | |
26 (require 'dired) | |
27 | |
91787
457a4ba95667
EasyPG: Update manual, menu label, epa-menu-mode->epa-mode, dired minor mode.
Michael Olson <mwolson@gnu.org>
parents:
91731
diff
changeset
|
28 ;;;###autoload |
91647 | 29 (defun epa-dired-do-decrypt () |
30 "Decrypt marked files." | |
31 (interactive) | |
32 (let ((file-list (dired-get-marked-files))) | |
33 (while file-list | |
34 (epa-decrypt-file (expand-file-name (car file-list))) | |
35 (setq file-list (cdr file-list))) | |
36 (revert-buffer))) | |
37 | |
94417
1a8916b995cf
* epa-file.el (auto-encryption-mode): Rename from epa-file-mode.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
91787
diff
changeset
|
38 ;;;###autoload |
91647 | 39 (defun epa-dired-do-verify () |
40 "Verify marked files." | |
41 (interactive) | |
42 (let ((file-list (dired-get-marked-files))) | |
43 (while file-list | |
44 (epa-verify-file (expand-file-name (car file-list))) | |
45 (setq file-list (cdr file-list))))) | |
46 | |
94417
1a8916b995cf
* epa-file.el (auto-encryption-mode): Rename from epa-file-mode.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
91787
diff
changeset
|
47 ;;;###autoload |
91647 | 48 (defun epa-dired-do-sign () |
49 "Sign marked files." | |
50 (interactive) | |
51 (let ((file-list (dired-get-marked-files))) | |
52 (while file-list | |
53 (epa-sign-file | |
54 (expand-file-name (car file-list)) | |
55 (epa-select-keys (epg-make-context) "Select keys for signing. | |
56 If no one is selected, default secret key is used. " | |
57 nil t) | |
58 (y-or-n-p "Make a detached signature? ")) | |
59 (setq file-list (cdr file-list))) | |
60 (revert-buffer))) | |
61 | |
94417
1a8916b995cf
* epa-file.el (auto-encryption-mode): Rename from epa-file-mode.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
91787
diff
changeset
|
62 ;;;###autoload |
91647 | 63 (defun epa-dired-do-encrypt () |
64 "Encrypt marked files." | |
65 (interactive) | |
66 (let ((file-list (dired-get-marked-files))) | |
67 (while file-list | |
68 (epa-encrypt-file | |
69 (expand-file-name (car file-list)) | |
70 (epa-select-keys (epg-make-context) "Select recipents for encryption. | |
71 If no one is selected, symmetric encryption will be performed. ")) | |
72 (setq file-list (cdr file-list))) | |
73 (revert-buffer))) | |
74 | |
75 (provide 'epa-dired) | |
76 | |
77 ;;; epa-dired.el ends here |