Mercurial > emacs
comparison lisp/pcvs.el @ 55458:f673d8bf105a
(cvs-mode-run, cvs-is-within-p): Fix typo in docstring.
(cvs-get-marked): Remove redundant arglist info.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Sun, 09 May 2004 01:54:01 +0000 |
parents | 3b1741ff0676 |
children | b25f4dadde90 |
comparison
equal
deleted
inserted
replaced
55457:f263b4b25c9e | 55458:f673d8bf105a |
---|---|
1310 "Return a list of all selected fileinfos. | 1310 "Return a list of all selected fileinfos. |
1311 If there are any marked tins, and IGNORE-MARKS is nil, return them. | 1311 If there are any marked tins, and IGNORE-MARKS is nil, return them. |
1312 Otherwise, if the cursor selects a directory, and IGNORE-CONTENTS is | 1312 Otherwise, if the cursor selects a directory, and IGNORE-CONTENTS is |
1313 nil, return all files in it, else return just the directory. | 1313 nil, return all files in it, else return just the directory. |
1314 Otherwise return (a list containing) the file the cursor points to, or | 1314 Otherwise return (a list containing) the file the cursor points to, or |
1315 an empty list if it doesn't point to a file at all. | 1315 an empty list if it doesn't point to a file at all." |
1316 | |
1317 Args: &optional IGNORE-MARKS IGNORE-CONTENTS." | |
1318 | |
1319 (let ((fis nil)) | 1316 (let ((fis nil)) |
1320 (dolist (fi (if (and (boundp 'cvs-minor-current-files) | 1317 (dolist (fi (if (and (boundp 'cvs-minor-current-files) |
1321 (consp cvs-minor-current-files)) | 1318 (consp cvs-minor-current-files)) |
1322 (mapcar | 1319 (mapcar |
1323 (lambda (f) | 1320 (lambda (f) |
1752 (funcall (car cvs-idiff-imerge-handlers) | 1749 (funcall (car cvs-idiff-imerge-handlers) |
1753 rev1-buf rev2-buf))))) | 1750 rev1-buf rev2-buf))))) |
1754 | 1751 |
1755 | 1752 |
1756 (defun cvs-is-within-p (fis dir) | 1753 (defun cvs-is-within-p (fis dir) |
1757 "Non-nil is buffer is inside one of FIS (in DIR)." | 1754 "Non-nil if buffer is inside one of FIS (in DIR)." |
1758 (when (stringp buffer-file-name) | 1755 (when (stringp buffer-file-name) |
1759 (setq buffer-file-name (expand-file-name buffer-file-name)) | 1756 (setq buffer-file-name (expand-file-name buffer-file-name)) |
1760 (let (ret) | 1757 (let (ret) |
1761 (dolist (fi (or fis (list (cvs-create-fileinfo 'DIRCHANGE "" "." "")))) | 1758 (dolist (fi (or fis (list (cvs-create-fileinfo 'DIRCHANGE "" "." "")))) |
1762 (when (cvs-string-prefix-p | 1759 (when (cvs-string-prefix-p |
1772 Executes `cvs CVSARGS CMD FLAGS FIS'. | 1769 Executes `cvs CVSARGS CMD FLAGS FIS'. |
1773 BUF is the buffer to be used for cvs' output. | 1770 BUF is the buffer to be used for cvs' output. |
1774 DONT-CHANGE-DISC non-nil indicates that the command will not change the | 1771 DONT-CHANGE-DISC non-nil indicates that the command will not change the |
1775 contents of files. This is only used by the parser. | 1772 contents of files. This is only used by the parser. |
1776 POSTPROC is a list of expressions to be evaluated at the very end (after | 1773 POSTPROC is a list of expressions to be evaluated at the very end (after |
1777 parsing if applicable). It will be prepended with `progn' is necessary." | 1774 parsing if applicable). It will be prepended with `progn' if necessary." |
1778 (let ((def-dir default-directory)) | 1775 (let ((def-dir default-directory)) |
1779 ;; Save the relevant buffers | 1776 ;; Save the relevant buffers |
1780 (save-some-buffers nil (lambda () (cvs-is-within-p fis def-dir)))) | 1777 (save-some-buffers nil (lambda () (cvs-is-within-p fis def-dir)))) |
1781 (unless (listp flags) (error "flags should be a list of strings")) | 1778 (unless (listp flags) (error "flags should be a list of strings")) |
1782 ;; Some w32 versions of CVS don't like an explicit . too much. | 1779 ;; Some w32 versions of CVS don't like an explicit . too much. |