1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

* vc-hooks.el (vc-stay-local-p, vc-state, vc-working-revision):

Add an optional argument for the backend, use it instead of
calling vc-backend.
(vc-mode-line): Add an optional argument for the backend.  Pass
the backend to vc-state and vc-working-revision.  Move code for
special handling for vc-state being a buffer to ...

* vc-rcs.el (vc-rcs-find-file-hook):
* vc-sccs.el (vc-sccs-find-file-hook): ... here.  New functions.

* vc-svn.el (vc-svn-state, vc-svn-dir-status, vc-svn-checkout)
(vc-svn-print-log, vc-svn-diff): Pass 'SVN to vc-state,
vc-stay-local-p and vc-mode-line calls.

* vc-cvs.el (vc-cvs-state, vc-cvs-checkout, vc-cvs-print-log)
(vc-cvs-diff, vc-cvs-annotate-command)
(vc-cvs-make-version-backups-p, vc-cvs-stay-local-p)
(vc-cvs-dir-status): Pass 'CVS to vc-state, vc-stay-local-p and
vc-mode-line calls.

* vc.el (vc-deduce-fileset): Use vc-deduce-fileset instead of
direct comparison.
(vc-next-action, vc-transfer-file, vc-rename-file): Also pass the
backend when calling vc-mode-line.
(vc-register): Do not create a closure for calling the vc register
function, call it directly.
This commit is contained in:
Dan Nicolaescu 2009-06-23 06:35:40 +00:00
parent 2764748c42
commit 77bf3f5452
7 changed files with 119 additions and 87 deletions

View file

@ -391,6 +391,13 @@ revert all subfiles."
(basic-save-buffer)
(kill-buffer (current-buffer))))
(defun vc-sccs-find-file-hook ()
;; If the file is locked by some other user, make
;; the buffer read-only. Like this, even root
;; cannot modify a file that someone else has locked.
(stringp (vc-state buffer-file-name 'SCCS))
(setq buffer-read-only t))
;;;
;;; Internal functions