]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve recent change to emacsclient on Cygwin
authorKen Brown <kbrown@cornell.edu>
Tue, 7 Jul 2015 14:24:09 +0000 (10:24 -0400)
committerKen Brown <kbrown@cornell.edu>
Tue, 7 Jul 2015 14:24:09 +0000 (10:24 -0400)
* lisp/server.el (server-process-filter): Remove redundant check
that 'cygwin-convert-file-name-from-windows' is defined as a
function on Cygwin.  Don't call that function unless its argument
starts with a drive letter.

lisp/server.el

index ce19b3c9d0fdf31afcbeb8e42146f38435c16c0d..b6b0e97aa366c55bb41a333a51b2576dcfd5140d 100644 (file)
@@ -1167,8 +1167,11 @@ The following commands are accepted by the client:
                  (let ((file (pop args-left)))
                    (if coding-system
                        (setq file (decode-coding-string file coding-system)))
+                   ;; Allow Cygwin's emacsclient to be used as a file
+                   ;; handler on MS-Windows, in which case FILENAME
+                   ;; might start with a drive letter.
                    (when (and (eq system-type 'cygwin)
-                              (fboundp 'cygwin-convert-file-name-from-windows))
+                              (string-match "\\`[A-Za-z]:" file))
                      (setq file (cygwin-convert-file-name-from-windows file)))
                    (setq file (expand-file-name file dir))
                    (push (cons file filepos) files)