aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-04-12 03:15:37 +0000
committerRichard M. Stallman1994-04-12 03:15:37 +0000
commitd90490d8e8cf915a8eb2d0edcd3041ef8d626b12 (patch)
tree992135bf23c90f3db41896f68c2b96be029ba600
parentb2c3b7ffed48b820d9492387ebfdeafed96b0670 (diff)
downloademacs-d90490d8e8cf915a8eb2d0edcd3041ef8d626b12.tar.gz
emacs-d90490d8e8cf915a8eb2d0edcd3041ef8d626b12.zip
(dired-move-to-filename-regexp): Match the year or time.
(dired-move-to-filename): Simplify the code for that.
-rw-r--r--lisp/dired.el13
1 files changed, 5 insertions, 8 deletions
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
1145;;; Functions for finding the file name in a dired buffer line. 1145;;; Functions for finding the file name in a dired buffer line.
1146 1146
1147(defvar dired-move-to-filename-regexp 1147(defvar dired-move-to-filename-regexp
1148 "\\(Jan\\|Feb\\|Mar\\|Apr\\|May\\|Jun\\|Jul\\|Aug\\|Sep\\|Oct\\|Nov\\|Dec\\)[ ]+[0-9]+" 1148 "\\(Jan\\|Feb\\|Mar\\|Apr\\|May\\|Jun\\|Jul\\|Aug\\|Sep\\|Oct\\|Nov\\|Dec\\)[ ]+[0-9]+ [ 0-9][0-9][:0-9][0-9][ 0-9] "
1149 "Regular expression to match a month abbreviation followed by a number.") 1149 "Regular expression to match a month abbreviation followed by a number.")
1150 1150
1151;; Move to first char of filename on this line. 1151;; 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
1154 ;; This is the UNIX version. 1154 ;; This is the UNIX version.
1155 (or eol (setq eol (progn (end-of-line) (point)))) 1155 (or eol (setq eol (progn (end-of-line) (point))))
1156 (beginning-of-line) 1156 (beginning-of-line)
1157 (or (if (re-search-forward dired-move-to-filename-regexp eol t) 1157 (if (re-search-forward dired-move-to-filename-regexp eol t)
1158 (progn 1158 (goto-char (match-end 0))
1159 (goto-char (match-end 0)) 1159 (if raise-error
1160 (if (= 7 (skip-chars-forward " 0-9:" (+ (point) 7))) 1160 (error "No file on this line"))))
1161 (point))))
1162 (if raise-error
1163 (error "No file on this line"))))
1164 1161
1165(defun dired-move-to-end-of-filename (&optional no-error) 1162(defun dired-move-to-end-of-filename (&optional no-error)
1166 ;; Assumes point is at beginning of filename, 1163 ;; Assumes point is at beginning of filename,