From: Richard M. Stallman Date: Tue, 12 Apr 1994 03:15:37 +0000 (+0000) Subject: (dired-move-to-filename-regexp): Match the year or time. X-Git-Tag: emacs-19.34~9036 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d90490d8e8cf915a8eb2d0edcd3041ef8d626b12;p=emacs.git (dired-move-to-filename-regexp): Match the year or time. (dired-move-to-filename): Simplify the code for that. --- diff --git a/lisp/dired.el b/lisp/dired.el index efdd09dcd4b..ced8720fd49 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1145,7 +1145,7 @@ Optional arg NO-ERROR-IF-NOT-FILEP means return nil if no filename on ;;; Functions for finding the file name in a dired buffer line. (defvar dired-move-to-filename-regexp - "\\(Jan\\|Feb\\|Mar\\|Apr\\|May\\|Jun\\|Jul\\|Aug\\|Sep\\|Oct\\|Nov\\|Dec\\)[ ]+[0-9]+" + "\\(Jan\\|Feb\\|Mar\\|Apr\\|May\\|Jun\\|Jul\\|Aug\\|Sep\\|Oct\\|Nov\\|Dec\\)[ ]+[0-9]+ [ 0-9][0-9][:0-9][0-9][ 0-9] " "Regular expression to match a month abbreviation followed by a number.") ;; Move to first char of filename on this line. @@ -1154,13 +1154,10 @@ Optional arg NO-ERROR-IF-NOT-FILEP means return nil if no filename on ;; This is the UNIX version. (or eol (setq eol (progn (end-of-line) (point)))) (beginning-of-line) - (or (if (re-search-forward dired-move-to-filename-regexp eol t) - (progn - (goto-char (match-end 0)) - (if (= 7 (skip-chars-forward " 0-9:" (+ (point) 7))) - (point)))) - (if raise-error - (error "No file on this line")))) + (if (re-search-forward dired-move-to-filename-regexp eol t) + (goto-char (match-end 0)) + (if raise-error + (error "No file on this line")))) (defun dired-move-to-end-of-filename (&optional no-error) ;; Assumes point is at beginning of filename,