changeset 70416:522ce5c1839a

(ediff-files, ediff-files3, ediff-merge-files) (ediff-merge-files-with-ancestor): Use add-to-history.
author Kim F. Storm <storm@cua.dk>
date Fri, 05 May 2006 23:36:32 +0000
parents 72f273a616c1
children 95f3ef491663
files lisp/ediff.el
diffstat 1 files changed, 30 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ediff.el	Fri May 05 23:35:57 2006 +0000
+++ b/lisp/ediff.el	Fri May 05 23:36:32 2006 +0000
@@ -210,12 +210,11 @@
 					   ediff-last-dir-B
 					 (file-name-directory f)))
 				 (progn
-				   (setq file-name-history
-					 (cons (ediff-abbreviate-file-name
-						(expand-file-name
-						 (file-name-nondirectory f)
-						 dir-B))
-					       file-name-history))
+				   (add-to-history 'file-name-history
+						   (ediff-abbreviate-file-name
+						    (expand-file-name
+						     (file-name-nondirectory f)
+						     dir-B)))
 				   (ediff-get-default-file-name f 1)))
 	   )))
   (ediff-files-internal file-A
@@ -246,25 +245,22 @@
 						    ediff-last-dir-B
 						  (file-name-directory f)))
 					  (progn
-					    (setq file-name-history
-						  (cons
-						   (ediff-abbreviate-file-name
-						    (expand-file-name
-						     (file-name-nondirectory f)
-						     dir-B))
-						   file-name-history))
+					    (add-to-history 'file-name-history
+							    (ediff-abbreviate-file-name
+							     (expand-file-name
+							      (file-name-nondirectory f)
+							      dir-B)))
 					    (ediff-get-default-file-name f 1))))
 	   (ediff-read-file-name "File C to compare"
 				 (setq dir-C (if ediff-use-last-dir
 						 ediff-last-dir-C
 					       (file-name-directory ff)))
 				 (progn
-				   (setq file-name-history
-					 (cons (ediff-abbreviate-file-name
-						(expand-file-name
-						 (file-name-nondirectory ff)
-						 dir-C))
-					       file-name-history))
+				   (add-to-history 'file-name-history
+						   (ediff-abbreviate-file-name
+						    (expand-file-name
+						     (file-name-nondirectory ff)
+						     dir-C)))
 				   (ediff-get-default-file-name ff 2)))
 	   )))
   (ediff-files-internal file-A
@@ -1109,12 +1105,11 @@
 					   ediff-last-dir-B
 					 (file-name-directory f)))
 				 (progn
-				   (setq file-name-history
-					 (cons (ediff-abbreviate-file-name
-						(expand-file-name
-						 (file-name-nondirectory f)
-						 dir-B))
-					       file-name-history))
+				   (add-to-history 'file-name-history
+						   (ediff-abbreviate-file-name
+						    (expand-file-name
+						     (file-name-nondirectory f)
+						     dir-B)))
 				   (ediff-get-default-file-name f 1)))
 	   )))
   (setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks))
@@ -1153,13 +1148,11 @@
 						    ediff-last-dir-B
 						  (file-name-directory f)))
 					  (progn
-					    (setq file-name-history
-						  (cons
-						   (ediff-abbreviate-file-name
-						    (expand-file-name
-						     (file-name-nondirectory f)
-						     dir-B))
-						   file-name-history))
+					    (add-to-history 'file-name-history
+							    (ediff-abbreviate-file-name
+							     (expand-file-name
+							      (file-name-nondirectory f)
+							      dir-B)))
 					    (ediff-get-default-file-name f 1))))
 	   (ediff-read-file-name "Ancestor file"
 				 (setq dir-ancestor
@@ -1167,12 +1160,11 @@
 					   ediff-last-dir-ancestor
 					 (file-name-directory ff)))
 				 (progn
-				   (setq file-name-history
-					 (cons (ediff-abbreviate-file-name
-						(expand-file-name
-						 (file-name-nondirectory ff)
-						 dir-ancestor))
-					       file-name-history))
+				   (add-to-history 'file-name-history
+						   (ediff-abbreviate-file-name
+						    (expand-file-name
+						     (file-name-nondirectory ff)
+						     dir-ancestor)))
 				   (ediff-get-default-file-name ff 2)))
 	   )))
   (setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks))