From: Miles Bader Date: Mon, 7 Aug 2000 14:54:35 +0000 (+0000) Subject: (gud-gdb-complete-command): Use comint-line-beginning-position. X-Git-Tag: emacs-pretest-21.0.90~2450 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=01d8967d6612532a830089e4254e43f2fe208622;p=emacs.git (gud-gdb-complete-command): Use comint-line-beginning-position. --- diff --git a/lisp/gud.el b/lisp/gud.el index c2e99948954..598aa036d1e 100644 --- a/lisp/gud.el +++ b/lisp/gud.el @@ -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)