summaryrefslogtreecommitdiff
path: root/lisp/epa-mail.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/epa-mail.el')
-rw-r--r--lisp/epa-mail.el20
1 files changed, 10 insertions, 10 deletions
diff --git a/lisp/epa-mail.el b/lisp/epa-mail.el
index 7e100569b0f..b9dd437ed12 100644
--- a/lisp/epa-mail.el
+++ b/lisp/epa-mail.el
@@ -59,7 +59,7 @@ Otherwise, signal an error."
;;;###autoload
(define-minor-mode epa-mail-mode
"A minor-mode for composing encrypted/clearsigned mails."
- nil " epa-mail" epa-mail-mode-map)
+ :lighter " epa-mail")
;;; Utilities
@@ -108,8 +108,9 @@ use from your key ring."
(interactive
(save-excursion
(goto-char (point-min))
- (if (search-forward mail-header-separator nil t)
- (forward-line))
+ (rfc822-goto-eoh)
+ (unless (eobp)
+ (forward-line))
(setq epa-last-coding-system-specified
(or coding-system-for-write
(select-safe-coding-system (point) (point-max))))
@@ -135,9 +136,7 @@ If no one is selected, default secret key is used. "
(goto-char (point-min))
(save-restriction
(narrow-to-region (point)
- (if (search-forward mail-header-separator nil 0)
- (match-beginning 0)
- (point)))
+ (progn (rfc822-goto-eoh) (point)))
(setq recipients-string
(mapconcat #'identity
(nconc (mail-fetch-field "to" nil nil t)
@@ -170,7 +169,7 @@ If no one is selected, default secret key is used. "
(apply #'nconc
(mapcar
(lambda (recipient)
- (let ((tem (assoc recipient epa-mail-aliases)))
+ (let ((tem (assoc (downcase recipient) epa-mail-aliases)))
(if tem (copy-sequence (cdr tem))
(list recipient))))
real-recipients)))
@@ -220,7 +219,7 @@ If no one is selected, symmetric encryption will be performed. "
(epa-mail--find-usable-key
(epg-list-keys
(epg-make-context epa-protocol)
- (if (string-match "@" recipient)
+ (if (string-search "@" recipient)
(concat "<" recipient ">")
recipient))
'encrypt)))
@@ -236,8 +235,9 @@ If no one is selected, symmetric encryption will be performed. "
default-recipients)))))
(goto-char (point-min))
- (if (search-forward mail-header-separator nil t)
- (forward-line))
+ (rfc822-goto-eoh)
+ (unless (eobp)
+ (forward-line))
(setq start (point))
(setq epa-last-coding-system-specified