changeset 6801:7c587b0670bd

(dired-move-to-filename): Use skip-chars-forward instead of looking-at, for speed.
author Richard M. Stallman <rms@gnu.org>
date Mon, 11 Apr 1994 21:03:28 +0000
parents 34cc2fd97a9e
children 7d69da13c140
files lisp/dired.el
diffstat 1 files changed, 7 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/dired.el	Mon Apr 11 20:54:33 1994 +0000
+++ b/lisp/dired.el	Mon Apr 11 21:03:28 1994 +0000
@@ -1154,14 +1154,13 @@
   ;; This is the UNIX version.
   (or eol (setq eol (progn (end-of-line) (point))))
   (beginning-of-line)
-  (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
-	(goto-char (match-end 0))
-	(point))
-    (if raise-error
-	(error "No file on this line")
-      nil)))
+  (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"))))
 
 (defun dired-move-to-end-of-filename (&optional no-error)
   ;; Assumes point is at beginning of filename,