Mercurial > emacs
comparison lisp/vc.el @ 48139:ae2a3a67e382
(vc-dired-move): Adapt dired-move-to-filename-regexp to its current
version in dired.el.
author | André Spiegel <spiegel@gnu.org> |
---|---|
date | Sun, 03 Nov 2002 14:48:37 +0000 |
parents | 2a95bf2d8eaf |
children | 9f0d9f099b64 |
comparison
equal
deleted
inserted
replaced
48138:3e781c129fd0 | 48139:ae2a3a67e382 |
---|---|
4 | 4 |
5 ;; Author: FSF (see below for full credits) | 5 ;; Author: FSF (see below for full credits) |
6 ;; Maintainer: Andre Spiegel <spiegel@gnu.org> | 6 ;; Maintainer: Andre Spiegel <spiegel@gnu.org> |
7 ;; Keywords: tools | 7 ;; Keywords: tools |
8 | 8 |
9 ;; $Id: vc.el,v 1.343 2002/10/11 09:36:00 spiegel Exp $ | 9 ;; $Id: vc.el,v 1.344 2002/10/14 15:13:59 spiegel Exp $ |
10 | 10 |
11 ;; This file is part of GNU Emacs. | 11 ;; This file is part of GNU Emacs. |
12 | 12 |
13 ;; GNU Emacs is free software; you can redistribute it and/or modify | 13 ;; GNU Emacs is free software; you can redistribute it and/or modify |
14 ;; it under the terms of the GNU General Public License as published by | 14 ;; it under the terms of the GNU General Public License as published by |
2111 ;; We do it here because dired might not be loaded yet | 2111 ;; We do it here because dired might not be loaded yet |
2112 ;; when vc-dired-mode-map is initialized. | 2112 ;; when vc-dired-mode-map is initialized. |
2113 (set-keymap-parent vc-dired-mode-map dired-mode-map) | 2113 (set-keymap-parent vc-dired-mode-map dired-mode-map) |
2114 (add-hook 'dired-after-readin-hook 'vc-dired-hook nil t) | 2114 (add-hook 'dired-after-readin-hook 'vc-dired-hook nil t) |
2115 ;; The following is slightly modified from dired.el, | 2115 ;; The following is slightly modified from dired.el, |
2116 ;; because file lines look a bit different in vc-dired-mode. | 2116 ;; because file lines look a bit different in vc-dired-mode |
2117 ;; (the column before the date does not end in a digit). | |
2117 (set (make-local-variable 'dired-move-to-filename-regexp) | 2118 (set (make-local-variable 'dired-move-to-filename-regexp) |
2118 (let* | 2119 (let* ((l "\\([A-Za-z]\\|[^\0-\177]\\)") |
2119 ((l "\\([A-Za-z]\\|[^\0-\177]\\)") | 2120 ;; In some locales, month abbreviations are as short as 2 letters, |
2120 ;; In some locales, month abbreviations are as short as 2 letters, | 2121 ;; and they can be followed by ".". |
2121 ;; and they can be padded on the right with spaces. | 2122 (month (concat l l "+\\.?")) |
2122 (month (concat l l "+ *")) | 2123 (s " ") |
2123 ;; Recognize any non-ASCII character. | 2124 (yyyy "[0-9][0-9][0-9][0-9]") |
2124 ;; The purpose is to match a Kanji character. | 2125 (dd "[ 0-3][0-9]") |
2125 (k "[^\0-\177]") | 2126 (HH:MM "[ 0-2][0-9]:[0-5][0-9]") |
2126 ;; (k "[^\x00-\x7f\x80-\xff]") | 2127 (seconds "[0-6][0-9]\\([.,][0-9]+\\)?") |
2127 (s " ") | 2128 (zone "[-+][0-2][0-9][0-5][0-9]") |
2128 (yyyy "[0-9][0-9][0-9][0-9]") | 2129 (iso-mm-dd "[01][0-9]-[0-3][0-9]") |
2129 (mm "[ 0-1][0-9]") | 2130 (iso-time (concat HH:MM "\\(:" seconds "\\( ?" zone "\\)?\\)?")) |
2130 (dd "[ 0-3][0-9]") | 2131 (iso (concat "\\(\\(" yyyy "-\\)?" iso-mm-dd "[ T]" iso-time |
2131 (HH:MM "[ 0-2][0-9]:[0-5][0-9]") | 2132 "\\|" yyyy "-" iso-mm-dd "\\)")) |
2132 (western (concat "\\(" month s dd "\\|" dd s month "\\)" | 2133 (western (concat "\\(" month s "+" dd "\\|" dd "\\.?" s month "\\)" |
2133 s "\\(" HH:MM "\\|" s yyyy"\\|" yyyy s "\\)")) | 2134 s "+" |
2134 (japanese (concat mm k s dd k s "\\(" s HH:MM "\\|" yyyy k "\\)"))) | 2135 "\\(" HH:MM "\\|" yyyy "\\)")) |
2135 ;; the .* below ensures that we find the last match on a line | 2136 (western-comma (concat month s "+" dd "," s "+" yyyy)) |
2136 (concat ".*" s "\\(" western "\\|" japanese "\\)" s))) | 2137 ;; Japanese MS-Windows ls-lisp has one-digit months, and |
2138 ;; omits the Kanji characters after month and day-of-month. | |
2139 (mm "[ 0-1]?[0-9]") | |
2140 (japanese | |
2141 (concat mm l "?" s dd l "?" s "+" | |
2142 "\\(" HH:MM "\\|" yyyy l "?" "\\)"))) | |
2143 (concat ".*" s | |
2144 "\\(" western "\\|" western-comma "\\|" japanese "\\|" iso "\\)" | |
2145 s "+"))) | |
2137 (and (boundp 'vc-dired-switches) | 2146 (and (boundp 'vc-dired-switches) |
2138 vc-dired-switches | 2147 vc-dired-switches |
2139 (set (make-local-variable 'dired-actual-switches) | 2148 (set (make-local-variable 'dired-actual-switches) |
2140 vc-dired-switches)) | 2149 vc-dired-switches)) |
2141 (set (make-local-variable 'vc-dired-terse-mode) vc-dired-terse-display) | 2150 (set (make-local-variable 'vc-dired-terse-mode) vc-dired-terse-display) |