diff options
| -rw-r--r-- | lisp/pcvs.el | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/lisp/pcvs.el b/lisp/pcvs.el index 4ce2e1c1c7d..1c776a5b154 100644 --- a/lisp/pcvs.el +++ b/lisp/pcvs.el | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | ;; Maintainer: (Stefan Monnier) monnier+lists/cvs/pcl@flint.cs.yale.edu | 14 | ;; Maintainer: (Stefan Monnier) monnier+lists/cvs/pcl@flint.cs.yale.edu |
| 15 | ;; Keywords: CVS, version control, release management | 15 | ;; Keywords: CVS, version control, release management |
| 16 | ;; Version: $Name: $ | 16 | ;; Version: $Name: $ |
| 17 | ;; Revision: $Id: pcvs.el,v 1.10 2000/09/29 03:14:36 monnier Exp $ | 17 | ;; Revision: $Id: pcvs.el,v 1.11 2000/10/05 22:45:59 monnier Exp $ |
| 18 | 18 | ||
| 19 | ;; This file is part of GNU Emacs. | 19 | ;; This file is part of GNU Emacs. |
| 20 | 20 | ||
| @@ -1705,9 +1705,7 @@ This command ignores files that are not flagged as `Unknown'." | |||
| 1705 | (when (ignore-errors | 1705 | (when (ignore-errors |
| 1706 | (and buffer-read-only | 1706 | (and buffer-read-only |
| 1707 | (eq 'CVS (vc-backend buffer-file-name)) | 1707 | (eq 'CVS (vc-backend buffer-file-name)) |
| 1708 | (not (if (fboundp 'vc-editable-p) | 1708 | (not (vc-editable-p buffer-file-name)))) |
| 1709 | (vc-editable-p buffer-file-name) | ||
| 1710 | (vc-locking-user buffer-file-name))))) | ||
| 1711 | ;; CVSREAD=on special case | 1709 | ;; CVSREAD=on special case |
| 1712 | (vc-toggle-read-only)) | 1710 | (vc-toggle-read-only)) |
| 1713 | (goto-char (point-max)) | 1711 | (goto-char (point-max)) |
| @@ -2052,29 +2050,15 @@ The exact behavior is determined also by `cvs-dired-use-hook'." | |||
| 2052 | ;; hook into VC | 2050 | ;; hook into VC |
| 2053 | ;; | 2051 | ;; |
| 2054 | 2052 | ||
| 2055 | (if (boundp 'vc-post-command-functions) | 2053 | (add-hook 'vc-post-command-functions 'cvs-vc-command-advice) |
| 2056 | ;; Hook into the new VC. | 2054 | |
| 2057 | (add-hook 'vc-post-command-functions | 2055 | (defun cvs-vc-command-advice (command file flags) |
| 2058 | (lambda (cmd file flags) | 2056 | (when (and (equal command "cvs") |
| 2059 | (cvs-vc-command-advice (current-buffer) cmd (car flags)))) | ||
| 2060 | ;; Hook into the old VC. | ||
| 2061 | (defadvice vc-simple-command (after pcl-cvs-vc activate) | ||
| 2062 | (cvs-vc-command-advice "*vc-info*" (ad-get-arg 1) (ad-get-arg 3))) | ||
| 2063 | (defadvice vc-do-command (after pcl-cvs-vc activate) | ||
| 2064 | (cvs-vc-command-advice (if (eq t (ad-get-arg 0)) (current-buffer) | ||
| 2065 | (or (ad-get-arg 0) "*vc*")) | ||
| 2066 | (ad-get-arg 2) | ||
| 2067 | (if (stringp (ad-get-arg 4)) | ||
| 2068 | (ad-get-arg 4) | ||
| 2069 | (ad-get-arg 5))))) | ||
| 2070 | |||
| 2071 | (defun cvs-vc-command-advice (buffer command cvscmd) | ||
| 2072 | (when (and (setq buffer (get-buffer buffer)) | ||
| 2073 | (equal command "cvs") | ||
| 2074 | ;; don't parse output we don't understand. | 2057 | ;; don't parse output we don't understand. |
| 2075 | (member cvscmd cvs-parse-known-commands)) | 2058 | (member (car flags) cvs-parse-known-commands)) |
| 2076 | (save-excursion | 2059 | (save-excursion |
| 2077 | (let ((dir (with-current-buffer buffer default-directory)) | 2060 | (let ((buffer (current-buffer)) |
| 2061 | (dir default-directory) | ||
| 2078 | (cvs-from-vc t)) | 2062 | (cvs-from-vc t)) |
| 2079 | (dolist (cvs-buf (buffer-list)) | 2063 | (dolist (cvs-buf (buffer-list)) |
| 2080 | (set-buffer cvs-buf) | 2064 | (set-buffer cvs-buf) |