mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-23 21:37:34 +00:00
(dired-move-to-filename): Use skip-chars-forward
instead of looking-at, for speed.
This commit is contained in:
parent
1cb46df641
commit
6823efabff
1 changed files with 7 additions and 8 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue