Mercurial > emacs
comparison lisp/pcvs-info.el @ 89909:68c22ea6027c
Sync to HEAD
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 16 Apr 2004 12:51:06 +0000 |
parents | 375f2633d815 |
children | cce1c0ee76ee |
comparison
equal
deleted
inserted
replaced
89908:ee1402f7b568 | 89909:68c22ea6027c |
---|---|
1 ;;; pcvs-info.el --- internal representation of a fileinfo entry | 1 ;;; pcvs-info.el --- internal representation of a fileinfo entry |
2 | 2 |
3 ;; Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2004 |
4 ;; Free Software Foundation, Inc. | |
4 | 5 |
5 ;; Author: Stefan Monnier <monnier@cs.yale.edu> | 6 ;; Author: Stefan Monnier <monnier@cs.yale.edu> |
6 ;; Keywords: pcl-cvs | 7 ;; Keywords: pcl-cvs |
7 | 8 |
8 ;; This file is part of GNU Emacs. | 9 ;; This file is part of GNU Emacs. |
127 | 128 |
128 (defvar cvs-bakprefix ".#" | 129 (defvar cvs-bakprefix ".#" |
129 "The prefix that CVS prepends to files when rcsmerge'ing.") | 130 "The prefix that CVS prepends to files when rcsmerge'ing.") |
130 | 131 |
131 (easy-mmode-defmap cvs-status-map | 132 (easy-mmode-defmap cvs-status-map |
132 '(([(mouse-2)] . cvs-mouse-toggle-mark)) | 133 '(([(mouse-2)] . cvs-mode-toggle-mark)) |
133 "Local keymap for text properties of status") | 134 "Local keymap for text properties of status") |
134 | 135 |
135 ;; Constructor: | 136 ;; Constructor: |
136 | 137 |
137 (defstruct (cvs-fileinfo | 138 (defstruct (cvs-fileinfo |
217 "Construct the file name of the backup file for FILEINFO." | 218 "Construct the file name of the backup file for FILEINFO." |
218 (let* ((dir (cvs-fileinfo->dir fileinfo)) | 219 (let* ((dir (cvs-fileinfo->dir fileinfo)) |
219 (file (cvs-fileinfo->file fileinfo)) | 220 (file (cvs-fileinfo->file fileinfo)) |
220 (default-directory (file-name-as-directory (expand-file-name dir))) | 221 (default-directory (file-name-as-directory (expand-file-name dir))) |
221 (files (directory-files "." nil | 222 (files (directory-files "." nil |
222 (concat "^" (regexp-quote cvs-bakprefix) | 223 (concat "\\`" (regexp-quote cvs-bakprefix) |
223 (regexp-quote file) "\\."))) | 224 (regexp-quote file) "\\(\\.[0-9]+\\.[0-9]+\\)+\\'"))) |
224 bf) | 225 bf) |
225 (dolist (f files bf) | 226 (dolist (f files bf) |
226 (when (and (file-readable-p f) | 227 (when (and (file-readable-p f) |
227 (or (null bf) (file-newer-than-file-p f bf))) | 228 (or (null bf) (file-newer-than-file-p f bf))) |
228 (setq bf (concat dir f)))))) | 229 (setq bf (concat dir f)))))) |
468 (forward-line 1)))) | 469 (forward-line 1)))) |
469 fis)) | 470 fis)) |
470 | 471 |
471 (provide 'pcvs-info) | 472 (provide 'pcvs-info) |
472 | 473 |
474 ;;; arch-tag: d85dde07-bdc2-400a-882f-92f398c7b0ba | |
473 ;;; pcvs-info.el ends here | 475 ;;; pcvs-info.el ends here |