From: yamaoka Date: Mon, 15 Dec 2003 03:39:31 +0000 (+0000) Subject: Synch to Gnus 200312150133. X-Git-Url: http://git.chise.org/gitweb/?p=elisp%2Fgnus.git-;a=commitdiff_plain;h=a5e354ac372fc74090d5f7e3c354a8cbae60c9a4 Synch to Gnus 200312150133. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bc36ce0..c503938 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,15 @@ 2003-12-15 Simon Josefsson + * sha1-el.el (autoload): Ignore errors for + executable-find. (XEmacs ecrypto does not require sh-script where + executable.el is located.) + (sha1-use-external): Likewise. + + * sha1-el.el (sha1): Add defgroup. + (sha1-maximum-internal-length, sha1-program, sha1-use-external) + (sha1-program): Use 'sha1sum' from GNU CoreUtils instead of OpenSSL. + (sha1): Autoload. + * nndraft.el (nndraft-request-move-article): Copy definition of nnmh-request-move-article instead of calling it, because the nnmh version uses nnmh-request-article which isn't the same as the diff --git a/lisp/sha1-el.el b/lisp/sha1-el.el index 6bd25c6..6c0df3d 100644 --- a/lisp/sha1-el.el +++ b/lisp/sha1-el.el @@ -1,6 +1,6 @@ ;;; sha1-el.el --- SHA1 Secure Hash Algorithm in Emacs-Lisp. -;; Copyright (C) 1999, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2001, 2003 Free Software Foundation, Inc. ;; Author: Shuhei KOBAYASHI ;; Keywords: SHA1, FIPS 180-1 @@ -54,27 +54,37 @@ (require 'hex-util) -(autoload 'executable-find "executable") +(ignore-errors (autoload 'executable-find "executable")) ;;; ;;; external SHA1 function. ;;; -(defvar sha1-maximum-internal-length 500 +(defgroup sha1 nil + "Elisp interface for SHA1 hash computation." + :group 'extensions) + +(defcustom sha1-maximum-internal-length 500 "*Maximum length of message to use lisp version of SHA1 function. If message is longer than this, `sha1-program' is used instead. If this variable is set to 0, use extarnal program only. -If this variable is set to nil, use internal function only.") +If this variable is set to nil, use internal function only." + :type 'integer + :group 'sha1) -(defvar sha1-program '("openssl" "sha1") +(defcustom sha1-program '("sha1sum") "*Name of program to compute SHA1. -It must be a string \(program name\) or list of strings \(name and its args\).") +It must be a string \(program name\) or list of strings \(name and its args\)." + :type '(repeat string) + :group 'sha1) -(defvar sha1-use-external - (exec-installed-p (car sha1-program)) - "*Use external sha1 program. -If this variable is set to nil, use internal function only.") +(defcustom sha1-use-external (ignore-errors + (executable-find (car sha1-program))) + "*Use external SHA1 program. +If this variable is set to nil, use internal function only." + :type 'boolean + :group 'sha1) (defun sha1-string-external (string) ;; `with-temp-buffer' is new in v20, so we do not use it. @@ -416,6 +426,7 @@ If this variable is set to nil, use internal function only.") (sha1-string-external string) (sha1-string-internal string))) +;;;###autoload (defun sha1 (object &optional beg end) "Return the SHA1 (Secure Hash Algorithm) of an object. OBJECT is either a string or a buffer.