(gud-format-command): "%F" means file sans extension.
authorRichard M. Stallman <rms@gnu.org>
Mon, 17 May 1999 01:38:59 +0000 (01:38 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 17 May 1999 01:38:59 +0000 (01:38 +0000)
(jdb): use %F, not %f, for gud-break.

lisp/gud.el

index 84e76a3..2de603b 100644 (file)
@@ -110,6 +110,7 @@ optional doc string DOC.  Certain %-escapes in the string arguments
 are interpreted specially if present.  These are:
 
   %f   name (without directory) of current source file.
+  %F   name (without directory or extension) of current source file.
   %d   directory of current source file.
   %l   number of current source line
   %e   text of the C lvalue or function-call expression surrounding point.
@@ -1574,11 +1575,10 @@ The file names should be absolute, or relative to the current directory.")
 ;; Move point past a string literal.
 (defun gud-jdb-skip-string-literal ()
   (forward-char)
-  (while
-      (progn
-       (if (eq (following-char) ?\\)
-           (forward-char 2))
-       (not (eq (following-char) ?\042)))
+  (while (not (cond
+              ((eq (following-char) ?\\)
+               (forward-char))
+              ((eq (following-char) ?\042))))
     (forward-char))
   (forward-char))
 
@@ -1881,7 +1881,7 @@ between it and it's value."
   (gud-common-init command-line 'gud-jdb-massage-args
           'gud-jdb-marker-filter 'gud-jdb-find-file)
 
-  (gud-def gud-break  "stop at %l" "\C-b" "Set breakpoint at current line.")
+  (gud-def gud-break  "stop at %F:%l" "\C-b" "Set breakpoint at current line.")
   (gud-def gud-remove "clear %l" "\C-d" "Remove breakpoint at current line")
   (gud-def gud-step   "step"    "\C-s" "Step one source line with display.")
   (gud-def gud-next   "next"    "\C-n" "Step one line (skip functions).")
@@ -2279,6 +2279,11 @@ Obeying it means displaying in another window the specified file and line."
          (setq subst (file-name-nondirectory (if insource
                                                  (buffer-file-name)
                                                (car frame)))))
+        ((eq key ?F)
+         (setq subst (file-name-sans-extension
+                      (file-name-nondirectory (if insource
+                                                  (buffer-file-name)
+                                                (car frame))))))
         ((eq key ?d)
          (setq subst (file-name-directory (if insource
                                               (buffer-file-name)