diff options
author | Michael Kifer <kifer@cs.stonybrook.edu> | 2000-10-29 04:56:45 +0000 |
---|---|---|
committer | Michael Kifer <kifer@cs.stonybrook.edu> | 2000-10-29 04:56:45 +0000 |
commit | 657f9cb8b7f7c3a9687f3998319ce63346ef13a4 (patch) | |
tree | 1ee552a157cf60e2c30151a8341d5bef0d9f9e4d /lisp/ediff-vers.el | |
parent | 4f490d995d44a68878c1bd7dd0df3be5355b81a8 (diff) | |
download | emacs-657f9cb8b7f7c3a9687f3998319ce63346ef13a4.tar.gz |
2000-10-29 Michael Kifer <kifer@cs.sunysb.edu>
* viper-cmd.el (viper-preserve-cursor-color): new test that avoids
rewrawing the screen when changing cursor color.
(viper-insert-state-pre-command-sentinel,
viper-replace-state-pre-command-sentinel,
viper-replace-state-post-command-sentinel): use
viper-preserve-cursor-color.
Many functions changed to use viper= instead of = when comparing
characters.
* viper-util.el (viper-memq-char,viper=): new functions for
working with characters.
(viper-change-cursor-color): fixed buglet.
Many functions changed to use viper= instead of = when comparing
characters.
* viper.el (viper-insert-state-mode-list): added eshell.
* ediff-init.el (ediff-before-setup-hook): new hook.
Several typos fixed in various docstrings.
* ediff-merg.el (ediff-show-clashes-only): docstring typo fixed.
* ediff-nult.el (ediff-before-session-group-setup-hooks): new
hook.
(ediff-show-meta-buffer): run ediff-before-session-group-setup-hooks.
* ediff-util.el (ediff-setup): run ediff-before-setup-hook.
(ediff-other-buffer): use selected buffers if in Buffer-menu buffer.
(ediff-get-selected-buffers): new function.
* ediff-vers.el (ediff-vc-internal,ediff-rcs-internal,
ediff-vc-merge-internal,ediff-rcs-merge-internal): use
save-window-excursion.
* ediff-wind.el (ediff-skip-unsuitable-frames): more robust
termination check in while loop.
* ediff.el (ediff-get-default-file-name): better defaults when in
dired buffer.
(ediff-files,ediff-merge-files,ediff-files3,
ediff-merge-files-with-ancestor): use ediff-get-default-file-name.
Diffstat (limited to 'lisp/ediff-vers.el')
-rw-r--r-- | lisp/ediff-vers.el | 105 |
1 files changed, 55 insertions, 50 deletions
diff --git a/lisp/ediff-vers.el b/lisp/ediff-vers.el index dac4cecef02..aca09b19b27 100644 --- a/lisp/ediff-vers.el +++ b/lisp/ediff-vers.el @@ -47,20 +47,21 @@ ;; If the current buffer is named `F', the version is named `F.~REV~'. ;; If `F.~REV~' already exists, it is used instead of being re-created. (let (file1 file2 rev1buf rev2buf) - (save-excursion - (vc-version-other-window rev1) - (setq rev1buf (current-buffer) - file1 (buffer-file-name))) - (save-excursion - (or (string= rev2 "") ; use current buffer - (vc-version-other-window rev2)) - (setq rev2buf (current-buffer) - file2 (buffer-file-name))) - (setq startup-hooks - (cons `(lambda () - (delete-file ,file1) - (or ,(string= rev2 "") (delete-file ,file2))) - startup-hooks)) + (save-window-excursion + (save-excursion + (vc-version-other-window rev1) + (setq rev1buf (current-buffer) + file1 (buffer-file-name))) + (save-excursion + (or (string= rev2 "") ; use current buffer + (vc-version-other-window rev2)) + (setq rev2buf (current-buffer) + file2 (buffer-file-name))) + (setq startup-hooks + (cons `(lambda () + (delete-file ,file1) + (or ,(string= rev2 "") (delete-file ,file2))) + startup-hooks))) (ediff-buffers rev1buf rev2buf startup-hooks @@ -107,10 +108,12 @@ (defun ediff-rcs-internal (rev1 rev2 &optional startup-hooks) ;; Run Ediff on versions of the current buffer. ;; If REV2 is "" then use current buffer. - (let ((rev2buf (if (string= rev2 "") - (current-buffer) - (rcs-ediff-view-revision rev2))) - (rev1buf (rcs-ediff-view-revision rev1))) + (let (rev2buf rev1buf) + (save-window-excursion + (setq rev2buf (if (string= rev2 "") + (current-buffer) + (rcs-ediff-view-revision rev2)) + rev1buf (rcs-ediff-view-revision rev1))) ;; rcs.el doesn't create temp version files, so we don't have to delete ;; anything in startup hooks to ediff-buffers @@ -149,30 +152,31 @@ &optional startup-hooks merge-buffer-file) ;; If ANCESTOR-REV non-nil, merge with ancestor (let (buf1 buf2 ancestor-buf) - (save-excursion - (vc-version-other-window rev1) - (setq buf1 (current-buffer))) - (save-excursion - (or (string= rev2 "") - (vc-version-other-window rev2)) - (setq buf2 (current-buffer))) - (if ancestor-rev - (save-excursion - (if (string= ancestor-rev "") - (setq ancestor-rev (vc-workfile-version buffer-file-name))) - (vc-version-other-window ancestor-rev) - (setq ancestor-buf (current-buffer)))) - (setq startup-hooks - (cons - `(lambda () - (delete-file ,(buffer-file-name buf1)) - (or ,(string= rev2 "") - (delete-file ,(buffer-file-name buf2))) - (or ,(string= ancestor-rev "") - ,(not ancestor-rev) - (delete-file ,(buffer-file-name ancestor-buf))) - ) - startup-hooks)) + (save-window-excursion + (save-excursion + (vc-version-other-window rev1) + (setq buf1 (current-buffer))) + (save-excursion + (or (string= rev2 "") + (vc-version-other-window rev2)) + (setq buf2 (current-buffer))) + (if ancestor-rev + (save-excursion + (if (string= ancestor-rev "") + (setq ancestor-rev (vc-workfile-version buffer-file-name))) + (vc-version-other-window ancestor-rev) + (setq ancestor-buf (current-buffer)))) + (setq startup-hooks + (cons + `(lambda () + (delete-file ,(buffer-file-name buf1)) + (or ,(string= rev2 "") + (delete-file ,(buffer-file-name buf2))) + (or ,(string= ancestor-rev "") + ,(not ancestor-rev) + (delete-file ,(buffer-file-name ancestor-buf))) + ) + startup-hooks))) (if ancestor-rev (ediff-merge-buffers-with-ancestor buf1 buf2 ancestor-buf @@ -186,14 +190,15 @@ startup-hooks merge-buffer-file) ;; If ANCESTOR-REV non-nil, merge with ancestor (let (buf1 buf2 ancestor-buf) - (setq buf1 (rcs-ediff-view-revision rev1) - buf2 (if (string= rev2 "") - (current-buffer) - (rcs-ediff-view-revision rev2)) - ancestor-buf (if ancestor-rev - (if (string= ancestor-rev "") - (current-buffer) - (rcs-ediff-view-revision ancestor-rev)))) + (save-window-excursion + (setq buf1 (rcs-ediff-view-revision rev1) + buf2 (if (string= rev2 "") + (current-buffer) + (rcs-ediff-view-revision rev2)) + ancestor-buf (if ancestor-rev + (if (string= ancestor-rev "") + (current-buffer) + (rcs-ediff-view-revision ancestor-rev))))) ;; rcs.el doesn't create temp version files, so we don't have to delete ;; anything in startup hooks to ediff-buffers (if ancestor-rev |