# HG changeset patch # User Stefan Monnier # Date 1052839359 0 # Node ID c1e6923f4f9b4580e38e12fa2a1a59f8c3d43229 # Parent d5b5bbb27b2f91409913a96b3d02185cc53ef8d4 (cvs-make-cvs-buffer): Add the tag info. (cvs-mode): Prevent pilot-error. diff -r d5b5bbb27b2f -r c1e6923f4f9b lisp/pcvs.el --- a/lisp/pcvs.el Tue May 13 14:30:58 2003 +0000 +++ b/lisp/pcvs.el Tue May 13 15:22:39 2003 +0000 @@ -444,12 +444,17 @@ (setq default-directory dir) (setq buffer-read-only nil) (erase-buffer) - (insert "\ -Repository : " (directory-file-name (cvs-get-cvsroot)) " -Module : " (cvs-get-module) " -Working dir: " (abbreviate-file-name dir) " - -") + (insert "Repository : " (directory-file-name (cvs-get-cvsroot)) + "\nModule : " (cvs-get-module) + "\nWorking dir: " (abbreviate-file-name dir) + (if (not (file-readable-p "CVS/Tag")) "\n" + (let ((tag (cvs-file-to-string "CVS/Tag"))) + (cond + ((string-match "\\`T" tag) + (concat "\nTag : " (substring tag 1))) + ((string-match "\\`D" tag) + (concat "\nDate : " (substring tag 1))) + (""))))) (setq buffer-read-only t) (cvs-mode) (set (make-local-variable 'list-buffers-directory) buffer-name) @@ -1059,7 +1064,7 @@ (cvs-prefix-set 'cvs-force-command arg)) (put 'cvs-mode 'mode-class 'special) -(define-derived-mode cvs-mode fundamental-mode "CVS" +(define-derived-mode cvs-mode nil "CVS" "Mode used for PCL-CVS, a frontend to CVS. Full documentation is in the Texinfo file." (setq mode-line-process @@ -1068,6 +1073,8 @@ ("" cvs-branch-prefix (cvs-secondary-branch-prefix ("->" cvs-secondary-branch-prefix)))) " " cvs-mode-line-process)) + (if buffer-file-name + (error "Use M-x cvs-quickdir to get a *cvs* buffer.")) (buffer-disable-undo) ;;(set (make-local-variable 'goal-column) cvs-cursor-column) (set (make-local-variable 'revert-buffer-function) 'cvs-mode-revert-buffer)