Synch to No Gnus 200405180015.
[elisp/gnus.git-] / lisp / canlock.el
index 6df1266..9e437e7 100644 (file)
@@ -1,7 +1,7 @@
 ;;; canlock.el --- functions for Cancel-Lock feature
 
 ;; Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004
-;; Free Software Foundation, Inc.
+;;        Free Software Foundation, Inc.
 
 ;; Author: Katsumi Yamaoka <yamaoka@jpl.org>
 ;; Keywords: news, cancel-lock, hmac, sha1, rfc2104
 (eval-when-compile
   (require 'cl))
 
-(require 'sha1-el)
+(eval-and-compile
+  (require 'sha1-el)
+  (condition-case nil
+      (sha1 "" nil nil 'binary)
+    (wrong-number-of-arguments
+     (let ((mel (locate-library "mel")))
+       (when mel
+        (load (expand-file-name "sha1-el" (file-name-directory mel))
+              nil t))))))
 
-(autoload 'base64-encode-string "base64")
-(autoload 'mail-fetch-field "mail-utils")
 (defvar mail-header-separator)
 
 (defgroup canlock nil