Mercurial > emacs
comparison lisp/pcvs.el @ 34412:da1ec51d3da7
(cvs-mode-marked): Set up the default for CMD manually.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 11 Dec 2000 03:20:21 +0000 |
parents | 0f95f2e53b1f |
children | 433f1bff06f5 |
comparison
equal
deleted
inserted
replaced
34411:8bc4d3f8994c | 34412:da1ec51d3da7 |
---|---|
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 ;; Version: $Name: $ | 16 ;; Version: $Name: $ |
17 ;; Revision: $Id: pcvs.el,v 1.20 2000/12/08 16:58:45 monnier Exp $ | 17 ;; Revision: $Id: pcvs.el,v 1.21 2000/12/10 21:20:56 monnier Exp $ |
18 | 18 |
19 ;; This file is part of GNU Emacs. | 19 ;; This file is part of GNU Emacs. |
20 | 20 |
21 ;; GNU Emacs is free software; you can redistribute it and/or modify | 21 ;; GNU Emacs is free software; you can redistribute it and/or modify |
22 ;; it under the terms of the GNU General Public License as published by | 22 ;; it under the terms of the GNU General Public License as published by |
1235 | 1235 |
1236 (if (or ignore-contents (not (eq (cvs-fileinfo->type fi) 'DIRCHANGE))) | 1236 (if (or ignore-contents (not (eq (cvs-fileinfo->type fi) 'DIRCHANGE))) |
1237 (push fi fis) | 1237 (push fi fis) |
1238 ;; If a directory is selected, return members, if any. | 1238 ;; If a directory is selected, return members, if any. |
1239 (setq fis | 1239 (setq fis |
1240 (append (ewoc-collect cvs-cookies | 1240 (append (ewoc-collect |
1241 'cvs-dir-member-p | 1241 cvs-cookies 'cvs-dir-member-p (cvs-fileinfo->dir fi)) |
1242 (cvs-fileinfo->dir fi)) | |
1243 fis)))) | 1242 fis)))) |
1244 (nreverse fis))) | 1243 (nreverse fis))) |
1245 | 1244 |
1246 (defun* cvs-mode-marked (filter &optional (cmd (symbol-name filter)) | 1245 (defun* cvs-mode-marked (filter &optional cmd |
1247 &key read-only one file noquery) | 1246 &key read-only one file noquery) |
1248 "Get the list of marked FIS. | 1247 "Get the list of marked FIS. |
1249 CMD is used to determine whether to use the marks or not. | 1248 CMD is used to determine whether to use the marks or not. |
1250 Only files for which FILTER is applicable are returned. | 1249 Only files for which FILTER is applicable are returned. |
1251 If READ-ONLY is non-nil, the current toggling is left intact. | 1250 If READ-ONLY is non-nil, the current toggling is left intact. |
1252 If ONE is non-nil, marks are ignored and a single FI is returned. | 1251 If ONE is non-nil, marks are ignored and a single FI is returned. |
1253 If FILE is non-nil, directory entries won't be selected." | 1252 If FILE is non-nil, directory entries won't be selected." |
1253 (unless cmd (setq cmd (symbol-name filter))) | |
1254 (let* ((fis (cvs-get-marked (or one (cvs-ignore-marks-p cmd read-only)) | 1254 (let* ((fis (cvs-get-marked (or one (cvs-ignore-marks-p cmd read-only)) |
1255 (and (not file) | 1255 (and (not file) |
1256 (cvs-applicable-p 'DIRCHANGE filter)))) | 1256 (cvs-applicable-p 'DIRCHANGE filter)))) |
1257 (force (cvs-prefix-get 'cvs-force-command)) | 1257 (force (cvs-prefix-get 'cvs-force-command)) |
1258 (fis (car (cvs-partition | 1258 (fis (car (cvs-partition |
1260 fis)))) | 1260 fis)))) |
1261 (when (and (or (null fis) (and one (cdr fis))) (not noquery)) | 1261 (when (and (or (null fis) (and one (cdr fis))) (not noquery)) |
1262 (message (if (null fis) | 1262 (message (if (null fis) |
1263 "`%s' is not applicable to any of the selected files." | 1263 "`%s' is not applicable to any of the selected files." |
1264 "`%s' is only applicable to a single file.") cmd) | 1264 "`%s' is only applicable to a single file.") cmd) |
1265 (sit-for 0.5) | 1265 (sit-for 1) |
1266 (setq fis (list (cvs-insert-file | 1266 (setq fis (list (cvs-insert-file |
1267 (read-file-name (format "File to %s: " cmd)))))) | 1267 (read-file-name (format "File to %s: " cmd)))))) |
1268 (if one (car fis) fis))) | 1268 (if one (car fis) fis))) |
1269 | 1269 |
1270 (defun cvs-enabledp (filter) | 1270 (defun cvs-enabledp (filter) |