aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Kangas2020-05-16 15:34:47 +0200
committerStefan Kangas2020-05-16 15:41:29 +0200
commit21b7165473d68f47e16cb491ea410a10b2d65b71 (patch)
tree041da2ec7182d1a8526ce617e702ab5b726c37d6 /lisp
parent436809b705aaf10776af4615a9691406408735eb (diff)
downloademacs-21b7165473d68f47e16cb491ea410a10b2d65b71.tar.gz
emacs-21b7165473d68f47e16cb491ea410a10b2d65b71.zip
Remove Emacs 22 compat code from ediff-vers.el
* lisp/vc/ediff-vers.el (ediff-vc-revision-other-window) (ediff-vc-working-revision): Redefine Emacs 22 compatibility aliases as obsolete function aliases. (ediff-vc-internal, ediff-vc-merge-internal): Don't use the now obsolete aliases.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/vc/ediff-vers.el25
1 files changed, 10 insertions, 15 deletions
diff --git a/lisp/vc/ediff-vers.el b/lisp/vc/ediff-vers.el
index a95606fad5e..4ee7ee5c1f5 100644
--- a/lisp/vc/ediff-vers.el
+++ b/lisp/vc/ediff-vers.el
@@ -49,15 +49,10 @@ comparison or merge operations are being performed."
49 :group 'ediff-vers 49 :group 'ediff-vers
50 ) 50 )
51 51
52(defalias 'ediff-vc-revision-other-window 52(define-obsolete-function-alias 'ediff-vc-revision-other-window
53 (if (fboundp 'vc-revision-other-window) 53 #'vc-revision-other-window "28.1")
54 'vc-revision-other-window 54(define-obsolete-function-alias 'ediff-vc-working-revision
55 'vc-version-other-window)) 55 #'vc-working-revision "28.1")
56
57(defalias 'ediff-vc-working-revision
58 (if (fboundp 'vc-working-revision)
59 'vc-working-revision
60 'vc-workfile-version))
61 56
62;; VC.el support 57;; VC.el support
63 58
@@ -88,12 +83,12 @@ comparison or merge operations are being performed."
88 (setq rev1 (ediff-vc-latest-version (buffer-file-name)))) 83 (setq rev1 (ediff-vc-latest-version (buffer-file-name))))
89 (save-window-excursion 84 (save-window-excursion
90 (save-excursion 85 (save-excursion
91 (ediff-vc-revision-other-window rev1) 86 (vc-revision-other-window rev1)
92 (setq rev1buf (current-buffer) 87 (setq rev1buf (current-buffer)
93 file1 (buffer-file-name))) 88 file1 (buffer-file-name)))
94 (save-excursion 89 (save-excursion
95 (or (string= rev2 "") ; use current buffer 90 (or (string= rev2 "") ; use current buffer
96 (ediff-vc-revision-other-window rev2)) 91 (vc-revision-other-window rev2))
97 (setq rev2buf (current-buffer) 92 (setq rev2buf (current-buffer)
98 file2 (buffer-file-name))) 93 file2 (buffer-file-name)))
99 (push (lambda () 94 (push (lambda ()
@@ -165,18 +160,18 @@ comparison or merge operations are being performed."
165 (let (buf1 buf2 ancestor-buf) 160 (let (buf1 buf2 ancestor-buf)
166 (save-window-excursion 161 (save-window-excursion
167 (save-excursion 162 (save-excursion
168 (ediff-vc-revision-other-window rev1) 163 (vc-revision-other-window rev1)
169 (setq buf1 (current-buffer))) 164 (setq buf1 (current-buffer)))
170 (save-excursion 165 (save-excursion
171 (or (string= rev2 "") 166 (or (string= rev2 "")
172 (ediff-vc-revision-other-window rev2)) 167 (vc-revision-other-window rev2))
173 (setq buf2 (current-buffer))) 168 (setq buf2 (current-buffer)))
174 (if ancestor-rev 169 (if ancestor-rev
175 (save-excursion 170 (save-excursion
176 (if (string= ancestor-rev "") 171 (if (string= ancestor-rev "")
177 (setq ancestor-rev (ediff-vc-working-revision 172 (setq ancestor-rev (vc-working-revision
178 buffer-file-name))) 173 buffer-file-name)))
179 (ediff-vc-revision-other-window ancestor-rev) 174 (vc-revision-other-window ancestor-rev)
180 (setq ancestor-buf (current-buffer)))) 175 (setq ancestor-buf (current-buffer))))
181 (push (let ((f1 (buffer-file-name buf1)) 176 (push (let ((f1 (buffer-file-name buf1))
182 (f2 (unless (string= rev2 "") (buffer-file-name buf2))) 177 (f2 (unless (string= rev2 "") (buffer-file-name buf2)))