From: Kim F. Storm Date: Fri, 5 May 2006 23:36:32 +0000 (+0000) Subject: (ediff-files, ediff-files3, ediff-merge-files) X-Git-Tag: emacs-pretest-22.0.90~2781 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=640ad75b3c4549394eec314b3305ca576d185965;p=emacs.git (ediff-files, ediff-files3, ediff-merge-files) (ediff-merge-files-with-ancestor): Use add-to-history. --- diff --git a/lisp/ediff.el b/lisp/ediff.el index bb6cfc6b72e..14f634f0cd2 100644 --- a/lisp/ediff.el +++ b/lisp/ediff.el @@ -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 @@ lines. For small regions, use `ediff-regions-wordwise'." 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 @@ lines. For small regions, use `ediff-regions-wordwise'." 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 @@ lines. For small regions, use `ediff-regions-wordwise'." 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))