X-Git-Url: http://cgit.sxemacs.org/?p=gnus;a=blobdiff_plain;f=lisp%2Fsha1.el;h=7f6ab4e10d0f900d50d20141730e1852ef8b0616;hp=4aca53f196cb615e0b4a24638aaa5caf50ca061a;hb=HEAD;hpb=e2c9efb05a1ae9e65fd40bab80466da331f3981b diff --git a/lisp/sha1.el b/lisp/sha1.el index 4aca53f19..7f6ab4e10 100644 --- a/lisp/sha1.el +++ b/lisp/sha1.el @@ -1,7 +1,6 @@ ;;; sha1.el --- SHA1 Secure Hash Algorithm in Emacs-Lisp -;; Copyright (C) 1999, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2001-2016 Free Software Foundation, Inc. ;; Author: Shuhei KOBAYASHI ;; Keywords: SHA1, FIPS 180-1 @@ -86,14 +85,16 @@ If this variable is set to nil, use internal function only." :group 'sha1) (defun sha1-string-external (string &optional binary) - (let (prog args digest) + (let ((default-directory "/") ;; in case otherwise non-existent + (process-connection-type nil) ;; pipe + prog args digest) (if (consp sha1-program) (setq prog (car sha1-program) args (cdr sha1-program)) (setq prog sha1-program args nil)) (with-temp-buffer - (set-buffer-multibyte nil) + (unless (featurep 'xemacs) (set-buffer-multibyte nil)) (insert string) (apply (function call-process-region) (point-min) (point-max) @@ -437,5 +438,4 @@ If BINARY is non-nil, return a string in binary form." (provide 'sha1) -;; arch-tag: c0f9abd0-ffc1-4557-aac6-ece7f2d4c901 ;;; sha1.el ends here