Commit ce27f264 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(vc-consult-rcs-headers): Use an even more

pedantic regexp to match RCS time strings.  Improved
efficiency by using looking-at instead of re-search "\\=...
parent eb6a9dca
......@@ -346,11 +346,12 @@ value of this flag.")
(let ((rev (buffer-substring (match-beginning 1)
(match-end 1))))
;; ... and check for the locking state
(if (re-search-forward
(concat "\\=[0-9]+[/-][0-9]+[/-][0-9]+ " ; date
"[0-9]+:[0-9]+:[0-9]+\\([+-][0-9:]+\\)? " ; time
"[^ ]+ [^ ]+ ") ; author & state
nil t)
(cond
((looking-at
(concat "[0-9]+[/-][01][0-9][/-][0-3][0-9] " ; date
"[0-2][0-9]:[0-5][0-9]+:[0-6][0-9]+\\([+-][0-9:]+\\)? " ; time
"[^ ]+ [^ ]+ ")) ; author & state
(goto-char (match-end 0)) ; [0-6] in regexp handles leap seconds
(cond
;; unlocked revision
((looking-at "\\$")
......@@ -365,10 +366,10 @@ value of this flag.")
(match-end 1)))
'rev-and-lock)
;; everything else: false
(nil))
(nil)))
;; unexpected information in
;; keyword string --> quit
nil)))
(nil))))
;; search for $Revision
;; --------------------
((re-search-forward (concat "\\$"
......
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