]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/gud.el
* test/automated/viper-tests.el (viper-test-undo-kmacro):
[gnu-emacs] / lisp / progmodes / gud.el
index a12bdd99f2397fb9e3c419daaf2bc1fbdd63d15e..356cd3e05329a90f0b72836f21d2b944606ce787 100644 (file)
@@ -1,6 +1,6 @@
-;;; gud.el --- Grand Unified Debugger mode for running GDB and other debuggers
+;;; gud.el --- Grand Unified Debugger mode for running GDB and other debuggers  -*- lexical-binding:t -*-
 
-;; Copyright (C) 1992-1996, 1998, 2000-2014 Free Software Foundation,
+;; Copyright (C) 1992-1996, 1998, 2000-2016 Free Software Foundation,
 ;; Inc.
 
 ;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
@@ -1742,6 +1742,7 @@ and source-file directory for your debugger."
 (defcustom gud-guiler-command-name "guile"
   "File name for executing the Guile debugger.
 This should be an executable on your path, or an absolute file name."
+  :version "25.1"
   :type 'string
   :group 'gud)
 
@@ -2813,7 +2814,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 +2856,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 +2869,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 +3081,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)
@@ -3401,7 +3406,7 @@ it if ARG is omitted or nil."
 (defcustom gud-tooltip-modes '(gud-mode c-mode c++-mode fortran-mode
                                        python-mode)
   "List of modes for which to enable GUD tooltips."
-  :type 'sexp
+  :type '(repeat (symbol :tag "Major mode"))
   :group 'gud
   :group 'tooltip)
 
@@ -3416,6 +3421,7 @@ it if ARG is omitted or nil."
 Forms in the list are combined with AND.  The default is to display
 only tooltips in the buffer containing the overlay arrow."
   :type 'sexp
+  :risky t
   :group 'gud
   :group 'tooltip)