[PATCH 1 of 4] mercurial.el, mq.el: remove runtime dependencies on CL package

NIIMI Satoshi sa2c at sa2c.net
Wed Oct 10 16:23:58 CDT 2007


# HG changeset patch
# User NIIMI Satoshi <sa2c at sa2c.net>
# Date 1192049934 -32400
# Node ID 314bdd9b68157160c1df38fd41e04dfc7b04d174
# Parent  be015f9b740521efa67d72fb0f798188a9f37a73
mercurial.el, mq.el: remove runtime dependencies on CL package

* (require 'cl) at compile-time

* don't use map()

diff --git a/contrib/mercurial.el b/contrib/mercurial.el
--- a/contrib/mercurial.el
+++ b/contrib/mercurial.el
@@ -521,7 +521,7 @@
 	    (completing-read (format "Revision%s (%s): "
 				     (or prompt "")
 				     (or default "tip"))
-			     (map 'list 'cons revs revs)
+			     (mapcar (lambda (x) (cons x x)) revs)
 			     nil
 			     nil
 			     nil
diff --git a/contrib/mq.el b/contrib/mq.el
--- a/contrib/mq.el
+++ b/contrib/mq.el
@@ -18,6 +18,7 @@
 ;; C-l').  If not, write to the Free Software Foundation, Inc., 59
 ;; Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
+(eval-when-compile (require 'cl))
 (require 'mercurial)
 
 
@@ -102,7 +103,7 @@
 		  (hg-chomp (hg-run0 (or source "qseries"))) "\n")))
     (when force
       (completing-read (format "Patch%s: " (or prompt ""))
-		       (map 'list 'cons patches patches)
+		       (mapcar (lambda (x) (cons x x)) patches)
 		       nil
 		       nil
 		       nil


More information about the Mercurial-devel mailing list