Mercurial > emacs
comparison lisp/dired.el @ 20452:d56e496c7790
(dired-move-to-filename-regexp):
Fix the problem with misparsing
`-r--r--r-- 1 may 1997' by requiring a digit before the date.
(dired-move-to-filename-regexp):
Allow any month name of 2 letters or more.
author | Paul Eggert <eggert@twinsun.com> |
---|---|
date | Thu, 11 Dec 1997 06:58:17 +0000 |
parents | 3a76b48c399d |
children | bc06250acf07 |
comparison
equal
deleted
inserted
replaced
20451:93652fd3234d | 20452:d56e496c7790 |
---|---|
1350 | 1350 |
1351 ;;; Functions for finding the file name in a dired buffer line. | 1351 ;;; Functions for finding the file name in a dired buffer line. |
1352 | 1352 |
1353 (defvar dired-move-to-filename-regexp | 1353 (defvar dired-move-to-filename-regexp |
1354 (let* ((l "[A-Za-z\xa0-\xff]") | 1354 (let* ((l "[A-Za-z\xa0-\xff]") |
1355 ;; Letter or space. | 1355 ;; In some locales, month abbreviations are as short as 2 letters, |
1356 (ls "[ A-Za-z\xa0-\xff]") | 1356 ;; and they can be padded on the right with spaces. |
1357 (month (concat l l "\\(" ls "\\|" l l "\\)")) | 1357 (month (concat l l "+ *")) |
1358 ;; Recognize any non-ASCII character. | 1358 ;; Recognize any non-ISO-8859 character. |
1359 ;; The purpose is to match a Kanji character. | 1359 ;; The purpose is to match a Kanji character. |
1360 (k "[^\x00-\xff]") | 1360 (k "[^\x00-\xff]") |
1361 (s " ") | 1361 (s " ") |
1362 (yyyy "[0-9][0-9][0-9][0-9]") | 1362 (yyyy "[0-9][0-9][0-9][0-9]") |
1363 (mm "[ 0-1][0-9]") | 1363 (mm "[ 0-1][0-9]") |
1364 (dd "[ 0-3][0-9]") | 1364 (dd "[ 0-3][0-9]") |
1365 (HH:MM "[ 0-2][0-9]:[0-5][0-9]") | 1365 (HH:MM "[ 0-2][0-9]:[0-5][0-9]") |
1366 (western (concat "\\(" month s dd "\\|" dd s month "\\)" | 1366 (western (concat "\\(" month s dd "\\|" dd s month "\\)" |
1367 s "\\(" HH:MM "\\|" s yyyy "\\)")) | 1367 s "\\(" HH:MM "\\|" s yyyy "\\)")) |
1368 (japanese (concat mm k " " dd k s "\\(" s HH:MM "\\|" yyyy k "\\)"))) | 1368 (japanese (concat mm k s dd k s "\\(" s HH:MM "\\|" yyyy k "\\)"))) |
1369 (concat s "\\(" western "\\|" japanese "\\)" s)) | 1369 ;; Require the previous column to end in a digit. |
1370 "Regular expression to match a date and time in a directory listing. | 1370 ;; This avoids recognizing `1 may 1997' as a date in the line: |
1371 ;; -r--r--r-- 1 may 1997 1168 Oct 19 16:49 README | |
1372 (concat "[0-9]" s "\\(" western "\\|" japanese "\\)" s)) | |
1373 "Regular expression to match up to the file name in a directory listing. | |
1371 The default value is designed to recognize dates and times | 1374 The default value is designed to recognize dates and times |
1372 regardless of the language.") | 1375 regardless of the language.") |
1373 | 1376 |
1374 (defvar dired-permission-flags-regexp | 1377 (defvar dired-permission-flags-regexp |
1375 "\\([^ ]\\)[-r][-w]\\([^ ]\\)[-r][-w]\\([^ ]\\)[-r][-w]\\([^ ]\\)" | 1378 "\\([^ ]\\)[-r][-w]\\([^ ]\\)[-r][-w]\\([^ ]\\)[-r][-w]\\([^ ]\\)" |