[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/net/ange-ftp.el
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/net/ange-ftp.el |
Date: |
Sun, 23 Oct 2005 08:17:33 -0400 |
Index: emacs/lisp/net/ange-ftp.el
diff -c emacs/lisp/net/ange-ftp.el:1.78 emacs/lisp/net/ange-ftp.el:1.79
*** emacs/lisp/net/ange-ftp.el:1.78 Thu Oct 20 20:08:19 2005
--- emacs/lisp/net/ange-ftp.el Sun Oct 23 12:17:28 2005
***************
*** 2666,2701 ****
;;;; Directory information caching support.
;;;; ------------------------------------------------------------
- (defconst ange-ftp-date-regexp
- (let* ((l "\\([A-Za-z]\\|[^\0-\177]\\)")
- ;; In some locales, month abbreviations are as short as 2 letters,
- ;; and they can be padded on the right with spaces.
- ;; weiand: changed: month ends with . or , or .,
- ;;old (month (concat l l "+ *"))
- (month (concat l l "+[.]?,? *"))
- ;; Recognize any non-ASCII character.
- ;; The purpose is to match a Kanji character.
- (k "[^\0-\177]")
- (s " ")
- (mm "[ 0-1][0-9]")
- ;; weiand: changed: day ends with .
- ;;old (dd "[ 0-3][0-9]")
- (dd "[ 0-3][0-9][.]?")
- (western (concat "\\(" month s dd "\\|" dd s month "\\)"))
- (japanese (concat mm k s dd k)))
- ;; Require the previous column to end in a digit.
- ;; This avoids recognizing `1 may 1997' as a date in the line:
- ;; -r--r--r-- 1 may 1997 1168 Oct 19 16:49 README
- ;; albinus:
- ;; Require also the following column to start in a digit.
- ;; This avoids recognizing `kfs 10' as a date in the line:
- ;; -rw------- 1 kfs 10 May 27 2003 .autorun.lck
- ;; (concat "[0-9]" s "\\(" western "\\|" japanese "\\)" s))
- (concat "[0-9]" s "\\(" western "\\|" japanese "\\)" s "+[0-9]"))
- "Regular expression to match up to the column before the file name in a
- directory listing. This regular expression is designed to recognize dates
- regardless of the language.")
-
(defvar ange-ftp-add-file-entry-alist nil
"Alist saying how to add file entries on certain OS types.
Association list of pairs \( TYPE \. FUNC \), where FUNC
--- 2666,2671 ----
***************
*** 2730,2742 ****
;;Extract the filename from the current line of a dired-like listing.
`(let ((eol (progn (end-of-line) (point))))
(beginning-of-line)
! (if (re-search-forward ange-ftp-date-regexp eol t)
! (progn
! (skip-chars-forward " ")
! (skip-chars-forward "^ " eol)
! (skip-chars-forward " " eol)
! ;; We bomb on filenames starting with a space.
! (buffer-substring (point) eol)))))
;; This deals with the F switch. Should also do something about
;; unquoting names obtained with the SysV b switch and the GNU Q
--- 2700,2707 ----
;;Extract the filename from the current line of a dired-like listing.
`(let ((eol (progn (end-of-line) (point))))
(beginning-of-line)
! (if (re-search-forward directory-listing-before-filename-regexp eol t)
! (buffer-substring (point) eol))))
;; This deals with the F switch. Should also do something about
;; unquoting names obtained with the SysV b switch and the GNU Q
***************
*** 2851,2857 ****
;; (3) The twilight zone.
;; We'll assume (1) for now.
nil)
! ((re-search-forward ange-ftp-date-regexp nil t)
(beginning-of-line)
(ange-ftp-ls-parser switches))
((re-search-forward "^[^ \n\t]+ +\\([0-9]+\\|-\\|=\\) " nil t)
--- 2816,2822 ----
;; (3) The twilight zone.
;; We'll assume (1) for now.
nil)
! ((re-search-forward directory-listing-before-filename-regexp nil t)
(beginning-of-line)
(ange-ftp-ls-parser switches))
((re-search-forward "^[^ \n\t]+ +\\([0-9]+\\|-\\|=\\) " nil t)
***************
*** 5532,5538 ****
(let ((tbl (make-hash-table :test 'equal)))
(goto-char (point-min))
(save-match-data
! (while (re-search-forward ange-ftp-date-regexp nil t)
(end-of-line)
(skip-chars-backward " ")
(let ((end (point)))
--- 5497,5503 ----
(let ((tbl (make-hash-table :test 'equal)))
(goto-char (point-min))
(save-match-data
! (while (re-search-forward directory-listing-before-filename-regexp nil
t)
(end-of-line)
(skip-chars-backward " ")
(let ((end (point)))