comparison lisp/pcvs.el @ 35707:1285b34a630d

(cvs-mark-fis-dead): New function. (cvs-mode-add): Use it. (cvs-mode-add-change-log-entry-other-window): Rebind change-log-default-name to itself rather than to nil.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 29 Jan 2001 20:22:28 +0000
parents d88382df7b52
children c3af189df631
comparison
equal deleted inserted replaced
35706:952bdd6fb8e5 35707:1285b34a630d
11 ;; (Stefan Monnier) monnier@cs.yale.edu 11 ;; (Stefan Monnier) monnier@cs.yale.edu
12 ;; (Greg Klanderman) greg@alphatech.com 12 ;; (Greg Klanderman) greg@alphatech.com
13 ;; (Jari Aalto+mail.emacs) jari.aalto@poboxes.com 13 ;; (Jari Aalto+mail.emacs) jari.aalto@poboxes.com
14 ;; Maintainer: (Stefan Monnier) monnier+lists/cvs/pcl@flint.cs.yale.edu 14 ;; Maintainer: (Stefan Monnier) monnier+lists/cvs/pcl@flint.cs.yale.edu
15 ;; Keywords: CVS, version control, release management 15 ;; Keywords: CVS, version control, release management
16 ;; Revision: $Id: pcvs.el,v 1.23 2000/12/18 03:17:40 monnier Exp $ 16 ;; Revision: $Id: pcvs.el,v 1.24 2001/01/26 20:46:42 fx Exp $
17 17
18 ;; This file is part of GNU Emacs. 18 ;; This file is part of GNU Emacs.
19 19
20 ;; GNU Emacs is free software; you can redistribute it and/or modify 20 ;; GNU Emacs is free software; you can redistribute it and/or modify
21 ;; it under the terms of the GNU General Public License as published by 21 ;; it under the terms of the GNU General Public License as published by
1347 (setq last (cvs-addto-collection cvs-cookies fi last))) 1347 (setq last (cvs-addto-collection cvs-cookies fi last)))
1348 ;; There should have been at least one entry. 1348 ;; There should have been at least one entry.
1349 (goto-char (ewoc-location last)) 1349 (goto-char (ewoc-location last))
1350 (ewoc-data last))) 1350 (ewoc-data last)))
1351 1351
1352 (defun cvs-mark-fis-dead (fis)
1353 ;; Helper function, introduced because of the need for macro-expansion.
1354 (dolist (fi fis)
1355 (setf (cvs-fileinfo->type fi) 'DEAD)))
1356
1352 (defun-cvs-mode (cvs-mode-add . SIMPLE) (flags) 1357 (defun-cvs-mode (cvs-mode-add . SIMPLE) (flags)
1353 "Add marked files to the cvs repository. 1358 "Add marked files to the cvs repository.
1354 With prefix argument, prompt for cvs flags." 1359 With prefix argument, prompt for cvs flags."
1355 (interactive (list (cvs-flags-query 'cvs-add-flags "cvs add flags"))) 1360 (interactive (list (cvs-flags-query 'cvs-add-flags "cvs add flags")))
1356 (let ((fis (cvs-mode-marked 'add)) 1361 (let ((fis (cvs-mode-marked 'add))
1370 ;; setup postprocessing for the directory entries 1375 ;; setup postprocessing for the directory entries
1371 (when dirs 1376 (when dirs
1372 `((cvs-run-process (list "-n" "update") 1377 `((cvs-run-process (list "-n" "update")
1373 ',dirs 1378 ',dirs
1374 '(cvs-parse-process t)) 1379 '(cvs-parse-process t))
1375 (dolist (fi ',dirs) (setf (cvs-fileinfo->type fi) 'DEAD)))))) 1380 (cvs-mark-fis-dead ',dirs)))))
1376 (cvs-mode-run "add" flags fis :postproc postproc)))) 1381 (cvs-mode-run "add" flags fis :postproc postproc))))
1377 1382
1378 (defun-cvs-mode (cvs-mode-diff . DOUBLE) (flags) 1383 (defun-cvs-mode (cvs-mode-diff . DOUBLE) (flags)
1379 "Diff the selected files against the repository. 1384 "Diff the selected files against the repository.
1380 This command compares the files in your working area against the 1385 This command compares the files in your working area against the
1916 "Add a ChangeLog entry in the ChangeLog of the current directory." 1921 "Add a ChangeLog entry in the ChangeLog of the current directory."
1917 (interactive) 1922 (interactive)
1918 (let* ((fi (cvs-mode-marked nil nil :one t)) 1923 (let* ((fi (cvs-mode-marked nil nil :one t))
1919 (default-directory (cvs-expand-dir-name (cvs-fileinfo->dir fi))) 1924 (default-directory (cvs-expand-dir-name (cvs-fileinfo->dir fi)))
1920 (buffer-file-name (expand-file-name (cvs-fileinfo->file fi))) 1925 (buffer-file-name (expand-file-name (cvs-fileinfo->file fi)))
1921 change-log-default-name) 1926 (change-log-default-name change-log-default-name))
1922 (add-change-log-entry-other-window))) 1927 (add-change-log-entry-other-window)))
1923 1928
1924 ;; interactive commands to set optional flags 1929 ;; interactive commands to set optional flags
1925 1930
1926 (defun cvs-mode-set-flags (flag) 1931 (defun cvs-mode-set-flags (flag)