diff options
author | Ronan Waide <waider@waider.ie> | 2003-08-11 08:54:35 +0000 |
---|---|---|
committer | Ronan Waide <waider@waider.ie> | 2003-08-11 08:54:35 +0000 |
commit | 0c25e8aef910b60edf2d00155f7cc1c6567cff2d (patch) | |
tree | dbdba823ed2b89d9959ab53d6bde66c83aa2b6e3 | |
parent | beae165f30c3079151f2706e6c78b41fac397787 (diff) |
One more tiny fix from Jochen
-rw-r--r-- | bits/bbdb-pgp.el | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/bits/bbdb-pgp.el b/bits/bbdb-pgp.el index 23597fe..b1968b6 100644 --- a/bits/bbdb-pgp.el +++ b/bits/bbdb-pgp.el @@ -8,7 +8,7 @@ ;; Version: $Revision$ ;; Keywords: PGP BBDB message mailcrypt - + ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) @@ -53,7 +53,7 @@ ;; ;; and possibly (if you do not want the PGP field printed out) ;; (add-hook 'bbdb-print-elide bbdb-pgp-field) -;; +;; ;; The variable bbdb/pgp-default-action defines what to do if the recipient ;; is not in the BBDB. @@ -104,10 +104,10 @@ encrypted. If it is \"sign\" then messages are signed." 'mml-pgpmime means add MML tags for Message to use PGP/MIME 'mml-smime means add MML tags for Message to use S/MIME" :type '(choice - (const :tag "Mailcrypt" mailcrypt :require 'mailcrypt) - (const :tag "MML PGP" mml-pgp :require 'mml) - (const :tag "MML PGP/MIME" mml-pgpmime :require 'mml) - (const :tag "MML S/MIME" mml-smime :require 'mml)) + (const :tag "Mailcrypt" mailcrypt :require 'mailcrypt) + (const :tag "MML PGP" mml-pgp :require 'mml) + (const :tag "MML PGP/MIME" mml-pgpmime :require 'mml) + (const :tag "MML S/MIME" mml-smime :require 'mml)) :tag "Signing/Encryption Method" :group 'bbdb-utilities-pgp) @@ -118,9 +118,9 @@ nil means do nothing. 'encrypt means encrypt message. 'sign means sign message." :type '(choice - (const :tag "Do Nothing") - (const :tag "Encrypt" encrypt) - (const :tag "Sign" sign)) + (const :tag "Do Nothing") + (const :tag "Encrypt" encrypt) + (const :tag "Sign" sign)) :tag "Default Action" :group 'bbdb-utilities-pgp) @@ -130,16 +130,16 @@ nil means do nothing. nil means normal messages/questions. 't means to be quiet." :type '(choice - (const :tag "normal") - (const :tag "quiet" t)) + (const :tag "normal") + (const :tag "quiet" t)) :tag "Quietness" :group 'bbdb-utilities-pgp) (defun bbdb/pgp-get-pgp (name address) "Look up user NAME and ADDRESS in BBDB and return the PGP preference." (let* ((record (bbdb-search-simple name address)) - (pgp (and record - (bbdb-record-getprop record bbdb/pgp-field)))) + (pgp (and record + (bbdb-record-getprop record bbdb/pgp-field)))) pgp)) (defun bbdb/pgp-sign () @@ -181,33 +181,33 @@ The user is prompted before encryption or signing." (save-excursion (message-narrow-to-headers) (and (featurep 'mailalias) - (not (featurep 'mailabbrev)) - mail-aliases - (expand-mail-aliases (point-min) (point-max))) + (not (featurep 'mailabbrev)) + mail-aliases + (expand-mail-aliases (point-min) (point-max))) (let* ((to-field (mail-fetch-field "To" nil t)) - (address (mail-extract-address-components (or to-field "")))) - (widen) - (if (not (equal address '(nil nil))) - (let ((pgp-p (bbdb/pgp-get-pgp (car address) (car (cdr address))))) - (cond - ((string= "encrypt" pgp-p) + (address (mail-extract-address-components (or to-field "")))) + (widen) + (if (not (equal address '(nil nil))) + (let ((pgp-p (bbdb/pgp-get-pgp (car address) (car (cdr address))))) + (cond + ((string= "encrypt" pgp-p) (and (or bbdb/pgp-quiet (y-or-n-p "Encrypt message? ")) (bbdb/pgp-encrypt))) - ((string= "sign" pgp-p) - (and (or bbdb/pgp-quiet - (y-or-n-p "Encrypt message? ")) + ((string= "sign" pgp-p) + (and (or bbdb/pgp-quiet + (y-or-n-p "Sign message? ")) (bbdb/pgp-sign))) - (t - (cond - ((eq bbdb/pgp-default-action 'encrypt) - (and (y-or-n-p "Encrypt message? ") - (bbdb/pgp-encrypt))) - ((eq bbdb/pgp-default-action 'sign) - (and (y-or-n-p "Sign message? ") - (bbdb/pgp-sign))) - (t - nil)))))))))) + (t + (cond + ((eq bbdb/pgp-default-action 'encrypt) + (and (y-or-n-p "Encrypt message? ") + (bbdb/pgp-encrypt))) + ((eq bbdb/pgp-default-action 'sign) + (and (y-or-n-p "Sign message? ") + (bbdb/pgp-sign))) + (t + nil)))))))))) (add-hook 'message-send-hook 'bbdb/pgp-hook-fun) (add-hook 'mail-send-hook 'bbdb/pgp-hook-fun) |