Mercurial > emacs
comparison lisp/cvs-status.el @ 58159:4d0805441612
Reduce spurious warnings.
(cvs-status-checkout): Remove.
(cvs-status-mode-map): Use cvs-mode-checkout instead.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 11 Nov 2004 23:47:15 +0000 |
parents | ba72d48889b4 |
children | 2e115caaa7d2 cb7f41387eb3 |
comparison
equal
deleted
inserted
replaced
58158:0d53729c8f7a | 58159:4d0805441612 |
---|---|
1 ;;; cvs-status.el --- major mode for browsing `cvs status' output -*- coding: utf-8 -*- | 1 ;;; cvs-status.el --- major mode for browsing `cvs status' output -*- coding: utf-8 -*- |
2 | 2 |
3 ;; Copyright (C) 1999, 2000, 03, 2004 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: Stefan Monnier <monnier@cs.yale.edu> | 5 ;; Author: Stefan Monnier <monnier@cs.yale.edu> |
6 ;; Keywords: pcl-cvs cvs status tree tools | 6 ;; Keywords: pcl-cvs cvs status tree tools |
7 | 7 |
8 ;; This file is part of GNU Emacs. | 8 ;; This file is part of GNU Emacs. |
29 ;; - Somehow allow cvs-status-tree to work on-the-fly | 29 ;; - Somehow allow cvs-status-tree to work on-the-fly |
30 | 30 |
31 ;;; Code: | 31 ;;; Code: |
32 | 32 |
33 (eval-when-compile (require 'cl)) | 33 (eval-when-compile (require 'cl)) |
34 (require 'pcvs-util) | |
34 (eval-when-compile (require 'pcvs)) | 35 (eval-when-compile (require 'pcvs)) |
35 (require 'pcvs-util) | |
36 | 36 |
37 ;;; | 37 ;;; |
38 | 38 |
39 (defgroup cvs-status nil | 39 (defgroup cvs-status nil |
40 "Major mode for browsing `cvs status' output." | 40 "Major mode for browsing `cvs status' output." |
48 ("P" . cvs-status-prev) | 48 ("P" . cvs-status-prev) |
49 ("\M-n" . cvs-status-next) | 49 ("\M-n" . cvs-status-next) |
50 ("\M-p" . cvs-status-prev) | 50 ("\M-p" . cvs-status-prev) |
51 ("t" . cvs-status-cvstrees) | 51 ("t" . cvs-status-cvstrees) |
52 ("T" . cvs-status-trees) | 52 ("T" . cvs-status-trees) |
53 (">" . cvs-status-checkout)) | 53 (">" . cvs-mode-checkout)) |
54 "CVS-Status' keymap." | 54 "CVS-Status' keymap." |
55 :group 'cvs-status | 55 :group 'cvs-status |
56 :inherit 'cvs-mode-map) | 56 :inherit 'cvs-mode-map) |
57 | 57 |
58 ;;(easy-menu-define cvs-status-menu cvs-status-mode-map | 58 ;;(easy-menu-define cvs-status-menu cvs-status-mode-map |
87 (forward-line 1)) | 87 (forward-line 1)) |
88 (1 font-lock-function-name-face))))) | 88 (1 font-lock-function-name-face))))) |
89 (defconst cvs-status-font-lock-defaults | 89 (defconst cvs-status-font-lock-defaults |
90 '(cvs-status-font-lock-keywords t nil nil nil (font-lock-multiline . t))) | 90 '(cvs-status-font-lock-keywords t nil nil nil (font-lock-multiline . t))) |
91 | 91 |
92 | 92 (defvar cvs-minor-wrap-function) |
93 (put 'cvs-status-mode 'mode-class 'special) | 93 (put 'cvs-status-mode 'mode-class 'special) |
94 ;;;###autoload | 94 ;;;###autoload |
95 (define-derived-mode cvs-status-mode fundamental-mode "CVS-Status" | 95 (define-derived-mode cvs-status-mode fundamental-mode "CVS-Status" |
96 "Mode used for cvs status output." | 96 "Mode used for cvs status output." |
97 (set (make-local-variable 'font-lock-defaults) cvs-status-font-lock-defaults) | 97 (set (make-local-variable 'font-lock-defaults) cvs-status-font-lock-defaults) |
106 (or (re-search-backward cvs-status-entry-leader-re nil t) | 106 (or (re-search-backward cvs-status-entry-leader-re nil t) |
107 (re-search-forward cvs-status-entry-leader-re)) | 107 (re-search-forward cvs-status-entry-leader-re)) |
108 (let* ((file (match-string 1)) | 108 (let* ((file (match-string 1)) |
109 (cvsdir (and (re-search-backward cvs-status-dir-re nil t) | 109 (cvsdir (and (re-search-backward cvs-status-dir-re nil t) |
110 (match-string 1))) | 110 (match-string 1))) |
111 (pcldir (and (re-search-backward cvs-pcl-cvs-dirchange-re nil t) | 111 (pcldir (and (if (boundp 'cvs-pcl-cvs-dirchange-re) |
112 (re-search-backward cvs-pcl-cvs-dirchange-re nil t)) | |
112 (match-string 1))) | 113 (match-string 1))) |
113 (dir "")) | 114 (dir "")) |
114 (let ((default-directory "")) | 115 (let ((default-directory "")) |
115 (when pcldir (setq dir (expand-file-name pcldir dir))) | 116 (when pcldir (setq dir (expand-file-name pcldir dir))) |
116 (when cvsdir (setq dir (expand-file-name cvsdir dir))) | 117 (when cvsdir (setq dir (expand-file-name cvsdir dir))) |
463 (combine-after-change-calls | 464 (combine-after-change-calls |
464 (cvs-tree-tags-insert tags prev)) | 465 (cvs-tree-tags-insert tags prev)) |
465 ;;(cvs-refontify pt (point)) | 466 ;;(cvs-refontify pt (point)) |
466 ;;(sit-for 0) | 467 ;;(sit-for 0) |
467 )))))) | 468 )))))) |
468 | |
469 (defun-cvs-mode (cvs-status-checkout . NOARGS) (dir) | |
470 "Run cvs-checkout against the tag under the point. | |
471 The files are stored to DIR." | |
472 (interactive | |
473 (let* ((module (cvs-get-module)) | |
474 (branch (cvs-prefix-get 'cvs-branch-prefix)) | |
475 (prompt (format "CVS Checkout Directory for `%s%s': " | |
476 module | |
477 (if branch (format "(branch: %s)" branch) | |
478 "")))) | |
479 (list | |
480 (read-directory-name prompt | |
481 nil default-directory nil)))) | |
482 (let ((modules (cvs-string->strings (cvs-get-module))) | |
483 (flags (cvs-add-branch-prefix | |
484 (cvs-flags-query 'cvs-checkout-flags "cvs checkout flags"))) | |
485 (cvs-cvsroot (cvs-get-cvsroot))) | |
486 (cvs-checkout modules dir flags))) | |
487 | 469 |
488 (defun cvs-tree-tags-insert (tags prev) | 470 (defun cvs-tree-tags-insert (tags prev) |
489 (when tags | 471 (when tags |
490 (let* ((tag (car tags)) | 472 (let* ((tag (car tags)) |
491 (vlist (cvs-tag->vlist tag)) | 473 (vlist (cvs-tag->vlist tag)) |
554 (cvs-tree-print tree 'cvs-tag->string 3))))) | 536 (cvs-tree-print tree 'cvs-tag->string 3))))) |
555 | 537 |
556 | 538 |
557 (provide 'cvs-status) | 539 (provide 'cvs-status) |
558 | 540 |
559 ;;; arch-tag: db8b5094-d02a-473e-a476-544e89ff5ad0 | 541 ;; arch-tag: db8b5094-d02a-473e-a476-544e89ff5ad0 |
560 ;;; cvs-status.el ends here | 542 ;;; cvs-status.el ends here |