# HG changeset patch # User Miles Bader # Date 965660075 0 # Node ID 4a6ff467897eb14a911a2bb21739a41b79814ee6 # Parent ae938744b6b1063a4f858149618f67fbea79ee50 (gud-gdb-complete-command): Use comint-line-beginning-position. diff -r ae938744b6b1 -r 4a6ff467897e lisp/gud.el --- 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)