Mercurial > emacs
annotate lisp/epa-hook.el @ 105994:009383a57ce8
* x-dnd.el (x-dnd-maybe-call-test-function):
* window.el (split-window-vertically):
* whitespace.el (whitespace-help-on):
* vc-rcs.el (vc-rcs-consult-headers):
* userlock.el (ask-user-about-lock-help)
(ask-user-about-supersession-help):
* type-break.el (type-break-force-mode-line-update):
* time-stamp.el (time-stamp-conv-warn):
* terminal.el (te-set-output-log, te-more-break, te-filter)
(te-sentinel,terminal-emulator):
* term.el (make-term, term-exec, term-sentinel, term-read-input-ring)
(term-write-input-ring, term-check-source, term-start-output-log):
(term-display-buffer-line, term-dynamic-list-completions):
(term-ansi-make-term, serial-term):
* subr.el (selective-display):
* strokes.el (strokes-xpm-to-compressed-string, strokes-decode-buffer)
(strokes-encode-buffer, strokes-xpm-for-compressed-string):
* speedbar.el (speedbar-buffers-tail-notes, speedbar-buffers-item-info)
(speedbar-reconfigure-keymaps, speedbar-add-localized-speedbar-support)
(speedbar-remove-localized-speedbar-support)
(speedbar-set-mode-line-format, speedbar-create-tag-hierarchy)
(speedbar-update-special-contents, speedbar-buffer-buttons-engine)
(speedbar-buffers-line-directory):
* simple.el (shell-command-on-region, append-to-buffer)
(prepend-to-buffer):
* shadowfile.el (shadow-save-todo-file):
* scroll-bar.el (scroll-bar-set-window-start, scroll-bar-drag-1)
(scroll-bar-maybe-set-window-start):
* sb-image.el (speedbar-image-dump):
* saveplace.el (save-place-alist-to-file, save-places-to-alist)
(load-save-place-alist-from-file):
* ps-samp.el (ps-print-message-from-summary):
* ps-print.el (ps-flush-output, ps-insert-file, ps-get-boundingbox)
(ps-background-image, ps-begin-job, ps-do-despool):
* ps-bdf.el (bdf-find-file, bdf-read-font-info):
* printing.el (pr-interface, pr-ps-file-print, pr-find-buffer-visiting)
(pr-ps-message-from-summary, pr-lpr-message-from-summary):
(pr-call-process, pr-file-list, pr-interface-save):
* novice.el (disabled-command-function)
(enable-command, disable-command):
* mouse.el (mouse-buffer-menu-alist):
* mouse-copy.el (mouse-kill-preserving-secondary):
* macros.el (kbd-macro-query):
* ledit.el (ledit-go-to-lisp, ledit-go-to-liszt):
* informat.el (batch-info-validate):
* ido.el (ido-copy-current-word, ido-initiate-auto-merge):
* hippie-exp.el (try-expand-dabbrev-visible):
* help-mode.el (help-make-xrefs):
* help-fns.el (describe-variable):
* generic-x.el (bat-generic-mode-run-as-comint):
* finder.el (finder-mouse-select):
* find-dired.el (find-dired-sentinel):
* filesets.el (filesets-file-close):
* files.el (list-directory):
* faces.el (list-faces-display, describe-face):
* facemenu.el (list-colors-display):
* ezimage.el (ezimage-image-association-dump, ezimage-image-dump):
* epg.el (epg--process-filter, epg-cancel):
* epa.el (epa--marked-keys, epa--select-keys, epa-display-info)
(epa--read-signature-type):
* emerge.el (emerge-copy-as-kill-A, emerge-copy-as-kill-B)
(emerge-file-names):
* ehelp.el (electric-helpify):
* ediff.el (ediff-regions-wordwise, ediff-regions-linewise):
* ediff-vers.el (rcs-ediff-view-revision):
* ediff-util.el (ediff-setup):
* ediff-mult.el (ediff-append-custom-diff):
* ediff-diff.el (ediff-exec-process, ediff-process-sentinel)
(ediff-wordify):
* echistory.el (Electric-command-history-redo-expression):
* dos-w32.el (find-file-not-found-set-buffer-file-coding-system):
* disp-table.el (describe-display-table):
* dired.el (dired-find-buffer-nocreate):
* dired-aux.el (dired-rename-subdir, dired-dwim-target-directory):
* dabbrev.el (dabbrev--same-major-mode-p):
* chistory.el (list-command-history):
* apropos.el (apropos-documentation):
* allout.el (allout-obtain-passphrase):
(allout-copy-exposed-to-buffer):
(allout-verify-passphrase): Use with-current-buffer.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 13 Nov 2009 22:19:45 +0000 |
parents | 26baacb565b0 |
children | 1d1d5d9bd884 |
rev | line source |
---|---|
94752
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1 ;;; epa-hook.el --- preloaded code to enable epa-file.el |
100908 | 2 ;; Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc. |
94752
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3 |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
4 ;; Author: Daiki Ueno <ueno@unixuser.org> |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
5 ;; Keywords: PGP, GnuPG |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
6 |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
7 ;; This file is part of GNU Emacs. |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
8 |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
9 ;; GNU Emacs is free software: you can redistribute it and/or modify |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
10 ;; it under the terms of the GNU General Public License as published by |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
11 ;; the Free Software Foundation, either version 3 of the License, or |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
12 ;; (at your option) any later version. |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
13 |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
14 ;; GNU Emacs is distributed in the hope that it will be useful, |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
17 ;; GNU General Public License for more details. |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
18 |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
19 ;; You should have received a copy of the GNU General Public License |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
20 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
21 |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
22 ;;; Code: |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
23 |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
24 (defgroup epa-file nil |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
25 "The EasyPG Assistant hooks for transparent file encryption" |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
26 :version "23.1" |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
27 :group 'epa) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
28 |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
29 (defun epa-file--file-name-regexp-set (variable value) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
30 (set-default variable value) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
31 (if (fboundp 'epa-file-name-regexp-update) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
32 (epa-file-name-regexp-update))) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
33 |
105870
26baacb565b0
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents:
104990
diff
changeset
|
34 (defcustom epa-file-name-regexp (purecopy "\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'") |
94752
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
35 "Regexp which matches filenames to be encrypted with GnuPG. |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
36 |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
37 If you set this outside Custom while epa-file is already enabled, you |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
38 have to call `epa-file-name-regexp-update' after setting it to |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
39 properly update file-name-handler-alist. Setting this through Custom |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
40 does that automatically." |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
41 :type 'regexp |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
42 :group 'epa-file |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
43 :set 'epa-file--file-name-regexp-set) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
44 |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
45 (defcustom epa-file-inhibit-auto-save t |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
46 "If non-nil, disable auto-saving when opening an encrypted file." |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
47 :type 'boolean |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
48 :group 'epa-file) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
49 |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
50 (defvar epa-file-encrypt-to nil |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
51 "*Recipient(s) used for encrypting files. |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
52 May either be a string or a list of strings.") |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
53 |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
54 (put 'epa-file-encrypt-to 'safe-local-variable |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
55 (lambda (val) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
56 (or (stringp val) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
57 (and (listp val) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
58 (catch 'safe |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
59 (mapc (lambda (elt) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
60 (unless (stringp elt) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
61 (throw 'safe nil))) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
62 val) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
63 t))))) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
64 |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
65 (put 'epa-file-encrypt-to 'permanent-local t) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
66 |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
67 (defvar epa-file-handler |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
68 (cons epa-file-name-regexp 'epa-file-handler)) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
69 |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
70 (defvar epa-file-auto-mode-alist-entry |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
71 (list epa-file-name-regexp nil 'epa-file)) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
72 |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
73 (defun epa-file-name-regexp-update () |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
74 (interactive) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
75 (unless (equal (car epa-file-handler) epa-file-name-regexp) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
76 (setcar epa-file-handler epa-file-name-regexp))) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
77 |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
78 (defun epa-file-find-file-hook () |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
79 (if (and buffer-file-name |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
80 (string-match epa-file-name-regexp buffer-file-name) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
81 epa-file-inhibit-auto-save) |
100304
4dfef179eed3
* epa-hook.el (epa-file-find-file-hook): Don't mark the current
Daiki Ueno <ueno@unixuser.org>
parents:
94758
diff
changeset
|
82 (auto-save-mode 0))) |
94752
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
83 |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
84 (define-minor-mode auto-encryption-mode |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
85 "Toggle automatic file encryption and decryption. |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
86 With prefix argument ARG, turn auto encryption on if positive, else off. |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
87 Return the new status of auto encryption (non-nil means on)." |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
88 :global t :init-value t :group 'epa-file :version "23.1" |
104990
f0794252d960
* mail/sendmail.el (send-mail-function):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
89 ;; We'd like to use custom-initialize-set here so the setup is done |
f0794252d960
* mail/sendmail.el (send-mail-function):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
90 ;; before dumping, but at the point where the defcustom is evaluated, |
f0794252d960
* mail/sendmail.el (send-mail-function):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
91 ;; the corresponding function isn't defined yet, so |
f0794252d960
* mail/sendmail.el (send-mail-function):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
92 ;; custom-initialize-set signals an error. |
f0794252d960
* mail/sendmail.el (send-mail-function):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
93 :initialize 'custom-initialize-delay |
94752
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
94 (setq file-name-handler-alist |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
95 (delq epa-file-handler file-name-handler-alist)) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
96 (remove-hook 'find-file-hooks 'epa-file-find-file-hook) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
97 (setq auto-mode-alist (delq epa-file-auto-mode-alist-entry |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
98 auto-mode-alist)) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
99 (when auto-encryption-mode |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
100 (setq file-name-handler-alist |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
101 (cons epa-file-handler file-name-handler-alist)) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
102 (add-hook 'find-file-hook 'epa-file-find-file-hook) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
103 (setq auto-mode-alist (cons epa-file-auto-mode-alist-entry |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
104 auto-mode-alist)))) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
105 |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
106 (put 'epa-file-handler 'safe-magic t) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
107 (put 'epa-file-handler 'operations '(write-region insert-file-contents)) |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
108 |
94755
14eda1195ec3
Provide/require epa-hook, not epa-file-hook.
Eli Zaretskii <eliz@gnu.org>
parents:
94752
diff
changeset
|
109 (provide 'epa-hook) |
94752
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
110 |
73a86a36a458
Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
111 ;; arch-tag: f75c8a50-d32e-4eb3-9ec6-9e940c1fc8b5 |
94758
2b066c2202f5
Change file name on the last line.
Eli Zaretskii <eliz@gnu.org>
parents:
94755
diff
changeset
|
112 ;;; epa-hook.el ends here |