branch: externals/vc-hgcmd commit c16d22ebf1c3592f0b52e4c5d945b8692a63db50 Author: muffinmad <andreyk....@gmail.com> Commit: muffinmad <andreyk....@gmail.com>
Use single `looking-at` to on summary parsing --- vc-hgcmd.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/vc-hgcmd.el b/vc-hgcmd.el index 40602ad..6dad07f 100644 --- a/vc-hgcmd.el +++ b/vc-hgcmd.el @@ -752,10 +752,9 @@ Insert output to process buffer and check if amount of data is enought to parse (goto-char (point-min)) (while (not (eobp)) (push - (let ((entry (cond - ((looking-at " .*") (cons "" (match-string 0))) - ((looking-at "\\(.*\\): \\(.*\\)") (cons (capitalize (match-string 1)) (match-string 2))) - (t (cons "" (buffer-substring (point) (line-end-position))))))) + (let ((entry (if (looking-at "\\([^ ].*\\): \\(.*\\)") + (cons (capitalize (match-string 1)) (match-string 2)) + (cons "" (buffer-substring (point) (line-end-position)))))) (concat (propertize (format "%-11s: " (car entry)) 'face 'font-lock-type-face) (propertize (cdr entry) 'face 'font-lock-variable-name-face)