Mercurial > emacs
annotate lisp/epa-dired.el @ 94674:ef65fa4dca3b
Switch to recommended form of GPLv3 permissions notice.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Tue, 06 May 2008 07:22:30 +0000 |
parents | 1a8916b995cf |
children | ee5932bf781d |
rev | line source |
---|---|
91647 | 1 ;;; epa-dired.el --- the EasyPG Assistant, dired extension |
2 ;; Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc. | |
3 | |
4 ;; Author: Daiki Ueno <ueno@unixuser.org> | |
5 ;; Keywords: PGP, GnuPG | |
6 | |
7 ;; This file is part of GNU Emacs. | |
8 | |
9 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
10 ;; it under the terms of the GNU General Public License as published by | |
91654 | 11 ;; the Free Software Foundation; either version 3, or (at your option) |
91647 | 12 ;; any later version. |
13 | |
14 ;; GNU Emacs is distributed in the hope that it will be useful, | |
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 ;; GNU General Public License for more details. | |
18 | |
19 ;; You should have received a copy of the GNU General Public License | |
20 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
21 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |
22 ;; Boston, MA 02110-1301, USA. | |
23 | |
24 ;;; Code: | |
25 | |
26 (require 'epa) | |
27 (require 'dired) | |
28 | |
91787
457a4ba95667
EasyPG: Update manual, menu label, epa-menu-mode->epa-mode, dired minor mode.
Michael Olson <mwolson@gnu.org>
parents:
91731
diff
changeset
|
29 ;;;###autoload |
91647 | 30 (defun epa-dired-do-decrypt () |
31 "Decrypt marked files." | |
32 (interactive) | |
33 (let ((file-list (dired-get-marked-files))) | |
34 (while file-list | |
35 (epa-decrypt-file (expand-file-name (car file-list))) | |
36 (setq file-list (cdr file-list))) | |
37 (revert-buffer))) | |
38 | |
94417
1a8916b995cf
* epa-file.el (auto-encryption-mode): Rename from epa-file-mode.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
91787
diff
changeset
|
39 ;;;###autoload |
91647 | 40 (defun epa-dired-do-verify () |
41 "Verify marked files." | |
42 (interactive) | |
43 (let ((file-list (dired-get-marked-files))) | |
44 (while file-list | |
45 (epa-verify-file (expand-file-name (car file-list))) | |
46 (setq file-list (cdr file-list))))) | |
47 | |
94417
1a8916b995cf
* epa-file.el (auto-encryption-mode): Rename from epa-file-mode.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
91787
diff
changeset
|
48 ;;;###autoload |
91647 | 49 (defun epa-dired-do-sign () |
50 "Sign marked files." | |
51 (interactive) | |
52 (let ((file-list (dired-get-marked-files))) | |
53 (while file-list | |
54 (epa-sign-file | |
55 (expand-file-name (car file-list)) | |
56 (epa-select-keys (epg-make-context) "Select keys for signing. | |
57 If no one is selected, default secret key is used. " | |
58 nil t) | |
59 (y-or-n-p "Make a detached signature? ")) | |
60 (setq file-list (cdr file-list))) | |
61 (revert-buffer))) | |
62 | |
94417
1a8916b995cf
* epa-file.el (auto-encryption-mode): Rename from epa-file-mode.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
91787
diff
changeset
|
63 ;;;###autoload |
91647 | 64 (defun epa-dired-do-encrypt () |
65 "Encrypt marked files." | |
66 (interactive) | |
67 (let ((file-list (dired-get-marked-files))) | |
68 (while file-list | |
69 (epa-encrypt-file | |
70 (expand-file-name (car file-list)) | |
71 (epa-select-keys (epg-make-context) "Select recipents for encryption. | |
72 If no one is selected, symmetric encryption will be performed. ")) | |
73 (setq file-list (cdr file-list))) | |
74 (revert-buffer))) | |
75 | |
76 (provide 'epa-dired) | |
77 | |
91687 | 78 ;; arch-tag: 2025700b-48d0-4684-bc94-228ad1f8e9ff |
91647 | 79 ;;; epa-dired.el ends here |