changeset 24736:2abcb92cf0ae

(gud-format-command): "%F" means file sans extension. (jdb): use %F, not %f, for gud-break.
author Richard M. Stallman <rms@gnu.org>
date Mon, 17 May 1999 01:38:59 +0000
parents 58e77af0527b
children 4a18ef61578d
files lisp/gud.el
diffstat 1 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gud.el	Mon May 17 01:38:15 1999 +0000
+++ b/lisp/gud.el	Mon May 17 01:38:59 1999 +0000
@@ -110,6 +110,7 @@
 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 @@
 ;; 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 @@
   (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 @@
 	  (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)