1 ;; mc-setversion.el, Support for multiple versions of PGP.
2 ;; Copyright (C) 1998 Len Budney <lbudney@pobox.com>
5 ;; This file is intended to be used with GNU Emacs.
7 ;; This program is free software; you can redistribute it and/or modify
8 ;; it under the terms of the GNU General Public License as published by
9 ;; the Free Software Foundation; either version 2, or (at your option)
12 ;; This program is distributed in the hope that it will be useful,
13 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;; GNU General Public License for more details.
17 ;; You should have received a copy of the GNU General Public License
18 ;; along with GNU Emacs; see the file COPYING. If not, write to
19 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
22 (defvar mc-default-scheme 'mc-scheme-pgp
23 "*Set the default encryption scheme for Mailcrypt to use. Defaults
24 to pgp 2.6 for backward compatibility.")
26 (defun mc-setversion (&optional version)
27 "Reset path and argument information for the selected version of PGP.
28 Possible values of VERSION are 2.6, 5.0, and gpg."
35 ((eq mc-default-scheme 'mc-scheme-pgp50) "5.0")
36 ((eq mc-default-scheme 'mc-scheme-pgp) "2.6")
37 ((eq mc-default-scheme 'mc-scheme-gpg) "gpg")
40 (completion-ignore-case t))
43 (format "Select PGP version (currently %s): " oldversion)
53 (if (equal (length version) 0)
54 (setq version oldversion))))
57 ((string-equal version "5.0")
59 (setq mc-default-scheme 'mc-scheme-pgp50)
60 (message "PGP version set to 5.0.")))
61 ((string-equal version "2.6")
63 (setq mc-default-scheme 'mc-scheme-pgp)
64 (message "PGP version set to 2.6.")))
65 ((string-equal version "gpg")
67 (setq mc-default-scheme 'mc-scheme-gpg)
68 (message "PGP version set to GPG.")))
69 (t (error "bad version string")) ; cannot happen