diff options
| author | Richard M. Stallman | 1995-06-16 18:04:47 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-06-16 18:04:47 +0000 |
| commit | d7eff0e04e9a07e7fa8e6534ccb3a75cd51e6f2a (patch) | |
| tree | 30c6d2e65bcc53dd92202f42586f1ca209709ac6 | |
| parent | 88a2ffaf932631f3886db048f1c30aad77230991 (diff) | |
| download | emacs-d7eff0e04e9a07e7fa8e6534ccb3a75cd51e6f2a.tar.gz emacs-d7eff0e04e9a07e7fa8e6534ccb3a75cd51e6f2a.zip | |
(vc-backend-dispatch): Move definition before first use.
| -rw-r--r-- | lisp/vc.el | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/lisp/vc.el b/lisp/vc.el index 64492b63e4f..4c631a3532f 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -75,6 +75,23 @@ | |||
| 75 | (cons '(vc-parent-buffer vc-parent-buffer-name) | 75 | (cons '(vc-parent-buffer vc-parent-buffer-name) |
| 76 | minor-mode-alist))) | 76 | minor-mode-alist))) |
| 77 | 77 | ||
| 78 | ;; To implement support for a new version-control system, add another | ||
| 79 | ;; branch to the vc-backend-dispatch macro and fill it in in each | ||
| 80 | ;; call. The variable vc-master-templates in vc-hooks.el will also | ||
| 81 | ;; have to change. | ||
| 82 | |||
| 83 | (defmacro vc-backend-dispatch (f s r c) | ||
| 84 | "Execute FORM1, FORM2 or FORM3 for SCCS, RCS or CVS respectively. | ||
| 85 | If FORM3 is `RCS', use FORM2 for CVS as well as RCS. | ||
| 86 | \(CVS shares some code with RCS)." | ||
| 87 | (list 'let (list (list 'type (list 'vc-backend f))) | ||
| 88 | (list 'cond | ||
| 89 | (list (list 'eq 'type (quote 'SCCS)) s) ;; SCCS | ||
| 90 | (list (list 'eq 'type (quote 'RCS)) r) ;; RCS | ||
| 91 | (list (list 'eq 'type (quote 'CVS)) ;; CVS | ||
| 92 | (if (eq c 'RCS) r c)) | ||
| 93 | ))) | ||
| 94 | |||
| 78 | ;; General customization | 95 | ;; General customization |
| 79 | 96 | ||
| 80 | (defvar vc-suppress-confirm nil | 97 | (defvar vc-suppress-confirm nil |
| @@ -299,23 +316,6 @@ the master name of FILE if LAST is 'MASTER, or the workfile of FILE if LAST is | |||
| 299 | status) | 316 | status) |
| 300 | ) | 317 | ) |
| 301 | 318 | ||
| 302 | ;; Everything eventually funnels through these functions. To implement | ||
| 303 | ;; support for a new version-control system, add another branch to the | ||
| 304 | ;; vc-backend-dispatch macro and fill it in in each call. The variable | ||
| 305 | ;; vc-master-templates in vc-hooks.el will also have to change. | ||
| 306 | |||
| 307 | (defmacro vc-backend-dispatch (f s r c) | ||
| 308 | "Execute FORM1, FORM2 or FORM3 depending whether we're using SCCS, RCS or CVS. | ||
| 309 | If FORM3 is RCS, use FORM2 even if we are using CVS. (CVS shares some code | ||
| 310 | with RCS)." | ||
| 311 | (list 'let (list (list 'type (list 'vc-backend f))) | ||
| 312 | (list 'cond | ||
| 313 | (list (list 'eq 'type (quote 'SCCS)) s) ;; SCCS | ||
| 314 | (list (list 'eq 'type (quote 'RCS)) r) ;; RCS | ||
| 315 | (list (list 'eq 'type (quote 'CVS)) ;; CVS | ||
| 316 | (if (eq c 'RCS) r c)) | ||
| 317 | ))) | ||
| 318 | |||
| 319 | ;;; Save a bit of the text around POSN in the current buffer, to help | 319 | ;;; Save a bit of the text around POSN in the current buffer, to help |
| 320 | ;;; us find the corresponding position again later. This works even | 320 | ;;; us find the corresponding position again later. This works even |
| 321 | ;;; if all markers are destroyed or corrupted. | 321 | ;;; if all markers are destroyed or corrupted. |