(Required environment): Modify for the new URLs of APEL and FLIM.
[elisp/semi.git] / pgg-def.el
1 ;;; pgg-def.el --- functions/macros for defining PGG functions
2
3 ;; Copyright (C) 1999 Free Software Foundation, Inc.
4
5 ;; Author: Daiki Ueno <ueno@unixuser.org>
6 ;; Created: 1999/11/02
7 ;; Keywords: PGP, OpenPGP, GnuPG
8
9 ;; This file is part of SEMI (Secure Emacs MIME Interface).
10
11 ;; This program is free software; you can redistribute it and/or
12 ;; modify it under the terms of the GNU General Public License as
13 ;; published by the Free Software Foundation; either version 2, or (at
14 ;; your option) any later version.
15
16 ;; This program is distributed in the hope that it will be useful, but
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19 ;; General Public License for more details.
20
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 ;; Boston, MA 02110-1301, USA.
25
26 ;;; Code:
27
28 (require 'custom)
29
30 (defgroup pgg ()
31   "Glue for the various PGP implementations."
32   :group 'mime)
33
34 (defcustom pgg-default-scheme 'gpg
35   "Default PGP scheme."
36   :group 'pgg
37   :type '(choice (const :tag "GnuPG" gpg)
38                  (const :tag "PGP 5" pgp5)
39                  (const :tag "PGP" pgp)))
40
41 (defcustom pgg-default-user-id (user-login-name)
42   "User ID of your default identity."
43   :group 'pgg
44   :type 'string)
45
46 (defcustom pgg-default-keyserver-address "wwwkeys.pgp.net"
47   "Host name of keyserver."
48   :group 'pgg
49   :type 'string)
50
51 (defcustom pgg-encrypt-for-me nil
52   "If t, encrypt all outgoing messages with user's public key."
53   :group 'pgg
54   :type 'boolean)
55
56 (defcustom pgg-cache-passphrase t
57   "If t, cache passphrase."
58   :group 'pgg
59   :type 'boolean)
60
61 (defcustom pgg-decrypt-automatically nil
62   "*If t, decrypt messages automatically."
63   :group 'pgg
64   :type 'boolean)
65
66 (defvar pgg-messages-coding-system nil
67   "Coding system used when reading from a PGP external process.")
68
69 (defvar pgg-messages-locale nil
70   "Locale set before running a PGP external process.")
71
72 (defvar pgg-status-buffer " *PGG status*")
73 (defvar pgg-errors-buffer " *PGG errors*")
74 (defvar pgg-output-buffer " *PGG output*")
75
76 (defvar pgg-echo-buffer "*PGG-echo*")
77
78 (defvar pgg-scheme nil
79   "Current scheme of PGP implementation.")
80
81 (defmacro pgg-truncate-key-identifier (key)
82   `(if (> (length ,key) 8) (substring ,key 8) ,key))
83
84 (provide 'pgg-def)
85
86 ;;; pgg-def.el ends here