Commit 6823efab authored by Richard M. Stallman's avatar Richard M. Stallman

(dired-move-to-filename): Use skip-chars-forward

instead of looking-at, for speed.
parent 1cb46df6
......@@ -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))))
(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]+ \\) "))
(goto-char (match-end 0))
(if raise-error
(error "No file on this line")
(or (if (re-search-forward dired-move-to-filename-regexp eol t)
(goto-char (match-end 0))
(if (= 7 (skip-chars-forward " 0-9:" (+ (point) 7)))
(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,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment