]> git.eshelyaron.com Git - emacs.git/commitdiff
(gud-gdb-complete-command): Use comint-line-beginning-position.
authorMiles Bader <miles@gnu.org>
Mon, 7 Aug 2000 14:54:35 +0000 (14:54 +0000)
committerMiles Bader <miles@gnu.org>
Mon, 7 Aug 2000 14:54:35 +0000 (14:54 +0000)
lisp/gud.el

index c2e9994895494c38c6a04b62d34610ab7dbecb37..598aa036d1e49d98d04e707281fa08d1072c3310 100644 (file)
@@ -411,11 +411,7 @@ This is implemented using the GDB `complete' command which isn't
 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)