]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/gud.el
Merge branch 'emacs-25-merge'
[gnu-emacs] / lisp / progmodes / gud.el
index 29a6dc63a6850b9b0d297b8c440ff0c561734eba..024547cc487d46812ab606c4f64fc982f5534ba9 100644 (file)
@@ -2813,7 +2813,7 @@ Obeying it means displaying in another window the specified file and line."
            (gud-find-file true-file)))
         (window (and buffer
                      (or (get-buffer-window buffer)
-                         (display-buffer buffer))))
+                         (display-buffer buffer '(nil (inhibit-same-window . t))))))
         (pos))
     (when buffer
       (with-current-buffer buffer
@@ -2855,6 +2855,10 @@ Obeying it means displaying in another window the specified file and line."
 (defun gud-format-command (str arg)
   (let ((insource (not (eq (current-buffer) gud-comint-buffer)))
        (frame (or gud-last-frame gud-last-last-frame))
+       (buffer-file-name-localized
+         (and (buffer-file-name)
+              (or (file-remote-p (buffer-file-name) 'localname)
+                  (buffer-file-name))))
        result)
     (while (and str
                (let ((case-fold-search nil))
@@ -2864,15 +2868,15 @@ Obeying it means displaying in another window the specified file and line."
        (cond
         ((eq key ?f)
          (setq subst (file-name-nondirectory (if insource
-                                                 (buffer-file-name)
+                                                 buffer-file-name-localized
                                                (car frame)))))
         ((eq key ?F)
          (setq subst (file-name-base (if insource
-                                          (buffer-file-name)
+                                          buffer-file-name-localized
                                         (car frame)))))
         ((eq key ?d)
          (setq subst (file-name-directory (if insource
-                                              (buffer-file-name)
+                                              buffer-file-name-localized
                                             (car frame)))))
         ((eq key ?l)
          (setq subst (int-to-string
@@ -3076,7 +3080,7 @@ the character after the end of the expr."
   "Scan from SPAN-START to SPAN-END for punctuation characters.
 If `->' is found, return `?.'.  If `.' is found, return `?.'.
 If any other punctuation is found, return `??'.
-If no punctuation is found, return `? '."
+If no punctuation is found, return `?\\s'."
   (let ((result ?\s)
        (syntax))
     (while (< span-start span-end)