]> git.eshelyaron.com Git - emacs.git/commitdiff
Fixed pdb-track on Windows
authorFabián Ezequiel Gallina <fgallina@cuca>
Thu, 17 May 2012 03:03:01 +0000 (00:03 -0300)
committerFabián Ezequiel Gallina <fgallina@gnu.org>
Thu, 17 May 2012 03:03:01 +0000 (00:03 -0300)
make-temp-file is returning the temp file path with the wrong type of
slashes.

lisp/progmodes/python.el

index 76901aaa69e996c8db943706eafd4431f35e1f99..0611a4c9b4554deda2bdb80581efd5ee3689aa20 100644 (file)
@@ -1061,6 +1061,17 @@ commands.)"
       (message (format "Sent: %s..."
                        (buffer-substring (point-min)
                                          (line-end-position)))))
+    ;; Fix Windows/MS-DOS temp file path
+    (when (or (eq system-type 'windows-nt)
+              (eq system-type 'ms-dos)
+              (eq system-type 'cygwin))
+      (setq temp-file
+            (with-temp-buffer
+              (insert temp-file)
+              (goto-char (point-min))
+              (while (search-forward "/" nil t)
+                (replace-match "\\" nil t))
+              (buffer-substring (point-min) (point-max)))))
     (with-current-buffer (process-buffer process)
       (setq inferior-python-mode-current-file current-file)
       (setq inferior-python-mode-current-temp-file temp-file))