From 698c8717155eff301f4249eaa45ed2ef78506a98 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Mon, 7 Jan 2008 06:10:11 +0000 Subject: [PATCH] (vc-hg-log-view-mode): Handle the user field better. --- lisp/ChangeLog | 1 + lisp/vc-hg.el | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c56108ca020..3b8769bbe66 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,6 +2,7 @@ * vc-hg.el (vc-hg-dir-state, vc-hg-dir-status): Pass the dir argument to vc-hg-command. + (vc-hg-log-view-mode): Handle the user field better. 2008-01-06 Stefan Monnier diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el index 5d467a7018c..b636e2f9250 100644 --- a/lisp/vc-hg.el +++ b/lisp/vc-hg.el @@ -286,15 +286,18 @@ (set (make-local-variable 'log-view-font-lock-keywords) (append log-view-font-lock-keywords - ;; Handle the case: - ;; user: foo@bar - '(("^user:[ \t]+\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)" - (1 'change-log-email)) + '( ;; Handle the case: ;; user: FirstName LastName ("^user:[ \t]+\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)[>)]" (1 'change-log-name) (2 'change-log-email)) + ;; Handle the cases: + ;; user: foo@bar + ;; and + ;; user: foo + ("^user:[ \t]+\\([A-Za-z0-9_.+-]+\\(?:@[A-Za-z0-9_.-]+\\)?\\)" + (1 'change-log-email)) ("^date: \\(.+\\)" (1 'change-log-date)) ("^summary:[ \t]+\\(.+\\)" (1 'log-view-message)))))) -- 2.39.5