aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/dired.el
diff options
context:
space:
mode:
authorKarl Heuer <[email protected]>1994-04-11 20:09:44 +0000
committerKarl Heuer <[email protected]>1994-04-11 20:09:44 +0000
commit5d831bedd4fc74c395c96843fc0477eaf1cb307d (patch)
tree238749bd166b1171dcf4830394462093afc4fbd2 /lisp/dired.el
parent7ec2a18c27703ce94fb7c50fef0b501290d70d10 (diff)
(dired-move-to-filename): Handle leading blanks.
Diffstat (limited to 'lisp/dired.el')
-rw-r--r--lisp/dired.el14
1 files changed, 3 insertions, 11 deletions
diff --git a/lisp/dired.el b/lisp/dired.el
index b8ebaa1f63..f87f02a695 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1154,18 +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)
- (if (re-search-forward
- dired-move-to-filename-regexp
- eol t)
+ (if (and (re-search-forward dired-move-to-filename-regexp eol t)
+ (looking-at " \\([0-9][0-9]:[0-9][0-9]\\| [0-9]+\\|[0-9]+ \\) "))
(progn
- (skip-chars-forward " ") ; there is one SPC after day of month
- (skip-chars-forward "^ " eol) ; move after time of day (or year)
- (skip-chars-forward " " eol) ; there is space before the file name
- ;; Actually, if the year instead of clock time is displayed,
- ;; there are (only for some ls programs?) two spaces instead
- ;; of one before the name.
- ;; If we could depend on ls inserting exactly one SPC we
- ;; would not bomb on names _starting_ with SPC.
+ (goto-char (match-end 0))
(point))
(if raise-error
(error "No file on this line")