diff options
| author | Stefan Monnier | 2012-08-29 11:11:51 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-08-29 11:11:51 -0400 |
| commit | 35e62fc984b108f717c5525ffecf60586eb0737e (patch) | |
| tree | fd00c70fbf024b7e5290086bcbc8a9f226a30a03 /lisp/vc | |
| parent | c2c43c2382db292bfe3cccbccad4386f81f9c8a4 (diff) | |
| download | emacs-35e62fc984b108f717c5525ffecf60586eb0737e.tar.gz emacs-35e62fc984b108f717c5525ffecf60586eb0737e.zip | |
* lisp/files.el (read-only-mode): New minor mode.
(toggle-read-only): Use it and mark obsolete.
(find-file--read-only):
* lisp/vc/vc.el (vc-next-action, vc-checkout):
* lisp/vc/vc-cvs.el (vc-cvs-checkout):
* lisp/obsolete/vc-mcvs.el (vc-mcvs-update):
* lisp/ffap.el (ffap--toggle-read-only): Update callers.
Diffstat (limited to 'lisp/vc')
| -rw-r--r-- | lisp/vc/vc-cvs.el | 2 | ||||
| -rw-r--r-- | lisp/vc/vc.el | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index c1c4b750267..ae1a3cf92f8 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el | |||
| @@ -394,7 +394,7 @@ REV is the revision to check out." | |||
| 394 | (if vc-cvs-use-edit | 394 | (if vc-cvs-use-edit |
| 395 | (vc-cvs-command nil 0 file "edit") | 395 | (vc-cvs-command nil 0 file "edit") |
| 396 | (set-file-modes file (logior (file-modes file) 128)) | 396 | (set-file-modes file (logior (file-modes file) 128)) |
| 397 | (if (equal file buffer-file-name) (toggle-read-only -1)))) | 397 | (if (equal file buffer-file-name) (read-only-mode -1)))) |
| 398 | ;; Check out a particular revision (or recreate the file). | 398 | ;; Check out a particular revision (or recreate the file). |
| 399 | (vc-file-setprop file 'vc-working-revision nil) | 399 | (vc-file-setprop file 'vc-working-revision nil) |
| 400 | (apply 'vc-cvs-command nil 0 file | 400 | (apply 'vc-cvs-command nil 0 file |
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index ddb9565544d..1ef4faaa008 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el | |||
| @@ -1133,7 +1133,7 @@ For old-style locking-based version control systems, like RCS: | |||
| 1133 | (let ((visited (get-file-buffer file))) | 1133 | (let ((visited (get-file-buffer file))) |
| 1134 | (when visited | 1134 | (when visited |
| 1135 | (with-current-buffer visited | 1135 | (with-current-buffer visited |
| 1136 | (toggle-read-only -1)))))) | 1136 | (read-only-mode -1)))))) |
| 1137 | ;; Allow user to revert files with no changes | 1137 | ;; Allow user to revert files with no changes |
| 1138 | (save-excursion | 1138 | (save-excursion |
| 1139 | (dolist (file files) | 1139 | (dolist (file files) |
| @@ -1344,7 +1344,7 @@ After check-out, runs the normal hook `vc-checkout-hook'." | |||
| 1344 | ;; Maybe the backend is not installed ;-( | 1344 | ;; Maybe the backend is not installed ;-( |
| 1345 | (when writable | 1345 | (when writable |
| 1346 | (let ((buf (get-file-buffer file))) | 1346 | (let ((buf (get-file-buffer file))) |
| 1347 | (when buf (with-current-buffer buf (toggle-read-only -1))))) | 1347 | (when buf (with-current-buffer buf (read-only-mode -1))))) |
| 1348 | (signal (car err) (cdr err)))) | 1348 | (signal (car err) (cdr err)))) |
| 1349 | `((vc-state . ,(if (or (eq (vc-checkout-model backend (list file)) 'implicit) | 1349 | `((vc-state . ,(if (or (eq (vc-checkout-model backend (list file)) 'implicit) |
| 1350 | (not writable)) | 1350 | (not writable)) |