]> git.eshelyaron.com Git - emacs.git/commitdiff
(dired-move-to-filename): Use skip-chars-forward
authorRichard M. Stallman <rms@gnu.org>
Mon, 11 Apr 1994 21:03:28 +0000 (21:03 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 11 Apr 1994 21:03:28 +0000 (21:03 +0000)
instead of looking-at, for speed.

lisp/dired.el

index f87f02a6958a675d0d0bab5e9c37b7a7b463a32c..efdd09dcd4b23cf01b51fe32c3ae042fb80f53b6 100644 (file)
@@ -1154,14 +1154,13 @@ 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 (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,