Fix typo in version string.
[gnus] / lisp / smime.el
index 5363a40..27db3e3 100644 (file)
@@ -426,12 +426,9 @@ Any details (stdout and stderr) are left in the buffer specified by
     (insert-buffer-substring smime-details-buffer)
     nil))
 
-;; TODO: fix this properly by giving it a prefix.
-(if (featurep 'xemacs)
-    (defvar from))
-
-(defun smime-decrypt-region (b e keyfile)
+(defun smime-decrypt-region (b e keyfile &optional from)
   "Decrypt S/MIME message in region between B and E with key in KEYFILE.
+Optional FROM specifies sender's mail address.
 On success, replaces region with decrypted data and return non-nil.
 Any details (stderr on success, stdout and stderr on error) are left
 in the buffer specified by `smime-details-buffer'."
@@ -454,8 +451,7 @@ in the buffer specified by `smime-details-buffer'."
            (delete-file tmpfile)))
        (progn
          (delete-region b e)
-         (when (boundp 'from)
-           ;; `from' is dynamically bound in mm-dissect.
+         (when from
            (insert "From: " from "\n"))
          (insert-buffer-substring buffer)
          (kill-buffer buffer)