changeset 30643:4a6ff467897e

(gud-gdb-complete-command): Use comint-line-beginning-position.
author Miles Bader <miles@gnu.org>
date Mon, 07 Aug 2000 14:54:35 +0000
parents ae938744b6b1
children ce7385745191
files lisp/gud.el
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gud.el	Mon Aug 07 14:52:52 2000 +0000
+++ b/lisp/gud.el	Mon Aug 07 14:54:35 2000 +0000
@@ -411,11 +411,7 @@
 available with older versions of GDB."
   (interactive)
   (let* ((end (point))
-	 (command (save-excursion
-		    (beginning-of-line)
-		    (and (looking-at comint-prompt-regexp)
-			 (goto-char (match-end 0)))
-		    (buffer-substring (point) end)))
+	 (command (buffer-substring (comint-line-beginning-position) end))
 	 command-word)
     ;; Find the word break.  This match will always succeed.
     (string-match "\\(\\`\\| \\)\\([^ ]*\\)\\'" command)