summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/gud.el17
1 files changed, 11 insertions, 6 deletions
diff --git a/lisp/gud.el b/lisp/gud.el
index 84e76a3f227..2de603bc079 100644
--- a/lisp/gud.el
+++ b/lisp/gud.el
@@ -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)