emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master d490770: * lisp/vc/vc-hg.el (vc-hg-state-fast): Fix


From: Stefan Monnier
Subject: [Emacs-diffs] master d490770: * lisp/vc/vc-hg.el (vc-hg-state-fast): Fix compiler warning
Date: Thu, 20 Apr 2017 17:38:31 -0400 (EDT)

branch: master
commit d490770dd09f1121b637eebdad82531de654189b
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    * 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 e10daad..5348341 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))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]