Mercurial > emacs
annotate lisp/epa-dired.el @ 103693:e094814e8eed
Virtual Info files and nodes.
(Info-virtual-files, Info-virtual-nodes): New variables.
(Info-current-node-virtual): New variable.
(Info-virtual-file-p, Info-virtual-fun, Info-virtual-call):
New functions.
(Info-file-supports-index-cookies): Use Info-virtual-file-p
to check for a virtual file instead of checking a fixed list
of node names.
(Info-find-file): Use Info-virtual-fun and Info-virtual-call
instead of ad-hoc processing of "dir" and (apropos history toc).
(Info-find-node-2): Use Info-virtual-fun and Info-virtual-call
instead of ad-hoc processing of "dir" and (apropos history toc).
Reread a file when moving from a virtual node.
(add-to-list)<Info-virtual-files>: Add "\\`dir\\'".
(Info-directory-toc-nodes, Info-directory-find-file)
(Info-directory-find-node): New functions.
(add-to-list)<Info-virtual-files>: Add "\\`\\*History\\*\\'".
(Info-history): Move part of code to
`Info-history-find-node'.
(Info-history-toc-nodes, Info-history-find-file)
(Info-history-find-node): New functions.
(add-to-list)<Info-virtual-nodes>: Add "\\`\\*TOC\\*\\'".
(Info-toc): Move part of code to `Info-toc-find-node'.
(Info-toc-find-node): New function.
(Info-toc-insert): Renamed from `Info-insert-toc'. Don't insert
the current Info file name to references because now the node
"*TOC*" belongs to the same Info manual.
(Info-toc-build): Renamed from `Info-build-toc'.
(Info-toc-nodes): Rename input argument `file' to `filename'.
Use Info-virtual-fun, Info-virtual-call and Info-virtual-file-p
instead of ad-hoc processing of ("dir" apropos history toc).
(Info-index-nodes): Use Info-virtual-file-p
to check for a virtual file instead of checking a fixed list
of node names.
(Info-index-node): Add check for `Info-current-node-virtual'.
Raise `save-match-data' higher up the tree to contain
`search-forward' too (bug fix).
(add-to-list)<Info-virtual-nodes>: Add "\\`\\*Index.*\\*\\'".
(Info-virtual-index-nodes): New variable.
(Info-virtual-index-find-node, Info-virtual-index): New functions.
(add-to-list)<Info-virtual-files>: Add "\\`\\*Apropos\\*\\'".
(Info-apropos-file, Info-apropos-nodes): New variables.
(Info-apropos-toc-nodes, Info-apropos-find-file)
(Info-apropos-find-node, Info-apropos-matches): New functions.
(info-apropos): Move part of code to `Info-apropos-find-node' and
`Info-apropos-matches'.
(Info-mode-map): Bind "I" to `Info-virtual-index'.
(Info-desktop-buffer-misc-data): Use Info-virtual-file-p to check
for a virtual file instead of checking a fixed list of node names.
author | Juri Linkov <juri@jurta.org> |
---|---|
date | Thu, 02 Jul 2009 22:47:33 +0000 |
parents | a9dc0e7c3f2b |
children | 1d1d5d9bd884 |
rev | line source |
---|---|
91647 | 1 ;;; epa-dired.el --- the EasyPG Assistant, dired extension |
100908 | 2 ;; Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc. |
91647 | 3 |
4 ;; Author: Daiki Ueno <ueno@unixuser.org> | |
5 ;; Keywords: PGP, GnuPG | |
6 | |
7 ;; This file is part of GNU Emacs. | |
8 | |
94678
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94417
diff
changeset
|
9 ;; GNU Emacs is free software: you can redistribute it and/or modify |
91647 | 10 ;; 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
|
11 ;; 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
|
12 ;; (at your option) any later version. |
91647 | 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 | |
94678
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94417
diff
changeset
|
20 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
91647 | 21 |
22 ;;; Code: | |
23 | |
24 (require 'epa) | |
25 (require 'dired) | |
26 | |
91787
457a4ba95667
EasyPG: Update manual, menu label, epa-menu-mode->epa-mode, dired minor mode.
Michael Olson <mwolson@gnu.org>
parents:
91731
diff
changeset
|
27 ;;;###autoload |
91647 | 28 (defun epa-dired-do-decrypt () |
29 "Decrypt marked files." | |
30 (interactive) | |
31 (let ((file-list (dired-get-marked-files))) | |
32 (while file-list | |
33 (epa-decrypt-file (expand-file-name (car file-list))) | |
34 (setq file-list (cdr file-list))) | |
35 (revert-buffer))) | |
36 | |
94417
1a8916b995cf
* epa-file.el (auto-encryption-mode): Rename from epa-file-mode.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
91787
diff
changeset
|
37 ;;;###autoload |
91647 | 38 (defun epa-dired-do-verify () |
39 "Verify marked files." | |
40 (interactive) | |
41 (let ((file-list (dired-get-marked-files))) | |
42 (while file-list | |
43 (epa-verify-file (expand-file-name (car file-list))) | |
44 (setq file-list (cdr file-list))))) | |
45 | |
94417
1a8916b995cf
* epa-file.el (auto-encryption-mode): Rename from epa-file-mode.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
91787
diff
changeset
|
46 ;;;###autoload |
91647 | 47 (defun epa-dired-do-sign () |
48 "Sign marked files." | |
49 (interactive) | |
50 (let ((file-list (dired-get-marked-files))) | |
51 (while file-list | |
52 (epa-sign-file | |
53 (expand-file-name (car file-list)) | |
54 (epa-select-keys (epg-make-context) "Select keys for signing. | |
55 If no one is selected, default secret key is used. " | |
56 nil t) | |
57 (y-or-n-p "Make a detached signature? ")) | |
58 (setq file-list (cdr file-list))) | |
59 (revert-buffer))) | |
60 | |
94417
1a8916b995cf
* epa-file.el (auto-encryption-mode): Rename from epa-file-mode.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
91787
diff
changeset
|
61 ;;;###autoload |
91647 | 62 (defun epa-dired-do-encrypt () |
63 "Encrypt marked files." | |
64 (interactive) | |
65 (let ((file-list (dired-get-marked-files))) | |
66 (while file-list | |
67 (epa-encrypt-file | |
68 (expand-file-name (car file-list)) | |
69 (epa-select-keys (epg-make-context) "Select recipents for encryption. | |
70 If no one is selected, symmetric encryption will be performed. ")) | |
71 (setq file-list (cdr file-list))) | |
72 (revert-buffer))) | |
73 | |
74 (provide 'epa-dired) | |
75 | |
91687 | 76 ;; arch-tag: 2025700b-48d0-4684-bc94-228ad1f8e9ff |
91647 | 77 ;;; epa-dired.el ends here |