444 |
(setq default-directory dir) |
(setq default-directory dir) |
445 |
(setq buffer-read-only nil) |
(setq buffer-read-only nil) |
446 |
(erase-buffer) |
(erase-buffer) |
447 |
(insert "\ |
(insert "Repository : " (directory-file-name (cvs-get-cvsroot)) |
448 |
Repository : " (directory-file-name (cvs-get-cvsroot)) " |
"\nModule : " (cvs-get-module) |
449 |
Module : " (cvs-get-module) " |
"\nWorking dir: " (abbreviate-file-name dir) |
450 |
Working dir: " (abbreviate-file-name dir) " |
(if (not (file-readable-p "CVS/Tag")) "\n" |
451 |
|
(let ((tag (cvs-file-to-string "CVS/Tag"))) |
452 |
") |
(cond |
453 |
|
((string-match "\\`T" tag) |
454 |
|
(concat "\nTag : " (substring tag 1))) |
455 |
|
((string-match "\\`D" tag) |
456 |
|
(concat "\nDate : " (substring tag 1))) |
457 |
|
(""))))) |
458 |
(setq buffer-read-only t) |
(setq buffer-read-only t) |
459 |
(cvs-mode) |
(cvs-mode) |
460 |
(set (make-local-variable 'list-buffers-directory) buffer-name) |
(set (make-local-variable 'list-buffers-directory) buffer-name) |
1064 |
(cvs-prefix-set 'cvs-force-command arg)) |
(cvs-prefix-set 'cvs-force-command arg)) |
1065 |
|
|
1066 |
(put 'cvs-mode 'mode-class 'special) |
(put 'cvs-mode 'mode-class 'special) |
1067 |
(define-derived-mode cvs-mode fundamental-mode "CVS" |
(define-derived-mode cvs-mode nil "CVS" |
1068 |
"Mode used for PCL-CVS, a frontend to CVS. |
"Mode used for PCL-CVS, a frontend to CVS. |
1069 |
Full documentation is in the Texinfo file." |
Full documentation is in the Texinfo file." |
1070 |
(setq mode-line-process |
(setq mode-line-process |
1073 |
("" cvs-branch-prefix (cvs-secondary-branch-prefix |
("" cvs-branch-prefix (cvs-secondary-branch-prefix |
1074 |
("->" cvs-secondary-branch-prefix)))) |
("->" cvs-secondary-branch-prefix)))) |
1075 |
" " cvs-mode-line-process)) |
" " cvs-mode-line-process)) |
1076 |
|
(if buffer-file-name |
1077 |
|
(error "Use M-x cvs-quickdir to get a *cvs* buffer.")) |
1078 |
(buffer-disable-undo) |
(buffer-disable-undo) |
1079 |
;;(set (make-local-variable 'goal-column) cvs-cursor-column) |
;;(set (make-local-variable 'goal-column) cvs-cursor-column) |
1080 |
(set (make-local-variable 'revert-buffer-function) 'cvs-mode-revert-buffer) |
(set (make-local-variable 'revert-buffer-function) 'cvs-mode-revert-buffer) |