From d490770dd09f1121b637eebdad82531de654189b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 20 Apr 2017 17:38:21 -0400 Subject: [PATCH] * lisp/vc/vc-hg.el (vc-hg-state-fast): Fix compiler warning by simplifying ascii-test. --- lisp/vc/vc-hg.el | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index e10daad72f0..53483419501 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -987,8 +987,7 @@ hg binary." repo dirstate dirstate-attr - repo-relative-filename - ascii-fname) + repo-relative-filename) (if (or ;; Explicit user disable (not vc-hg-parse-hg-data-structures) @@ -1013,18 +1012,12 @@ hg binary." (progn (setf repo-relative-filename (file-relative-name truename repo)) - (setf ascii-fname - (string-as-unibyte - (let (last-coding-system-used) - (encode-coding-string - repo-relative-filename - 'us-ascii t)))) ;; We only try dealing with ASCII filenames - (not (equal ascii-fname repo-relative-filename)))) + (string-match-p "[^[:ascii:]]" repo-relative-filename))) 'unsupported (let* ((dirstate-entry (vc-hg--cached-dirstate-search - dirstate dirstate-attr ascii-fname)) + dirstate dirstate-attr repo-relative-filename)) (state (car dirstate-entry)) (stat (file-attributes (concat repo repo-relative-filename)))) -- 2.39.5