aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier2008-03-12 20:48:46 +0000
committerStefan Monnier2008-03-12 20:48:46 +0000
commitd0081058014b153500ad8dee2b0a1c0e3122cd6f (patch)
treea3414d10e08e8e8296686139416fddb2b9c85950 /lisp
parented075cb4ea51a597169a5c0cab847abacc3e9739 (diff)
downloademacs-d0081058014b153500ad8dee2b0a1c0e3122cd6f.tar.gz
emacs-d0081058014b153500ad8dee2b0a1c0e3122cd6f.zip
(sha1-string-external): Use set-buffer-multibyte rather than
setting default-enable-multibyte-characters.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/sha1.el5
2 files changed, 6 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index cc42fababf7..d8f9b361527 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12008-03-12 Stefan Monnier <monnier@iro.umontreal.ca> 12008-03-12 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * sha1.el (sha1-string-external): Use set-buffer-multibyte rather than
4 setting default-enable-multibyte-characters.
5
3 * emulation/viper-util.el (viper-file-remote-p): Remove, unused. 6 * emulation/viper-util.el (viper-file-remote-p): Remove, unused.
4 7
5 * comint.el: Fix up indentation and comment style. Remove `function'. 8 * comint.el: Fix up indentation and comment style. Remove `function'.
diff --git a/lisp/sha1.el b/lisp/sha1.el
index c70b99c10b0..de2f0636b7c 100644
--- a/lisp/sha1.el
+++ b/lisp/sha1.el
@@ -88,16 +88,17 @@ If this variable is set to nil, use internal function only."
88 :group 'sha1) 88 :group 'sha1)
89 89
90(defun sha1-string-external (string &optional binary) 90(defun sha1-string-external (string &optional binary)
91 (let (prog args digest default-enable-multibyte-characters) 91 (let (prog args digest)
92 (if (consp sha1-program) 92 (if (consp sha1-program)
93 (setq prog (car sha1-program) 93 (setq prog (car sha1-program)
94 args (cdr sha1-program)) 94 args (cdr sha1-program))
95 (setq prog sha1-program 95 (setq prog sha1-program
96 args nil)) 96 args nil))
97 (with-temp-buffer 97 (with-temp-buffer
98 (set-buffer-multibyte nil)
98 (insert string) 99 (insert string)
99 (apply (function call-process-region) 100 (apply (function call-process-region)
100 (point-min)(point-max) 101 (point-min) (point-max)
101 prog t t nil args) 102 prog t t nil args)
102 ;; SHA1 is 40 bytes long in hexadecimal form. 103 ;; SHA1 is 40 bytes long in hexadecimal form.
103 (setq digest (buffer-substring (point-min)(+ (point-min) 40)))) 104 (setq digest (buffer-substring (point-min)(+ (point-min) 40))))