emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Move sha1 to C?


From: Leo
Subject: Re: Move sha1 to C?
Date: Mon, 23 May 2011 21:21:20 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3.50 (Mac OS X 10.6.7)

On 2011-05-23 20:04 +0800, Stefan Monnier wrote:
>> In the patch attached in last post, feature sha1 is provided so
>> (require 'sha1) should not load sha1.el but if people insist in using
>> (load "sha1") then the primitive is overwritten. I hope this is OK.
>
> We can completely remove sha1.el then.

I like this.

vc-bzr.el uses the variable sha1-program. So I am thinking of moving it
to vc.el as shown in the attached patch
(full patch in http://paste.pocoo.org/show/393652).

BTW, what to do with auto-generated files and files from gnulib when
committing?

Leo

--- lisp/vc/vc-bzr.el   2011-03-12 15:26:33 +0000
+++ lisp/vc/vc-bzr.el   2011-05-23 13:07:11 +0000
@@ -156,12 +156,10 @@
        (push (cons (match-string 1) (match-string 2)) settings)))
     settings))
 
-(require 'sha1)                         ;For sha1-program
-
 (defun vc-bzr-sha1 (file)
   (with-temp-buffer
     (set-buffer-multibyte nil)
-    (let ((prog sha1-program)
+    (let ((prog vc-sha1-program)
           (args nil)
          process-file-side-effects)
       (when (consp prog)

=== modified file 'lisp/vc/vc.el'
--- lisp/vc/vc.el       2011-04-20 23:34:00 +0000
+++ lisp/vc/vc.el       2011-05-23 13:06:39 +0000
@@ -752,6 +752,14 @@
   :group 'vc
   :version "22.1")
 
+(defcustom vc-sha1-program '("sha1sum")
+  "Name of program to compute SHA1.
+It must be a string \(program name\) or list of strings \(name and its args\)."
+  :type '(repeat string)
+  :group 'vc)
+
+(define-obsolete-variable-alias 'sha1-program 'vc-sha1-program "24.1")
+
 ;;;###autoload
 (defcustom vc-checkout-hook nil
   "Normal hook (list of functions) run after checking out a file.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]